Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[deliverable/linux.git] / arch / arm / mach-s3c24xx / mach-otom.c
CommitLineData
0afdff5d 1/*
1da177e4
LT
2 *
3 * Copyright (c) 2004 Nex Vision
4 * Guillaume GOURAT <guillaume.gourat@nexvision.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
1da177e4
LT
9 */
10
11#include <linux/kernel.h>
12#include <linux/types.h>
13#include <linux/interrupt.h>
14#include <linux/list.h>
15#include <linux/timer.h>
16#include <linux/init.h>
b6d1f542 17#include <linux/serial_core.h>
d052d1be 18#include <linux/platform_device.h>
fced80c7 19#include <linux/io.h>
1da177e4 20
0afdff5d
KK
21#include <linux/platform_data/i2c-s3c2410.h>
22
23#include <asm/irq.h>
24#include <asm/mach-types.h>
1da177e4
LT
25#include <asm/mach/arch.h>
26#include <asm/mach/map.h>
27#include <asm/mach/irq.h>
28
a09e64fb 29#include <mach/hardware.h>
a09e64fb 30#include <mach/regs-gpio.h>
1da177e4 31
d5120ae7 32#include <plat/clock.h>
a2b7ba9c 33#include <plat/cpu.h>
0afdff5d
KK
34#include <plat/devs.h>
35#include <plat/regs-serial.h>
1da177e4 36
b27b0727 37#include "common.h"
0afdff5d 38#include "otom.h"
b27b0727 39
1da177e4
LT
40static struct map_desc otom11_iodesc[] __initdata = {
41 /* Device area */
42 { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE },
43};
44
45#define UCON S3C2410_UCON_DEFAULT
46#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
47#define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE
48
66a9b49a 49static struct s3c2410_uartcfg otom11_uartcfgs[] __initdata = {
1da177e4
LT
50 [0] = {
51 .hwport = 0,
52 .flags = 0,
53 .ucon = UCON,
54 .ulcon = ULCON,
55 .ufcon = UFCON,
56 },
57 [1] = {
58 .hwport = 1,
59 .flags = 0,
60 .ucon = UCON,
61 .ulcon = ULCON,
62 .ufcon = UFCON,
63 },
64 /* port 2 is not actually used */
65 [2] = {
66 .hwport = 2,
67 .flags = 0,
68 .ucon = UCON,
69 .ulcon = ULCON,
70 .ufcon = UFCON,
71 }
72};
73
74/* NOR Flash on NexVision OTOM board */
75
76static struct resource otom_nor_resource[] = {
e21be38a 77 [0] = DEFINE_RES_MEM(S3C2410_CS0, SZ_4M),
1da177e4
LT
78};
79
80static struct platform_device otom_device_nor = {
81 .name = "mtd-flash",
82 .id = -1,
83 .num_resources = ARRAY_SIZE(otom_nor_resource),
84 .resource = otom_nor_resource,
85};
86
87/* Standard OTOM devices */
88
89static struct platform_device *otom11_devices[] __initdata = {
b813248c 90 &s3c_device_ohci,
1da177e4
LT
91 &s3c_device_lcd,
92 &s3c_device_wdt,
3e1b776c 93 &s3c_device_i2c0,
1da177e4
LT
94 &s3c_device_iis,
95 &s3c_device_rtc,
96 &otom_device_nor,
97};
98
5fe10ab1 99static void __init otom11_map_io(void)
1da177e4
LT
100{
101 s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
102 s3c24xx_init_clocks(0);
103 s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
1da177e4
LT
104}
105
57e5171c
BD
106static void __init otom11_init(void)
107{
3e1b776c 108 s3c_i2c0_set_platdata(NULL);
57e5171c
BD
109 platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
110}
1da177e4
LT
111
112MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
e9dea0c6 113 /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
69d50710 114 .atag_offset = 0x100,
1da177e4 115 .map_io = otom11_map_io,
57e5171c 116 .init_machine = otom11_init,
1da177e4 117 .init_irq = s3c24xx_init_irq,
6bb27d73 118 .init_time = s3c24xx_timer_init,
b27b0727 119 .restart = s3c2410_restart,
1da177e4 120MACHINE_END
This page took 0.573986 seconds and 5 git commands to generate.