diff options
author | Ben Dooks <ben-linux@fluff.org> | 2009-12-03 16:33:01 -0500 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-12-03 16:33:01 -0500 |
commit | f18ea8276bc6b0f8584c442905e9badc2acc8785 (patch) | |
tree | f71e3f05420f35f7eaf838d93fb83d665aedcac4 /arch/arm/mach-s3c2410 | |
parent | 3d4db84cee590dbf5b5fa49d8bcd9e1c60f2a4b5 (diff) | |
parent | 1a71e4ade19d51bab03b6837d4d33a953e4e1206 (diff) |
ARM: Merge next-s3c24xx-dev-rtp
Merge branch 'next-s3c24xx-dev-rtp' into for-rmk
Conflicts:
arch/arm/mach-s3c2440/mach-anubis.c
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r-- | arch/arm/mach-s3c2410/Kconfig | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/h1940-bluetooth.c | 88 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 105 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-n30.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-qt2410.c | 8 |
7 files changed, 162 insertions, 62 deletions
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 3d4e9da3fa52..dd1fcc7e6708 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -81,6 +81,14 @@ config ARCH_H1940 | |||
81 | help | 81 | help |
82 | Say Y here if you are using the HP IPAQ H1940 | 82 | Say Y here if you are using the HP IPAQ H1940 |
83 | 83 | ||
84 | config H1940BT | ||
85 | tristate "Control the state of H1940 bluetooth chip" | ||
86 | depends on ARCH_H1940 | ||
87 | select RFKILL | ||
88 | help | ||
89 | This is a simple driver that is able to control | ||
90 | the state of built in bluetooth chip on h1940. | ||
91 | |||
84 | config PM_H1940 | 92 | config PM_H1940 |
85 | bool | 93 | bool |
86 | help | 94 | help |
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 2ab5ba4b266f..0d468e96e83e 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
@@ -21,7 +21,8 @@ obj-$(CONFIG_S3C2410_PLLTABLE) += pll.o | |||
21 | # Machine support | 21 | # Machine support |
22 | 22 | ||
23 | obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o | 23 | obj-$(CONFIG_ARCH_SMDK2410) += mach-smdk2410.o |
24 | obj-$(CONFIG_ARCH_H1940) += mach-h1940.o h1940-bluetooth.o | 24 | obj-$(CONFIG_ARCH_H1940) += mach-h1940.o |
25 | obj-$(CONFIG_H1940BT) += h1940-bluetooth.o | ||
25 | obj-$(CONFIG_PM_H1940) += pm-h1940.o | 26 | obj-$(CONFIG_PM_H1940) += pm-h1940.o |
26 | obj-$(CONFIG_MACH_N30) += mach-n30.o | 27 | obj-$(CONFIG_MACH_N30) += mach-n30.o |
27 | obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o | 28 | obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o |
diff --git a/arch/arm/mach-s3c2410/h1940-bluetooth.c b/arch/arm/mach-s3c2410/h1940-bluetooth.c index 5aabf117cbb0..b7d1f8d27bc2 100644 --- a/arch/arm/mach-s3c2410/h1940-bluetooth.c +++ b/arch/arm/mach-s3c2410/h1940-bluetooth.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
18 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/rfkill.h> | ||
20 | 21 | ||
21 | #include <mach/regs-gpio.h> | 22 | #include <mach/regs-gpio.h> |
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
@@ -24,21 +25,10 @@ | |||
24 | 25 | ||
25 | #define DRV_NAME "h1940-bt" | 26 | #define DRV_NAME "h1940-bt" |
26 | 27 | ||
27 | #ifdef CONFIG_LEDS_H1940 | ||
28 | DEFINE_LED_TRIGGER(bt_led_trigger); | ||
29 | #endif | ||
30 | |||
31 | static int state; | ||
32 | |||
33 | /* Bluetooth control */ | 28 | /* Bluetooth control */ |
34 | static void h1940bt_enable(int on) | 29 | static void h1940bt_enable(int on) |
35 | { | 30 | { |
36 | if (on) { | 31 | if (on) { |
37 | #ifdef CONFIG_LEDS_H1940 | ||
38 | /* flashing Blue */ | ||
39 | led_trigger_event(bt_led_trigger, LED_HALF); | ||
40 | #endif | ||
41 | |||
42 | /* Power on the chip */ | 32 | /* Power on the chip */ |
43 | h1940_latch_control(0, H1940_LATCH_BLUETOOTH_POWER); | 33 | h1940_latch_control(0, H1940_LATCH_BLUETOOTH_POWER); |
44 | /* Reset the chip */ | 34 | /* Reset the chip */ |
@@ -46,48 +36,31 @@ static void h1940bt_enable(int on) | |||
46 | s3c2410_gpio_setpin(S3C2410_GPH(1), 1); | 36 | s3c2410_gpio_setpin(S3C2410_GPH(1), 1); |
47 | mdelay(10); | 37 | mdelay(10); |
48 | s3c2410_gpio_setpin(S3C2410_GPH(1), 0); | 38 | s3c2410_gpio_setpin(S3C2410_GPH(1), 0); |
49 | |||
50 | state = 1; | ||
51 | } | 39 | } |
52 | else { | 40 | else { |
53 | #ifdef CONFIG_LEDS_H1940 | ||
54 | led_trigger_event(bt_led_trigger, 0); | ||
55 | #endif | ||
56 | |||
57 | s3c2410_gpio_setpin(S3C2410_GPH(1), 1); | 41 | s3c2410_gpio_setpin(S3C2410_GPH(1), 1); |
58 | mdelay(10); | 42 | mdelay(10); |
59 | s3c2410_gpio_setpin(S3C2410_GPH(1), 0); | 43 | s3c2410_gpio_setpin(S3C2410_GPH(1), 0); |
60 | mdelay(10); | 44 | mdelay(10); |
61 | h1940_latch_control(H1940_LATCH_BLUETOOTH_POWER, 0); | 45 | h1940_latch_control(H1940_LATCH_BLUETOOTH_POWER, 0); |
62 | |||
63 | state = 0; | ||
64 | } | 46 | } |
65 | } | 47 | } |
66 | 48 | ||
67 | static ssize_t h1940bt_show(struct device *dev, struct device_attribute *attr, char *buf) | 49 | static int h1940bt_set_block(void *data, bool blocked) |
68 | { | 50 | { |
69 | return snprintf(buf, PAGE_SIZE, "%d\n", state); | 51 | h1940bt_enable(!blocked); |
52 | return 0; | ||
70 | } | 53 | } |
71 | 54 | ||
72 | static ssize_t h1940bt_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 55 | static const struct rfkill_ops h1940bt_rfkill_ops = { |
73 | { | 56 | .set_block = h1940bt_set_block, |
74 | int new_state; | 57 | }; |
75 | char *endp; | ||
76 | |||
77 | new_state = simple_strtoul(buf, &endp, 0); | ||
78 | if (*endp && !isspace(*endp)) | ||
79 | return -EINVAL; | ||
80 | |||
81 | h1940bt_enable(new_state); | ||
82 | |||
83 | return count; | ||
84 | } | ||
85 | static DEVICE_ATTR(enable, 0644, | ||
86 | h1940bt_show, | ||
87 | h1940bt_store); | ||
88 | 58 | ||
89 | static int __init h1940bt_probe(struct platform_device *pdev) | 59 | static int __init h1940bt_probe(struct platform_device *pdev) |
90 | { | 60 | { |
61 | struct rfkill *rfk; | ||
62 | int ret = 0; | ||
63 | |||
91 | /* Configures BT serial port GPIOs */ | 64 | /* Configures BT serial port GPIOs */ |
92 | s3c2410_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0); | 65 | s3c2410_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0); |
93 | s3c2410_gpio_pullup(S3C2410_GPH(0), 1); | 66 | s3c2410_gpio_pullup(S3C2410_GPH(0), 1); |
@@ -98,21 +71,44 @@ static int __init h1940bt_probe(struct platform_device *pdev) | |||
98 | s3c2410_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0); | 71 | s3c2410_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0); |
99 | s3c2410_gpio_pullup(S3C2410_GPH(3), 1); | 72 | s3c2410_gpio_pullup(S3C2410_GPH(3), 1); |
100 | 73 | ||
101 | #ifdef CONFIG_LEDS_H1940 | ||
102 | led_trigger_register_simple("h1940-bluetooth", &bt_led_trigger); | ||
103 | #endif | ||
104 | 74 | ||
105 | /* disable BT by default */ | 75 | rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH, |
106 | h1940bt_enable(0); | 76 | &h1940bt_rfkill_ops, NULL); |
77 | if (!rfk) { | ||
78 | ret = -ENOMEM; | ||
79 | goto err_rfk_alloc; | ||
80 | } | ||
81 | |||
82 | rfkill_set_led_trigger_name(rfk, "h1940-bluetooth"); | ||
83 | |||
84 | ret = rfkill_register(rfk); | ||
85 | if (ret) | ||
86 | goto err_rfkill; | ||
87 | |||
88 | platform_set_drvdata(pdev, rfk); | ||
89 | |||
90 | return 0; | ||
107 | 91 | ||
108 | return device_create_file(&pdev->dev, &dev_attr_enable); | 92 | err_rfkill: |
93 | rfkill_destroy(rfk); | ||
94 | err_rfk_alloc: | ||
95 | return ret; | ||
109 | } | 96 | } |
110 | 97 | ||
111 | static int h1940bt_remove(struct platform_device *pdev) | 98 | static int h1940bt_remove(struct platform_device *pdev) |
112 | { | 99 | { |
113 | #ifdef CONFIG_LEDS_H1940 | 100 | struct rfkill *rfk = platform_get_drvdata(pdev); |
114 | led_trigger_unregister_simple(bt_led_trigger); | 101 | |
115 | #endif | 102 | platform_set_drvdata(pdev, NULL); |
103 | |||
104 | if (rfk) { | ||
105 | rfkill_unregister(rfk); | ||
106 | rfkill_destroy(rfk); | ||
107 | } | ||
108 | rfk = NULL; | ||
109 | |||
110 | h1940bt_enable(0); | ||
111 | |||
116 | return 0; | 112 | return 0; |
117 | } | 113 | } |
118 | 114 | ||
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index c425eefb9f89..4c79ac8a6c33 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -248,7 +248,7 @@ static int chip0_map[] = { 1 }; | |||
248 | static int chip1_map[] = { 2 }; | 248 | static int chip1_map[] = { 2 }; |
249 | static int chip2_map[] = { 3 }; | 249 | static int chip2_map[] = { 3 }; |
250 | 250 | ||
251 | static struct mtd_partition bast_default_nand_part[] = { | 251 | static struct mtd_partition __initdata bast_default_nand_part[] = { |
252 | [0] = { | 252 | [0] = { |
253 | .name = "Boot Agent", | 253 | .name = "Boot Agent", |
254 | .size = SZ_16K, | 254 | .size = SZ_16K, |
@@ -274,7 +274,7 @@ static struct mtd_partition bast_default_nand_part[] = { | |||
274 | * socket. | 274 | * socket. |
275 | */ | 275 | */ |
276 | 276 | ||
277 | static struct s3c2410_nand_set bast_nand_sets[] = { | 277 | static struct s3c2410_nand_set __initdata bast_nand_sets[] = { |
278 | [0] = { | 278 | [0] = { |
279 | .name = "SmartMedia", | 279 | .name = "SmartMedia", |
280 | .nr_chips = 1, | 280 | .nr_chips = 1, |
@@ -324,7 +324,7 @@ static void bast_nand_select(struct s3c2410_nand_set *set, int slot) | |||
324 | __raw_writeb(tmp, BAST_VA_CTRL2); | 324 | __raw_writeb(tmp, BAST_VA_CTRL2); |
325 | } | 325 | } |
326 | 326 | ||
327 | static struct s3c2410_platform_nand bast_nand_info = { | 327 | static struct s3c2410_platform_nand __initdata bast_nand_info = { |
328 | .tacls = 30, | 328 | .tacls = 30, |
329 | .twrph0 = 60, | 329 | .twrph0 = 60, |
330 | .twrph1 = 60, | 330 | .twrph1 = 60, |
@@ -631,7 +631,6 @@ static void __init bast_map_io(void) | |||
631 | 631 | ||
632 | s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); | 632 | s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); |
633 | 633 | ||
634 | s3c_device_nand.dev.platform_data = &bast_nand_info; | ||
635 | s3c_device_hwmon.dev.platform_data = &bast_hwmon_info; | 634 | s3c_device_hwmon.dev.platform_data = &bast_hwmon_info; |
636 | 635 | ||
637 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); | 636 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); |
@@ -645,6 +644,7 @@ static void __init bast_init(void) | |||
645 | sysdev_register(&bast_pm_sysdev); | 644 | sysdev_register(&bast_pm_sysdev); |
646 | 645 | ||
647 | s3c_i2c0_set_platdata(&bast_i2c_info); | 646 | s3c_i2c0_set_platdata(&bast_i2c_info); |
647 | s3c_nand_set_platdata(&bast_nand_info); | ||
648 | s3c24xx_fb_set_platdata(&bast_fb_info); | 648 | s3c24xx_fb_set_platdata(&bast_fb_info); |
649 | platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); | 649 | platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); |
650 | 650 | ||
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index d9cd5ddecf4a..49053254c98d 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -21,6 +21,11 @@ | |||
21 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/gpio.h> | ||
25 | #include <linux/pwm_backlight.h> | ||
26 | #include <video/platform_lcd.h> | ||
27 | |||
28 | #include <linux/mmc/host.h> | ||
24 | 29 | ||
25 | #include <asm/mach/arch.h> | 30 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
@@ -32,9 +37,12 @@ | |||
32 | 37 | ||
33 | #include <plat/regs-serial.h> | 38 | #include <plat/regs-serial.h> |
34 | #include <mach/regs-lcd.h> | 39 | #include <mach/regs-lcd.h> |
35 | #include <mach/regs-gpio.h> | ||
36 | #include <mach/regs-clock.h> | 40 | #include <mach/regs-clock.h> |
37 | 41 | ||
42 | #include <mach/regs-gpio.h> | ||
43 | #include <mach/gpio-fns.h> | ||
44 | #include <mach/gpio-nrs.h> | ||
45 | |||
38 | #include <mach/h1940.h> | 46 | #include <mach/h1940.h> |
39 | #include <mach/h1940-latch.h> | 47 | #include <mach/h1940-latch.h> |
40 | #include <mach/fb.h> | 48 | #include <mach/fb.h> |
@@ -46,6 +54,7 @@ | |||
46 | #include <plat/cpu.h> | 54 | #include <plat/cpu.h> |
47 | #include <plat/pll.h> | 55 | #include <plat/pll.h> |
48 | #include <plat/pm.h> | 56 | #include <plat/pm.h> |
57 | #include <plat/mci.h> | ||
49 | 58 | ||
50 | static struct map_desc h1940_iodesc[] __initdata = { | 59 | static struct map_desc h1940_iodesc[] __initdata = { |
51 | [0] = { | 60 | [0] = { |
@@ -171,16 +180,90 @@ static struct s3c2410fb_mach_info h1940_fb_info __initdata = { | |||
171 | .gpdup_mask= 0xffffffff, | 180 | .gpdup_mask= 0xffffffff, |
172 | }; | 181 | }; |
173 | 182 | ||
174 | static struct platform_device s3c_device_leds = { | 183 | static struct platform_device h1940_device_leds = { |
175 | .name = "h1940-leds", | 184 | .name = "h1940-leds", |
176 | .id = -1, | 185 | .id = -1, |
177 | }; | 186 | }; |
178 | 187 | ||
179 | static struct platform_device s3c_device_bluetooth = { | 188 | static struct platform_device h1940_device_bluetooth = { |
180 | .name = "h1940-bt", | 189 | .name = "h1940-bt", |
181 | .id = -1, | 190 | .id = -1, |
182 | }; | 191 | }; |
183 | 192 | ||
193 | static struct s3c24xx_mci_pdata h1940_mmc_cfg = { | ||
194 | .gpio_detect = S3C2410_GPF(5), | ||
195 | .gpio_wprotect = S3C2410_GPH(8), | ||
196 | .set_power = NULL, | ||
197 | .ocr_avail = MMC_VDD_32_33, | ||
198 | }; | ||
199 | |||
200 | static int h1940_backlight_init(struct device *dev) | ||
201 | { | ||
202 | gpio_request(S3C2410_GPB(0), "Backlight"); | ||
203 | |||
204 | s3c2410_gpio_setpin(S3C2410_GPB(0), 0); | ||
205 | s3c2410_gpio_pullup(S3C2410_GPB(0), 0); | ||
206 | s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPB0_TOUT0); | ||
207 | |||
208 | return 0; | ||
209 | } | ||
210 | |||
211 | static void h1940_backlight_exit(struct device *dev) | ||
212 | { | ||
213 | s3c2410_gpio_cfgpin(S3C2410_GPB(0), 1/*S3C2410_GPB0_OUTP*/); | ||
214 | } | ||
215 | |||
216 | static struct platform_pwm_backlight_data backlight_data = { | ||
217 | .pwm_id = 0, | ||
218 | .max_brightness = 100, | ||
219 | .dft_brightness = 50, | ||
220 | /* tcnt = 0x31 */ | ||
221 | .pwm_period_ns = 36296, | ||
222 | .init = h1940_backlight_init, | ||
223 | .exit = h1940_backlight_exit, | ||
224 | }; | ||
225 | |||
226 | static struct platform_device h1940_backlight = { | ||
227 | .name = "pwm-backlight", | ||
228 | .dev = { | ||
229 | .parent = &s3c_device_timer[0].dev, | ||
230 | .platform_data = &backlight_data, | ||
231 | }, | ||
232 | .id = -1, | ||
233 | }; | ||
234 | |||
235 | static void h1940_lcd_power_set(struct plat_lcd_data *pd, | ||
236 | unsigned int power) | ||
237 | { | ||
238 | int value; | ||
239 | |||
240 | if (!power) { | ||
241 | /* set to 3ec */ | ||
242 | s3c2410_gpio_setpin(S3C2410_GPC(0), 0); | ||
243 | /* wait for 3ac */ | ||
244 | do { | ||
245 | value = s3c2410_gpio_getpin(S3C2410_GPC(6)); | ||
246 | } while (value); | ||
247 | /* set to 38c */ | ||
248 | s3c2410_gpio_setpin(S3C2410_GPC(5), 0); | ||
249 | } else { | ||
250 | /* Set to 3ac */ | ||
251 | s3c2410_gpio_setpin(S3C2410_GPC(5), 1); | ||
252 | /* Set to 3ad */ | ||
253 | s3c2410_gpio_setpin(S3C2410_GPC(0), 1); | ||
254 | } | ||
255 | } | ||
256 | |||
257 | static struct plat_lcd_data h1940_lcd_power_data = { | ||
258 | .set_power = h1940_lcd_power_set, | ||
259 | }; | ||
260 | |||
261 | static struct platform_device h1940_lcd_powerdev = { | ||
262 | .name = "platform-lcd", | ||
263 | .dev.parent = &s3c_device_lcd.dev, | ||
264 | .dev.platform_data = &h1940_lcd_power_data, | ||
265 | }; | ||
266 | |||
184 | static struct platform_device *h1940_devices[] __initdata = { | 267 | static struct platform_device *h1940_devices[] __initdata = { |
185 | &s3c_device_usb, | 268 | &s3c_device_usb, |
186 | &s3c_device_lcd, | 269 | &s3c_device_lcd, |
@@ -188,8 +271,13 @@ static struct platform_device *h1940_devices[] __initdata = { | |||
188 | &s3c_device_i2c0, | 271 | &s3c_device_i2c0, |
189 | &s3c_device_iis, | 272 | &s3c_device_iis, |
190 | &s3c_device_usbgadget, | 273 | &s3c_device_usbgadget, |
191 | &s3c_device_leds, | 274 | &h1940_device_leds, |
192 | &s3c_device_bluetooth, | 275 | &h1940_device_bluetooth, |
276 | &s3c_device_sdi, | ||
277 | &s3c_device_rtc, | ||
278 | &s3c_device_timer[0], | ||
279 | &h1940_backlight, | ||
280 | &h1940_lcd_powerdev, | ||
193 | }; | 281 | }; |
194 | 282 | ||
195 | static void __init h1940_map_io(void) | 283 | static void __init h1940_map_io(void) |
@@ -219,6 +307,8 @@ static void __init h1940_init(void) | |||
219 | s3c24xx_udc_set_platdata(&h1940_udc_cfg); | 307 | s3c24xx_udc_set_platdata(&h1940_udc_cfg); |
220 | s3c_i2c0_set_platdata(NULL); | 308 | s3c_i2c0_set_platdata(NULL); |
221 | 309 | ||
310 | s3c_device_sdi.dev.platform_data = &h1940_mmc_cfg; | ||
311 | |||
222 | /* Turn off suspend on both USB ports, and switch the | 312 | /* Turn off suspend on both USB ports, and switch the |
223 | * selectable USB port to USB device mode. */ | 313 | * selectable USB port to USB device mode. */ |
224 | 314 | ||
@@ -231,6 +321,11 @@ static void __init h1940_init(void) | |||
231 | | (0x03 << S3C24XX_PLLCON_SDIVSHIFT); | 321 | | (0x03 << S3C24XX_PLLCON_SDIVSHIFT); |
232 | writel(tmp, S3C2410_UPLLCON); | 322 | writel(tmp, S3C2410_UPLLCON); |
233 | 323 | ||
324 | gpio_request(S3C2410_GPC(0), "LCD power"); | ||
325 | gpio_request(S3C2410_GPC(5), "LCD power"); | ||
326 | gpio_request(S3C2410_GPC(6), "LCD power"); | ||
327 | |||
328 | |||
234 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); | 329 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); |
235 | } | 330 | } |
236 | 331 | ||
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 0f6ed61af415..0405712c2263 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -338,7 +338,7 @@ static struct platform_device *n35_devices[] __initdata = { | |||
338 | &n35_button_device, | 338 | &n35_button_device, |
339 | }; | 339 | }; |
340 | 340 | ||
341 | static struct s3c2410_platform_i2c n30_i2ccfg = { | 341 | static struct s3c2410_platform_i2c __initdata n30_i2ccfg = { |
342 | .flags = 0, | 342 | .flags = 0, |
343 | .slave_addr = 0x10, | 343 | .slave_addr = 0x10, |
344 | .frequency = 10*1000, | 344 | .frequency = 10*1000, |
@@ -500,8 +500,8 @@ static void __init n30_init_irq(void) | |||
500 | static void __init n30_init(void) | 500 | static void __init n30_init(void) |
501 | { | 501 | { |
502 | s3c24xx_fb_set_platdata(&n30_fb_info); | 502 | s3c24xx_fb_set_platdata(&n30_fb_info); |
503 | s3c_device_i2c0.dev.platform_data = &n30_i2ccfg; | ||
504 | s3c24xx_udc_set_platdata(&n30_udc_cfg); | 503 | s3c24xx_udc_set_platdata(&n30_udc_cfg); |
504 | s3c_i2c0_set_platdata(&n30_i2ccfg); | ||
505 | 505 | ||
506 | /* Turn off suspend on both USB ports, and switch the | 506 | /* Turn off suspend on both USB ports, and switch the |
507 | * selectable USB port to USB device mode. */ | 507 | * selectable USB port to USB device mode. */ |
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c index 2cc9849eb448..ab092bcda393 100644 --- a/arch/arm/mach-s3c2410/mach-qt2410.c +++ b/arch/arm/mach-s3c2410/mach-qt2410.c | |||
@@ -258,7 +258,7 @@ static struct platform_device *qt2410_devices[] __initdata = { | |||
258 | &qt2410_led, | 258 | &qt2410_led, |
259 | }; | 259 | }; |
260 | 260 | ||
261 | static struct mtd_partition qt2410_nand_part[] = { | 261 | static struct mtd_partition __initdata qt2410_nand_part[] = { |
262 | [0] = { | 262 | [0] = { |
263 | .name = "U-Boot", | 263 | .name = "U-Boot", |
264 | .size = 0x30000, | 264 | .size = 0x30000, |
@@ -286,7 +286,7 @@ static struct mtd_partition qt2410_nand_part[] = { | |||
286 | }, | 286 | }, |
287 | }; | 287 | }; |
288 | 288 | ||
289 | static struct s3c2410_nand_set qt2410_nand_sets[] = { | 289 | static struct s3c2410_nand_set __initdata qt2410_nand_sets[] = { |
290 | [0] = { | 290 | [0] = { |
291 | .name = "NAND", | 291 | .name = "NAND", |
292 | .nr_chips = 1, | 292 | .nr_chips = 1, |
@@ -299,7 +299,7 @@ static struct s3c2410_nand_set qt2410_nand_sets[] = { | |||
299 | * chips and beyond. | 299 | * chips and beyond. |
300 | */ | 300 | */ |
301 | 301 | ||
302 | static struct s3c2410_platform_nand qt2410_nand_info = { | 302 | static struct s3c2410_platform_nand __initdata qt2410_nand_info = { |
303 | .tacls = 20, | 303 | .tacls = 20, |
304 | .twrph0 = 60, | 304 | .twrph0 = 60, |
305 | .twrph1 = 20, | 305 | .twrph1 = 20, |
@@ -331,7 +331,7 @@ static void __init qt2410_map_io(void) | |||
331 | 331 | ||
332 | static void __init qt2410_machine_init(void) | 332 | static void __init qt2410_machine_init(void) |
333 | { | 333 | { |
334 | s3c_device_nand.dev.platform_data = &qt2410_nand_info; | 334 | s3c_nand_set_platdata(&qt2410_nand_info); |
335 | 335 | ||
336 | switch (tft_type) { | 336 | switch (tft_type) { |
337 | case 'p': /* production */ | 337 | case 'p': /* production */ |