]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* linux/arch/arm/mach-s3c2410/mach-otom.c |
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. | |
9 | * | |
10 | */ | |
11 | ||
12 | #include <linux/kernel.h> | |
13 | #include <linux/types.h> | |
14 | #include <linux/interrupt.h> | |
15 | #include <linux/list.h> | |
16 | #include <linux/timer.h> | |
17 | #include <linux/init.h> | |
b6d1f542 | 18 | #include <linux/serial_core.h> |
d052d1be | 19 | #include <linux/platform_device.h> |
fced80c7 | 20 | #include <linux/io.h> |
1da177e4 LT |
21 | |
22 | #include <asm/mach/arch.h> | |
23 | #include <asm/mach/map.h> | |
24 | #include <asm/mach/irq.h> | |
25 | ||
a09e64fb | 26 | #include <mach/otom-map.h> |
1da177e4 | 27 | |
a09e64fb | 28 | #include <mach/hardware.h> |
1da177e4 LT |
29 | #include <asm/irq.h> |
30 | #include <asm/mach-types.h> | |
31 | ||
a2b7ba9c | 32 | #include <plat/regs-serial.h> |
a09e64fb | 33 | #include <mach/regs-gpio.h> |
1da177e4 | 34 | |
a2b7ba9c | 35 | #include <plat/s3c2410.h> |
d5120ae7 | 36 | #include <plat/clock.h> |
a2b7ba9c | 37 | #include <plat/devs.h> |
3e1b776c | 38 | #include <plat/iic.h> |
a2b7ba9c | 39 | #include <plat/cpu.h> |
1da177e4 LT |
40 | |
41 | static struct map_desc otom11_iodesc[] __initdata = { | |
42 | /* Device area */ | |
43 | { (u32)OTOM_VA_CS8900A_BASE, OTOM_PA_CS8900A_BASE, SZ_16M, MT_DEVICE }, | |
44 | }; | |
45 | ||
46 | #define UCON S3C2410_UCON_DEFAULT | |
47 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | |
48 | #define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE | |
49 | ||
66a9b49a | 50 | static struct s3c2410_uartcfg otom11_uartcfgs[] __initdata = { |
1da177e4 LT |
51 | [0] = { |
52 | .hwport = 0, | |
53 | .flags = 0, | |
54 | .ucon = UCON, | |
55 | .ulcon = ULCON, | |
56 | .ufcon = UFCON, | |
57 | }, | |
58 | [1] = { | |
59 | .hwport = 1, | |
60 | .flags = 0, | |
61 | .ucon = UCON, | |
62 | .ulcon = ULCON, | |
63 | .ufcon = UFCON, | |
64 | }, | |
65 | /* port 2 is not actually used */ | |
66 | [2] = { | |
67 | .hwport = 2, | |
68 | .flags = 0, | |
69 | .ucon = UCON, | |
70 | .ulcon = ULCON, | |
71 | .ufcon = UFCON, | |
72 | } | |
73 | }; | |
74 | ||
75 | /* NOR Flash on NexVision OTOM board */ | |
76 | ||
77 | static struct resource otom_nor_resource[] = { | |
78 | [0] = { | |
79 | .start = S3C2410_CS0, | |
80 | .end = S3C2410_CS0 + (4*1024*1024) - 1, | |
81 | .flags = IORESOURCE_MEM, | |
82 | } | |
83 | }; | |
84 | ||
85 | static struct platform_device otom_device_nor = { | |
86 | .name = "mtd-flash", | |
87 | .id = -1, | |
88 | .num_resources = ARRAY_SIZE(otom_nor_resource), | |
89 | .resource = otom_nor_resource, | |
90 | }; | |
91 | ||
92 | /* Standard OTOM devices */ | |
93 | ||
94 | static struct platform_device *otom11_devices[] __initdata = { | |
b813248c | 95 | &s3c_device_ohci, |
1da177e4 LT |
96 | &s3c_device_lcd, |
97 | &s3c_device_wdt, | |
3e1b776c | 98 | &s3c_device_i2c0, |
1da177e4 LT |
99 | &s3c_device_iis, |
100 | &s3c_device_rtc, | |
101 | &otom_device_nor, | |
102 | }; | |
103 | ||
5fe10ab1 | 104 | static void __init otom11_map_io(void) |
1da177e4 LT |
105 | { |
106 | s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc)); | |
107 | s3c24xx_init_clocks(0); | |
108 | s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs)); | |
1da177e4 LT |
109 | } |
110 | ||
57e5171c BD |
111 | static void __init otom11_init(void) |
112 | { | |
3e1b776c | 113 | s3c_i2c0_set_platdata(NULL); |
57e5171c BD |
114 | platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices)); |
115 | } | |
1da177e4 LT |
116 | |
117 | MACHINE_START(OTOM, "Nex Vision - Otom 1.1") | |
e9dea0c6 | 118 | /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */ |
e9dea0c6 | 119 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
1da177e4 | 120 | .map_io = otom11_map_io, |
57e5171c | 121 | .init_machine = otom11_init, |
1da177e4 LT |
122 | .init_irq = s3c24xx_init_irq, |
123 | .timer = &s3c24xx_timer, | |
124 | MACHINE_END |