aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-10-31 12:14:40 -0400
committerBen Dooks <ben-linux@fluff.org>2008-12-15 18:40:26 -0500
commit3e1b776c2b9807d3af5945d5ece86dce9dfb0279 (patch)
treeacad50c9e9e1b9a00c73f2d5aaec919408ba81ee /arch/arm/mach-s3c2410
parenta2205cd2cbfb8fb217e6036f08773a09d1b6d75e (diff)
[ARM] S3C: Make i2c device definition common to plat-s3c
Make the device i2c0 common to plat-s3c and move the definitions from arch/arm/plat-s3c24xx/devs.c Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r--arch/arm/mach-s3c2410/include/mach/map.h2
-rw-r--r--arch/arm/mach-s3c2410/mach-amlm5900.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c7
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c6
-rw-r--r--arch/arm/mach-s3c2410/mach-otom.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-qt2410.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-tct_hammer.c4
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c4
10 files changed, 29 insertions, 14 deletions
diff --git a/arch/arm/mach-s3c2410/include/mach/map.h b/arch/arm/mach-s3c2410/include/mach/map.h
index d5ae6823fed4..255fdfeaf957 100644
--- a/arch/arm/mach-s3c2410/include/mach/map.h
+++ b/arch/arm/mach-s3c2410/include/mach/map.h
@@ -92,7 +92,6 @@
92#define S3C24XX_PA_TIMER S3C2410_PA_TIMER 92#define S3C24XX_PA_TIMER S3C2410_PA_TIMER
93#define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV 93#define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV
94#define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG 94#define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG
95#define S3C24XX_PA_IIC S3C2410_PA_IIC
96#define S3C24XX_PA_IIS S3C2410_PA_IIS 95#define S3C24XX_PA_IIS S3C2410_PA_IIS
97#define S3C24XX_PA_GPIO S3C2410_PA_GPIO 96#define S3C24XX_PA_GPIO S3C2410_PA_GPIO
98#define S3C24XX_PA_RTC S3C2410_PA_RTC 97#define S3C24XX_PA_RTC S3C2410_PA_RTC
@@ -101,6 +100,7 @@
101#define S3C24XX_PA_SDI S3C2410_PA_SDI 100#define S3C24XX_PA_SDI S3C2410_PA_SDI
102#define S3C24XX_PA_NAND S3C2410_PA_NAND 101#define S3C24XX_PA_NAND S3C2410_PA_NAND
103 102
103#define S3C_PA_IIC S3C2410_PA_IIC
104#define S3C_PA_UART S3C24XX_PA_UART 104#define S3C_PA_UART S3C24XX_PA_UART
105#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC 105#define S3C_PA_HSMMC0 S3C2443_PA_HSMMC
106 106
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c
index d061fea01900..6d6995afeb43 100644
--- a/arch/arm/mach-s3c2410/mach-amlm5900.c
+++ b/arch/arm/mach-s3c2410/mach-amlm5900.c
@@ -52,6 +52,7 @@
52#include <mach/regs-lcd.h> 52#include <mach/regs-lcd.h>
53#include <mach/regs-gpio.h> 53#include <mach/regs-gpio.h>
54 54
55#include <plat/iic.h>
55#include <plat/devs.h> 56#include <plat/devs.h>
56#include <plat/cpu.h> 57#include <plat/cpu.h>
57 58
@@ -150,7 +151,7 @@ static struct platform_device *amlm5900_devices[] __initdata = {
150#endif 151#endif
151 &s3c_device_adc, 152 &s3c_device_adc,
152 &s3c_device_wdt, 153 &s3c_device_wdt,
153 &s3c_device_i2c, 154 &s3c_device_i2c0,
154 &s3c_device_usb, 155 &s3c_device_usb,
155 &s3c_device_rtc, 156 &s3c_device_rtc,
156 &s3c_device_usbgadget, 157 &s3c_device_usbgadget,
@@ -233,6 +234,7 @@ static void __init amlm5900_init(void)
233#ifdef CONFIG_FB_S3C2410 234#ifdef CONFIG_FB_S3C2410
234 s3c24xx_fb_set_platdata(&amlm5900_fb_info); 235 s3c24xx_fb_set_platdata(&amlm5900_fb_info);
235#endif 236#endif
237 s3c_i2c0_set_platdata(NULL);
236 platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices)); 238 platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices));
237} 239}
238 240
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index c04c24444e0d..01bd76725b92 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -406,7 +406,7 @@ static struct platform_device bast_sio = {
406 * standard 100KHz i2c bus frequency 406 * standard 100KHz i2c bus frequency
407*/ 407*/
408 408
409static struct s3c2410_platform_i2c bast_i2c_info = { 409static struct s3c2410_platform_i2c __initdata bast_i2c_info = {
410 .flags = 0, 410 .flags = 0,
411 .slave_addr = 0x10, 411 .slave_addr = 0x10,
412 .bus_freq = 100*1000, 412 .bus_freq = 100*1000,
@@ -553,7 +553,7 @@ static struct platform_device *bast_devices[] __initdata = {
553 &s3c_device_usb, 553 &s3c_device_usb,
554 &s3c_device_lcd, 554 &s3c_device_lcd,
555 &s3c_device_wdt, 555 &s3c_device_wdt,
556 &s3c_device_i2c, 556 &s3c_device_i2c0,
557 &s3c_device_rtc, 557 &s3c_device_rtc,
558 &s3c_device_nand, 558 &s3c_device_nand,
559 &bast_device_dm9k, 559 &bast_device_dm9k,
@@ -588,7 +588,8 @@ static void __init bast_map_io(void)
588 s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); 588 s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
589 589
590 s3c_device_nand.dev.platform_data = &bast_nand_info; 590 s3c_device_nand.dev.platform_data = &bast_nand_info;
591 s3c_device_i2c.dev.platform_data = &bast_i2c_info; 591
592 s3c_i2c0_set_platdata(&bast_i2c_info);
592 593
593 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); 594 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
594 s3c24xx_init_clocks(0); 595 s3c24xx_init_clocks(0);
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 836508b829bb..821a1668c3ac 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -39,6 +39,7 @@
39#include <mach/h1940-latch.h> 39#include <mach/h1940-latch.h>
40#include <mach/fb.h> 40#include <mach/fb.h>
41#include <plat/udc.h> 41#include <plat/udc.h>
42#include <plat/iic.h>
42 43
43#include <plat/clock.h> 44#include <plat/clock.h>
44#include <plat/devs.h> 45#include <plat/devs.h>
@@ -184,7 +185,7 @@ static struct platform_device *h1940_devices[] __initdata = {
184 &s3c_device_usb, 185 &s3c_device_usb,
185 &s3c_device_lcd, 186 &s3c_device_lcd,
186 &s3c_device_wdt, 187 &s3c_device_wdt,
187 &s3c_device_i2c, 188 &s3c_device_i2c0,
188 &s3c_device_iis, 189 &s3c_device_iis,
189 &s3c_device_usbgadget, 190 &s3c_device_usbgadget,
190 &s3c_device_leds, 191 &s3c_device_leds,
@@ -216,6 +217,7 @@ static void __init h1940_init(void)
216 217
217 s3c24xx_fb_set_platdata(&h1940_fb_info); 218 s3c24xx_fb_set_platdata(&h1940_fb_info);
218 s3c24xx_udc_set_platdata(&h1940_udc_cfg); 219 s3c24xx_udc_set_platdata(&h1940_udc_cfg);
220 s3c_i2c0_set_platdata(NULL);
219 221
220 /* Turn off suspend on both USB ports, and switch the 222 /* Turn off suspend on both USB ports, and switch the
221 * selectable USB port to USB device mode. */ 223 * selectable USB port to USB device mode. */
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 7a7c45d28fe7..1269e59d2940 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -320,7 +320,7 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = {
320static struct platform_device *n30_devices[] __initdata = { 320static struct platform_device *n30_devices[] __initdata = {
321 &s3c_device_lcd, 321 &s3c_device_lcd,
322 &s3c_device_wdt, 322 &s3c_device_wdt,
323 &s3c_device_i2c, 323 &s3c_device_i2c0,
324 &s3c_device_iis, 324 &s3c_device_iis,
325 &s3c_device_usb, 325 &s3c_device_usb,
326 &s3c_device_usbgadget, 326 &s3c_device_usbgadget,
@@ -332,7 +332,7 @@ static struct platform_device *n30_devices[] __initdata = {
332static struct platform_device *n35_devices[] __initdata = { 332static struct platform_device *n35_devices[] __initdata = {
333 &s3c_device_lcd, 333 &s3c_device_lcd,
334 &s3c_device_wdt, 334 &s3c_device_wdt,
335 &s3c_device_i2c, 335 &s3c_device_i2c0,
336 &s3c_device_iis, 336 &s3c_device_iis,
337 &s3c_device_usbgadget, 337 &s3c_device_usbgadget,
338 &n35_button_device, 338 &n35_button_device,
@@ -501,7 +501,7 @@ static void __init n30_init_irq(void)
501static void __init n30_init(void) 501static void __init n30_init(void)
502{ 502{
503 s3c24xx_fb_set_platdata(&n30_fb_info); 503 s3c24xx_fb_set_platdata(&n30_fb_info);
504 s3c_device_i2c.dev.platform_data = &n30_i2ccfg; 504 s3c_device_i2c0.dev.platform_data = &n30_i2ccfg;
505 s3c24xx_udc_set_platdata(&n30_udc_cfg); 505 s3c24xx_udc_set_platdata(&n30_udc_cfg);
506 506
507 /* Turn off suspend on both USB ports, and switch the 507 /* Turn off suspend on both USB ports, and switch the
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c
index d8255cf87e44..f6c7261a4a12 100644
--- a/arch/arm/mach-s3c2410/mach-otom.c
+++ b/arch/arm/mach-s3c2410/mach-otom.c
@@ -35,6 +35,7 @@
35#include <plat/s3c2410.h> 35#include <plat/s3c2410.h>
36#include <plat/clock.h> 36#include <plat/clock.h>
37#include <plat/devs.h> 37#include <plat/devs.h>
38#include <plat/iic.h>
38#include <plat/cpu.h> 39#include <plat/cpu.h>
39 40
40static struct map_desc otom11_iodesc[] __initdata = { 41static struct map_desc otom11_iodesc[] __initdata = {
@@ -94,7 +95,7 @@ static struct platform_device *otom11_devices[] __initdata = {
94 &s3c_device_usb, 95 &s3c_device_usb,
95 &s3c_device_lcd, 96 &s3c_device_lcd,
96 &s3c_device_wdt, 97 &s3c_device_wdt,
97 &s3c_device_i2c, 98 &s3c_device_i2c0,
98 &s3c_device_iis, 99 &s3c_device_iis,
99 &s3c_device_rtc, 100 &s3c_device_rtc,
100 &otom_device_nor, 101 &otom_device_nor,
@@ -109,6 +110,7 @@ static void __init otom11_map_io(void)
109 110
110static void __init otom11_init(void) 111static void __init otom11_init(void)
111{ 112{
113 s3c_i2c0_set_platdata(NULL);
112 platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices)); 114 platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices));
113} 115}
114 116
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c
index ef868472f6a4..9678a53ceeb1 100644
--- a/arch/arm/mach-s3c2410/mach-qt2410.c
+++ b/arch/arm/mach-s3c2410/mach-qt2410.c
@@ -54,6 +54,7 @@
54#include <plat/udc.h> 54#include <plat/udc.h>
55#include <mach/spi.h> 55#include <mach/spi.h>
56#include <mach/spi-gpio.h> 56#include <mach/spi-gpio.h>
57#include <plat/iic.h>
57 58
58#include <plat/common-smdk.h> 59#include <plat/common-smdk.h>
59#include <plat/devs.h> 60#include <plat/devs.h>
@@ -247,7 +248,7 @@ static struct platform_device *qt2410_devices[] __initdata = {
247 &s3c_device_usb, 248 &s3c_device_usb,
248 &s3c_device_lcd, 249 &s3c_device_lcd,
249 &s3c_device_wdt, 250 &s3c_device_wdt,
250 &s3c_device_i2c, 251 &s3c_device_i2c0,
251 &s3c_device_iis, 252 &s3c_device_iis,
252 &s3c_device_sdi, 253 &s3c_device_sdi,
253 &s3c_device_usbgadget, 254 &s3c_device_usbgadget,
@@ -349,6 +350,7 @@ static void __init qt2410_machine_init(void)
349 s3c2410_gpio_setpin(S3C2410_GPB0, 1); 350 s3c2410_gpio_setpin(S3C2410_GPB0, 1);
350 351
351 s3c24xx_udc_set_platdata(&qt2410_udc_cfg); 352 s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
353 s3c_i2c0_set_platdata(NULL);
352 354
353 s3c2410_gpio_cfgpin(S3C2410_GPB5, S3C2410_GPIO_OUTPUT); 355 s3c2410_gpio_cfgpin(S3C2410_GPB5, S3C2410_GPIO_OUTPUT);
354 356
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
index 152527bb2872..c49126ccb1d5 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c
@@ -47,6 +47,7 @@
47#include <asm/mach-types.h> 47#include <asm/mach-types.h>
48 48
49#include <plat/regs-serial.h> 49#include <plat/regs-serial.h>
50#include <plat/iic.h>
50 51
51#include <plat/devs.h> 52#include <plat/devs.h>
52#include <plat/cpu.h> 53#include <plat/cpu.h>
@@ -89,7 +90,7 @@ static struct platform_device *smdk2410_devices[] __initdata = {
89 &s3c_device_usb, 90 &s3c_device_usb,
90 &s3c_device_lcd, 91 &s3c_device_lcd,
91 &s3c_device_wdt, 92 &s3c_device_wdt,
92 &s3c_device_i2c, 93 &s3c_device_i2c0,
93 &s3c_device_iis, 94 &s3c_device_iis,
94}; 95};
95 96
@@ -102,6 +103,7 @@ static void __init smdk2410_map_io(void)
102 103
103static void __init smdk2410_init(void) 104static void __init smdk2410_init(void)
104{ 105{
106 s3c_i2c0_set_platdata(NULL);
105 platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices)); 107 platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices));
106 smdk_machine_init(); 108 smdk_machine_init();
107} 109}
diff --git a/arch/arm/mach-s3c2410/mach-tct_hammer.c b/arch/arm/mach-s3c2410/mach-tct_hammer.c
index 309dcf4c870a..8fdb0430bd48 100644
--- a/arch/arm/mach-s3c2410/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c2410/mach-tct_hammer.c
@@ -45,6 +45,7 @@
45#include <asm/mach-types.h> 45#include <asm/mach-types.h>
46 46
47#include <plat/regs-serial.h> 47#include <plat/regs-serial.h>
48#include <plat/iic.h>
48#include <plat/devs.h> 49#include <plat/devs.h>
49#include <plat/cpu.h> 50#include <plat/cpu.h>
50 51
@@ -127,7 +128,7 @@ static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
127static struct platform_device *tct_hammer_devices[] __initdata = { 128static struct platform_device *tct_hammer_devices[] __initdata = {
128 &s3c_device_adc, 129 &s3c_device_adc,
129 &s3c_device_wdt, 130 &s3c_device_wdt,
130 &s3c_device_i2c, 131 &s3c_device_i2c0,
131 &s3c_device_usb, 132 &s3c_device_usb,
132 &s3c_device_rtc, 133 &s3c_device_rtc,
133 &s3c_device_usbgadget, 134 &s3c_device_usbgadget,
@@ -146,6 +147,7 @@ static void __init tct_hammer_map_io(void)
146 147
147static void __init tct_hammer_init(void) 148static void __init tct_hammer_init(void)
148{ 149{
150 s3c_i2c0_set_platdata(NULL);
149 platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices)); 151 platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
150} 152}
151 153
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index 941353af16dc..61a1ea9c5c5c 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -47,6 +47,7 @@
47#include <plat/clock.h> 47#include <plat/clock.h>
48#include <plat/devs.h> 48#include <plat/devs.h>
49#include <plat/cpu.h> 49#include <plat/cpu.h>
50#include <plat/iic.h>
50 51
51#include "usb-simtec.h" 52#include "usb-simtec.h"
52#include "nor-simtec.h" 53#include "nor-simtec.h"
@@ -334,7 +335,7 @@ static struct platform_device *vr1000_devices[] __initdata = {
334 &s3c_device_usb, 335 &s3c_device_usb,
335 &s3c_device_lcd, 336 &s3c_device_lcd,
336 &s3c_device_wdt, 337 &s3c_device_wdt,
337 &s3c_device_i2c, 338 &s3c_device_i2c0,
338 &s3c_device_adc, 339 &s3c_device_adc,
339 &serial_device, 340 &serial_device,
340 &vr1000_dm9k0, 341 &vr1000_dm9k0,
@@ -384,6 +385,7 @@ static void __init vr1000_map_io(void)
384 385
385static void __init vr1000_init(void) 386static void __init vr1000_init(void)
386{ 387{
388 s3c_i2c0_set_platdata(NULL);
387 platform_add_devices(vr1000_devices, ARRAY_SIZE(vr1000_devices)); 389 platform_add_devices(vr1000_devices, ARRAY_SIZE(vr1000_devices));
388 390
389 i2c_register_board_info(0, vr1000_i2c_devs, 391 i2c_register_board_info(0, vr1000_i2c_devs,