aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2412
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-s3c2412')
-rw-r--r--arch/arm/mach-s3c2412/Kconfig4
-rw-r--r--arch/arm/mach-s3c2412/clock.c52
-rw-r--r--arch/arm/mach-s3c2412/dma.c2
-rw-r--r--arch/arm/mach-s3c2412/mach-jive.c13
-rw-r--r--arch/arm/mach-s3c2412/mach-smdk2413.c3
-rw-r--r--arch/arm/mach-s3c2412/mach-vstms.c12
6 files changed, 48 insertions, 38 deletions
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index c2bdc4635d12..9a8c0657ae50 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -1,5 +1,3 @@
1# arch/arm/mach-s3c2412/Kconfig
2#
3# Copyright 2007 Simtec Electronics 1# Copyright 2007 Simtec Electronics
4# 2#
5# Licensed under GPLv2 3# Licensed under GPLv2
@@ -90,6 +88,4 @@ config MACH_VSTMS
90 help 88 help
91 Say Y here if you are using an VSTMS board 89 Say Y here if you are using an VSTMS board
92 90
93
94endmenu 91endmenu
95
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c
index a037df5e1c2d..0c0505b025cb 100644
--- a/arch/arm/mach-s3c2412/clock.c
+++ b/arch/arm/mach-s3c2412/clock.c
@@ -124,7 +124,9 @@ static struct clk clk_usysclk = {
124 .name = "usysclk", 124 .name = "usysclk",
125 .id = -1, 125 .id = -1,
126 .parent = &clk_xtal, 126 .parent = &clk_xtal,
127 .set_parent = s3c2412_setparent_usysclk, 127 .ops = &(struct clk_ops) {
128 .set_parent = s3c2412_setparent_usysclk,
129 },
128}; 130};
129 131
130static struct clk clk_mrefclk = { 132static struct clk clk_mrefclk = {
@@ -199,10 +201,12 @@ static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate)
199static struct clk clk_usbsrc = { 201static struct clk clk_usbsrc = {
200 .name = "usbsrc", 202 .name = "usbsrc",
201 .id = -1, 203 .id = -1,
202 .get_rate = s3c2412_getrate_usbsrc, 204 .ops = &(struct clk_ops) {
203 .set_rate = s3c2412_setrate_usbsrc, 205 .get_rate = s3c2412_getrate_usbsrc,
204 .round_rate = s3c2412_roundrate_usbsrc, 206 .set_rate = s3c2412_setrate_usbsrc,
205 .set_parent = s3c2412_setparent_usbsrc, 207 .round_rate = s3c2412_roundrate_usbsrc,
208 .set_parent = s3c2412_setparent_usbsrc,
209 },
206}; 210};
207 211
208static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent) 212static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent)
@@ -225,7 +229,9 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent)
225static struct clk clk_msysclk = { 229static struct clk clk_msysclk = {
226 .name = "msysclk", 230 .name = "msysclk",
227 .id = -1, 231 .id = -1,
228 .set_parent = s3c2412_setparent_msysclk, 232 .ops = &(struct clk_ops) {
233 .set_parent = s3c2412_setparent_msysclk,
234 },
229}; 235};
230 236
231static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent) 237static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent)
@@ -264,7 +270,9 @@ static struct clk clk_armclk = {
264 .name = "armclk", 270 .name = "armclk",
265 .id = -1, 271 .id = -1,
266 .parent = &clk_msysclk, 272 .parent = &clk_msysclk,
267 .set_parent = s3c2412_setparent_armclk, 273 .ops = &(struct clk_ops) {
274 .set_parent = s3c2412_setparent_armclk,
275 },
268}; 276};
269 277
270/* these next clocks have an divider immediately after them, 278/* these next clocks have an divider immediately after them,
@@ -337,10 +345,12 @@ static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate)
337static struct clk clk_uart = { 345static struct clk clk_uart = {
338 .name = "uartclk", 346 .name = "uartclk",
339 .id = -1, 347 .id = -1,
340 .get_rate = s3c2412_getrate_uart, 348 .ops = &(struct clk_ops) {
341 .set_rate = s3c2412_setrate_uart, 349 .get_rate = s3c2412_getrate_uart,
342 .set_parent = s3c2412_setparent_uart, 350 .set_rate = s3c2412_setrate_uart,
343 .round_rate = s3c2412_roundrate_clksrc, 351 .set_parent = s3c2412_setparent_uart,
352 .round_rate = s3c2412_roundrate_clksrc,
353 },
344}; 354};
345 355
346static int s3c2412_setparent_i2s(struct clk *clk, struct clk *parent) 356static int s3c2412_setparent_i2s(struct clk *clk, struct clk *parent)
@@ -388,10 +398,12 @@ static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate)
388static struct clk clk_i2s = { 398static struct clk clk_i2s = {
389 .name = "i2sclk", 399 .name = "i2sclk",
390 .id = -1, 400 .id = -1,
391 .get_rate = s3c2412_getrate_i2s, 401 .ops = &(struct clk_ops) {
392 .set_rate = s3c2412_setrate_i2s, 402 .get_rate = s3c2412_getrate_i2s,
393 .set_parent = s3c2412_setparent_i2s, 403 .set_rate = s3c2412_setrate_i2s,
394 .round_rate = s3c2412_roundrate_clksrc, 404 .set_parent = s3c2412_setparent_i2s,
405 .round_rate = s3c2412_roundrate_clksrc,
406 },
395}; 407};
396 408
397static int s3c2412_setparent_cam(struct clk *clk, struct clk *parent) 409static int s3c2412_setparent_cam(struct clk *clk, struct clk *parent)
@@ -438,10 +450,12 @@ static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate)
438static struct clk clk_cam = { 450static struct clk clk_cam = {
439 .name = "camif-upll", /* same as 2440 name */ 451 .name = "camif-upll", /* same as 2440 name */
440 .id = -1, 452 .id = -1,
441 .get_rate = s3c2412_getrate_cam, 453 .ops = &(struct clk_ops) {
442 .set_rate = s3c2412_setrate_cam, 454 .get_rate = s3c2412_getrate_cam,
443 .set_parent = s3c2412_setparent_cam, 455 .set_rate = s3c2412_setrate_cam,
444 .round_rate = s3c2412_roundrate_clksrc, 456 .set_parent = s3c2412_setparent_cam,
457 .round_rate = s3c2412_roundrate_clksrc,
458 },
445}; 459};
446 460
447/* standard clock definitions */ 461/* standard clock definitions */
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c
index f8d16fc10bc6..e880524904eb 100644
--- a/arch/arm/mach-s3c2412/dma.c
+++ b/arch/arm/mach-s3c2412/dma.c
@@ -20,7 +20,7 @@
20 20
21#include <mach/dma.h> 21#include <mach/dma.h>
22 22
23#include <plat/dma-plat.h> 23#include <plat/dma-s3c24xx.h>
24#include <plat/cpu.h> 24#include <plat/cpu.h>
25 25
26#include <plat/regs-serial.h> 26#include <plat/regs-serial.h>
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index 8df506eac903..14f4798291aa 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -96,7 +96,7 @@ static struct s3c2410_uartcfg jive_uartcfgs[] = {
96 * 0x017d0000-0x02bd0000 : cramfs B 96 * 0x017d0000-0x02bd0000 : cramfs B
97 * 0x02bd0000-0x03fd0000 : yaffs 97 * 0x02bd0000-0x03fd0000 : yaffs
98 */ 98 */
99static struct mtd_partition jive_imageA_nand_part[] = { 99static struct mtd_partition __initdata jive_imageA_nand_part[] = {
100 100
101#ifdef CONFIG_MACH_JIVE_SHOW_BOOTLOADER 101#ifdef CONFIG_MACH_JIVE_SHOW_BOOTLOADER
102 /* Don't allow access to the bootloader from linux */ 102 /* Don't allow access to the bootloader from linux */
@@ -154,7 +154,7 @@ static struct mtd_partition jive_imageA_nand_part[] = {
154 }, 154 },
155}; 155};
156 156
157static struct mtd_partition jive_imageB_nand_part[] = { 157static struct mtd_partition __initdata jive_imageB_nand_part[] = {
158 158
159#ifdef CONFIG_MACH_JIVE_SHOW_BOOTLOADER 159#ifdef CONFIG_MACH_JIVE_SHOW_BOOTLOADER
160 /* Don't allow access to the bootloader from linux */ 160 /* Don't allow access to the bootloader from linux */
@@ -213,7 +213,7 @@ static struct mtd_partition jive_imageB_nand_part[] = {
213 }, 213 },
214}; 214};
215 215
216static struct s3c2410_nand_set jive_nand_sets[] = { 216static struct s3c2410_nand_set __initdata jive_nand_sets[] = {
217 [0] = { 217 [0] = {
218 .name = "flash", 218 .name = "flash",
219 .nr_chips = 1, 219 .nr_chips = 1,
@@ -222,7 +222,7 @@ static struct s3c2410_nand_set jive_nand_sets[] = {
222 }, 222 },
223}; 223};
224 224
225static struct s3c2410_platform_nand jive_nand_info = { 225static struct s3c2410_platform_nand __initdata jive_nand_info = {
226 /* set taken from osiris nand timings, possibly still conservative */ 226 /* set taken from osiris nand timings, possibly still conservative */
227 .tacls = 30, 227 .tacls = 30,
228 .twrph0 = 55, 228 .twrph0 = 55,
@@ -468,7 +468,7 @@ static struct i2c_board_info jive_i2c_devs[] __initdata = {
468/* The platform devices being used. */ 468/* The platform devices being used. */
469 469
470static struct platform_device *jive_devices[] __initdata = { 470static struct platform_device *jive_devices[] __initdata = {
471 &s3c_device_usb, 471 &s3c_device_ohci,
472 &s3c_device_rtc, 472 &s3c_device_rtc,
473 &s3c_device_wdt, 473 &s3c_device_wdt,
474 &s3c_device_i2c0, 474 &s3c_device_i2c0,
@@ -631,7 +631,8 @@ static void __init jive_machine_init(void)
631 631
632 s3c_pm_init(); 632 s3c_pm_init();
633 633
634 s3c_device_nand.dev.platform_data = &jive_nand_info; 634 /** TODO - check that this is after the cmdline option! */
635 s3c_nand_set_platdata(&jive_nand_info);
635 636
636 /* initialise the spi */ 637 /* initialise the spi */
637 638
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c
index 9a5e43419722..0392065af1af 100644
--- a/arch/arm/mach-s3c2412/mach-smdk2413.c
+++ b/arch/arm/mach-s3c2412/mach-smdk2413.c
@@ -104,8 +104,7 @@ static struct s3c2410_udc_mach_info smdk2413_udc_cfg __initdata = {
104 104
105 105
106static struct platform_device *smdk2413_devices[] __initdata = { 106static struct platform_device *smdk2413_devices[] __initdata = {
107 &s3c_device_usb, 107 &s3c_device_ohci,
108 //&s3c_device_lcd,
109 &s3c_device_wdt, 108 &s3c_device_wdt,
110 &s3c_device_i2c0, 109 &s3c_device_i2c0,
111 &s3c_device_iis, 110 &s3c_device_iis,
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c
index 11e8ad49fc7b..3ca9265b6997 100644
--- a/arch/arm/mach-s3c2412/mach-vstms.c
+++ b/arch/arm/mach-s3c2412/mach-vstms.c
@@ -76,7 +76,7 @@ static struct s3c2410_uartcfg vstms_uartcfgs[] __initdata = {
76 } 76 }
77}; 77};
78 78
79static struct mtd_partition vstms_nand_part[] = { 79static struct mtd_partition __initdata vstms_nand_part[] = {
80 [0] = { 80 [0] = {
81 .name = "Boot Agent", 81 .name = "Boot Agent",
82 .size = 0x7C000, 82 .size = 0x7C000,
@@ -99,7 +99,7 @@ static struct mtd_partition vstms_nand_part[] = {
99 }, 99 },
100}; 100};
101 101
102static struct s3c2410_nand_set vstms_nand_sets[] = { 102static struct s3c2410_nand_set __initdata vstms_nand_sets[] = {
103 [0] = { 103 [0] = {
104 .name = "NAND", 104 .name = "NAND",
105 .nr_chips = 1, 105 .nr_chips = 1,
@@ -112,7 +112,7 @@ static struct s3c2410_nand_set vstms_nand_sets[] = {
112 * chips and beyond. 112 * chips and beyond.
113*/ 113*/
114 114
115static struct s3c2410_platform_nand vstms_nand_info = { 115static struct s3c2410_platform_nand __initdata vstms_nand_info = {
116 .tacls = 20, 116 .tacls = 20,
117 .twrph0 = 60, 117 .twrph0 = 60,
118 .twrph1 = 20, 118 .twrph1 = 20,
@@ -121,7 +121,7 @@ static struct s3c2410_platform_nand vstms_nand_info = {
121}; 121};
122 122
123static struct platform_device *vstms_devices[] __initdata = { 123static struct platform_device *vstms_devices[] __initdata = {
124 &s3c_device_usb, 124 &s3c_device_ohci,
125 &s3c_device_wdt, 125 &s3c_device_wdt,
126 &s3c_device_i2c0, 126 &s3c_device_i2c0,
127 &s3c_device_iis, 127 &s3c_device_iis,
@@ -143,8 +143,6 @@ static void __init vstms_fixup(struct machine_desc *desc,
143 143
144static void __init vstms_map_io(void) 144static void __init vstms_map_io(void)
145{ 145{
146 s3c_device_nand.dev.platform_data = &vstms_nand_info;
147
148 s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc)); 146 s3c24xx_init_io(vstms_iodesc, ARRAY_SIZE(vstms_iodesc));
149 s3c24xx_init_clocks(12000000); 147 s3c24xx_init_clocks(12000000);
150 s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs)); 148 s3c24xx_init_uarts(vstms_uartcfgs, ARRAY_SIZE(vstms_uartcfgs));
@@ -153,6 +151,8 @@ static void __init vstms_map_io(void)
153static void __init vstms_init(void) 151static void __init vstms_init(void)
154{ 152{
155 s3c_i2c0_set_platdata(NULL); 153 s3c_i2c0_set_platdata(NULL);
154 s3c_nand_set_platdata(&vstms_nand_info);
155
156 platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices)); 156 platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices));
157} 157}
158 158