diff options
32 files changed, 491 insertions, 75 deletions
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 554731868b07..163b60e2af96 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -95,12 +95,19 @@ config PM_H1940 | |||
95 | config MACH_N30 | 95 | config MACH_N30 |
96 | bool "Acer N30 family" | 96 | bool "Acer N30 family" |
97 | select CPU_S3C2410 | 97 | select CPU_S3C2410 |
98 | select MACH_N35 | ||
98 | select S3C_DEV_USB_HOST | 99 | select S3C_DEV_USB_HOST |
99 | select S3C_DEV_NAND | 100 | select S3C_DEV_NAND |
100 | help | 101 | help |
101 | Say Y here if you want suppt for the Acer N30, Acer N35, | 102 | Say Y here if you want suppt for the Acer N30, Acer N35, |
102 | Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs. | 103 | Navman PiN570, Yakumo AlphaX or Airis NC05 PDAs. |
103 | 104 | ||
105 | config MACH_N35 | ||
106 | bool | ||
107 | help | ||
108 | Internal node in order to enable support for Acer N35 if Acer N30 is | ||
109 | selected. | ||
110 | |||
104 | config ARCH_BAST | 111 | config ARCH_BAST |
105 | bool "Simtec Electronics BAST (EB2410ITX)" | 112 | bool "Simtec Electronics BAST (EB2410ITX)" |
106 | select CPU_S3C2410 | 113 | select CPU_S3C2410 |
@@ -110,6 +117,7 @@ config ARCH_BAST | |||
110 | select MACH_BAST_IDE | 117 | select MACH_BAST_IDE |
111 | select S3C24XX_DCLK | 118 | select S3C24XX_DCLK |
112 | select ISA | 119 | select ISA |
120 | select S3C_DEV_HWMON | ||
113 | select S3C_DEV_USB_HOST | 121 | select S3C_DEV_USB_HOST |
114 | select S3C_DEV_NAND | 122 | select S3C_DEV_NAND |
115 | help | 123 | help |
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 02b1b6220cba..c8786df72b9e 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -634,7 +634,7 @@ static void __init bast_map_io(void) | |||
634 | 634 | ||
635 | s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); | 635 | s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); |
636 | 636 | ||
637 | s3c_device_hwmon.dev.platform_data = &bast_hwmon_info; | 637 | s3c_hwmon_set_platdata(&bast_hwmon_info); |
638 | 638 | ||
639 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); | 639 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); |
640 | s3c24xx_init_clocks(0); | 640 | s3c24xx_init_clocks(0); |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index fbedd0760941..03028b98f362 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -162,8 +162,8 @@ static struct s3c2410fb_display h1940_lcd __initdata = { | |||
162 | .xres = 240, | 162 | .xres = 240, |
163 | .yres = 320, | 163 | .yres = 320, |
164 | .bpp = 16, | 164 | .bpp = 16, |
165 | .left_margin = 20, | 165 | .left_margin = 8, |
166 | .right_margin = 8, | 166 | .right_margin = 20, |
167 | .hsync_len = 4, | 167 | .hsync_len = 4, |
168 | .upper_margin = 8, | 168 | .upper_margin = 8, |
169 | .lower_margin = 7, | 169 | .lower_margin = 7, |
@@ -271,7 +271,6 @@ static struct platform_device h1940_lcd_powerdev = { | |||
271 | }; | 271 | }; |
272 | 272 | ||
273 | static struct platform_device *h1940_devices[] __initdata = { | 273 | static struct platform_device *h1940_devices[] __initdata = { |
274 | &s3c_device_ts, | ||
275 | &s3c_device_ohci, | 274 | &s3c_device_ohci, |
276 | &s3c_device_lcd, | 275 | &s3c_device_lcd, |
277 | &s3c_device_wdt, | 276 | &s3c_device_wdt, |
@@ -285,6 +284,8 @@ static struct platform_device *h1940_devices[] __initdata = { | |||
285 | &s3c_device_timer[0], | 284 | &s3c_device_timer[0], |
286 | &h1940_backlight, | 285 | &h1940_backlight, |
287 | &h1940_lcd_powerdev, | 286 | &h1940_lcd_powerdev, |
287 | &s3c_device_adc, | ||
288 | &s3c_device_ts, | ||
288 | }; | 289 | }; |
289 | 290 | ||
290 | static void __init h1940_map_io(void) | 291 | static void __init h1940_map_io(void) |
@@ -337,7 +338,7 @@ static void __init h1940_init(void) | |||
337 | } | 338 | } |
338 | 339 | ||
339 | MACHINE_START(H1940, "IPAQ-H1940") | 340 | MACHINE_START(H1940, "IPAQ-H1940") |
340 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 341 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
341 | .phys_io = S3C2410_PA_UART, | 342 | .phys_io = S3C2410_PA_UART, |
342 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 343 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
343 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 344 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 684710f88142..9e2565ad973d 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/serial_core.h> | 26 | #include <linux/serial_core.h> |
27 | #include <linux/timer.h> | 27 | #include <linux/timer.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/mmc/host.h> | ||
29 | 30 | ||
30 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
@@ -46,6 +47,7 @@ | |||
46 | #include <plat/clock.h> | 47 | #include <plat/clock.h> |
47 | #include <plat/cpu.h> | 48 | #include <plat/cpu.h> |
48 | #include <plat/devs.h> | 49 | #include <plat/devs.h> |
50 | #include <plat/mci.h> | ||
49 | #include <plat/s3c2410.h> | 51 | #include <plat/s3c2410.h> |
50 | #include <plat/udc.h> | 52 | #include <plat/udc.h> |
51 | 53 | ||
@@ -86,10 +88,10 @@ static void n30_udc_pullup(enum s3c2410_udc_cmd_e cmd) | |||
86 | { | 88 | { |
87 | switch (cmd) { | 89 | switch (cmd) { |
88 | case S3C2410_UDC_P_ENABLE : | 90 | case S3C2410_UDC_P_ENABLE : |
89 | s3c2410_gpio_setpin(S3C2410_GPB(3), 1); | 91 | gpio_set_value(S3C2410_GPB(3), 1); |
90 | break; | 92 | break; |
91 | case S3C2410_UDC_P_DISABLE : | 93 | case S3C2410_UDC_P_DISABLE : |
92 | s3c2410_gpio_setpin(S3C2410_GPB(3), 0); | 94 | gpio_set_value(S3C2410_GPB(3), 0); |
93 | break; | 95 | break; |
94 | case S3C2410_UDC_P_RESET : | 96 | case S3C2410_UDC_P_RESET : |
95 | break; | 97 | break; |
@@ -172,8 +174,10 @@ static struct gpio_keys_button n35_buttons[] = { | |||
172 | { | 174 | { |
173 | .gpio = S3C2410_GPF(0), | 175 | .gpio = S3C2410_GPF(0), |
174 | .code = KEY_POWER, | 176 | .code = KEY_POWER, |
177 | .type = EV_PWR, | ||
175 | .desc = "Power", | 178 | .desc = "Power", |
176 | .active_low = 0, | 179 | .active_low = 0, |
180 | .wakeup = 1, | ||
177 | }, | 181 | }, |
178 | { | 182 | { |
179 | .gpio = S3C2410_GPG(9), | 183 | .gpio = S3C2410_GPG(9), |
@@ -264,6 +268,14 @@ static struct s3c24xx_led_platdata n30_blue_led_pdata = { | |||
264 | .def_trigger = "", | 268 | .def_trigger = "", |
265 | }; | 269 | }; |
266 | 270 | ||
271 | /* This is the blue LED on the device. Originaly used to indicate GPS activity | ||
272 | * by flashing. */ | ||
273 | static struct s3c24xx_led_platdata n35_blue_led_pdata = { | ||
274 | .name = "blue_led", | ||
275 | .gpio = S3C2410_GPD(8), | ||
276 | .def_trigger = "", | ||
277 | }; | ||
278 | |||
267 | /* This LED is driven by the battery microcontroller, and is blinking | 279 | /* This LED is driven by the battery microcontroller, and is blinking |
268 | * red, blinking green or solid green when the battery is low, | 280 | * red, blinking green or solid green when the battery is low, |
269 | * charging or full respectively. By driving GPD9 low, it's possible | 281 | * charging or full respectively. By driving GPD9 low, it's possible |
@@ -275,6 +287,13 @@ static struct s3c24xx_led_platdata n30_warning_led_pdata = { | |||
275 | .def_trigger = "", | 287 | .def_trigger = "", |
276 | }; | 288 | }; |
277 | 289 | ||
290 | static struct s3c24xx_led_platdata n35_warning_led_pdata = { | ||
291 | .name = "warning_led", | ||
292 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | ||
293 | .gpio = S3C2410_GPD(9), | ||
294 | .def_trigger = "", | ||
295 | }; | ||
296 | |||
278 | static struct platform_device n30_blue_led = { | 297 | static struct platform_device n30_blue_led = { |
279 | .name = "s3c24xx_led", | 298 | .name = "s3c24xx_led", |
280 | .id = 1, | 299 | .id = 1, |
@@ -283,6 +302,14 @@ static struct platform_device n30_blue_led = { | |||
283 | }, | 302 | }, |
284 | }; | 303 | }; |
285 | 304 | ||
305 | static struct platform_device n35_blue_led = { | ||
306 | .name = "s3c24xx_led", | ||
307 | .id = 1, | ||
308 | .dev = { | ||
309 | .platform_data = &n35_blue_led_pdata, | ||
310 | }, | ||
311 | }; | ||
312 | |||
286 | static struct platform_device n30_warning_led = { | 313 | static struct platform_device n30_warning_led = { |
287 | .name = "s3c24xx_led", | 314 | .name = "s3c24xx_led", |
288 | .id = 2, | 315 | .id = 2, |
@@ -291,6 +318,14 @@ static struct platform_device n30_warning_led = { | |||
291 | }, | 318 | }, |
292 | }; | 319 | }; |
293 | 320 | ||
321 | static struct platform_device n35_warning_led = { | ||
322 | .name = "s3c24xx_led", | ||
323 | .id = 2, | ||
324 | .dev = { | ||
325 | .platform_data = &n35_warning_led_pdata, | ||
326 | }, | ||
327 | }; | ||
328 | |||
294 | static struct s3c2410fb_display n30_display __initdata = { | 329 | static struct s3c2410fb_display n30_display __initdata = { |
295 | .type = S3C2410_LCDCON1_TFT, | 330 | .type = S3C2410_LCDCON1_TFT, |
296 | .width = 240, | 331 | .width = 240, |
@@ -317,13 +352,36 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = { | |||
317 | .lpcsel = 0x06, | 352 | .lpcsel = 0x06, |
318 | }; | 353 | }; |
319 | 354 | ||
355 | static void n30_sdi_set_power(unsigned char power_mode, unsigned short vdd) | ||
356 | { | ||
357 | switch (power_mode) { | ||
358 | case MMC_POWER_ON: | ||
359 | case MMC_POWER_UP: | ||
360 | gpio_set_value(S3C2410_GPG(4), 1); | ||
361 | break; | ||
362 | case MMC_POWER_OFF: | ||
363 | default: | ||
364 | gpio_set_value(S3C2410_GPG(4), 0); | ||
365 | break; | ||
366 | } | ||
367 | } | ||
368 | |||
369 | static struct s3c24xx_mci_pdata n30_mci_cfg __initdata = { | ||
370 | .gpio_detect = S3C2410_GPF(1), | ||
371 | .gpio_wprotect = S3C2410_GPG(10), | ||
372 | .ocr_avail = MMC_VDD_32_33, | ||
373 | .set_power = n30_sdi_set_power, | ||
374 | }; | ||
375 | |||
320 | static struct platform_device *n30_devices[] __initdata = { | 376 | static struct platform_device *n30_devices[] __initdata = { |
321 | &s3c_device_lcd, | 377 | &s3c_device_lcd, |
322 | &s3c_device_wdt, | 378 | &s3c_device_wdt, |
323 | &s3c_device_i2c0, | 379 | &s3c_device_i2c0, |
324 | &s3c_device_iis, | 380 | &s3c_device_iis, |
325 | &s3c_device_ohci, | 381 | &s3c_device_ohci, |
382 | &s3c_device_rtc, | ||
326 | &s3c_device_usbgadget, | 383 | &s3c_device_usbgadget, |
384 | &s3c_device_sdi, | ||
327 | &n30_button_device, | 385 | &n30_button_device, |
328 | &n30_blue_led, | 386 | &n30_blue_led, |
329 | &n30_warning_led, | 387 | &n30_warning_led, |
@@ -334,8 +392,12 @@ static struct platform_device *n35_devices[] __initdata = { | |||
334 | &s3c_device_wdt, | 392 | &s3c_device_wdt, |
335 | &s3c_device_i2c0, | 393 | &s3c_device_i2c0, |
336 | &s3c_device_iis, | 394 | &s3c_device_iis, |
395 | &s3c_device_rtc, | ||
337 | &s3c_device_usbgadget, | 396 | &s3c_device_usbgadget, |
397 | &s3c_device_sdi, | ||
338 | &n35_button_device, | 398 | &n35_button_device, |
399 | &n35_blue_led, | ||
400 | &n35_warning_led, | ||
339 | }; | 401 | }; |
340 | 402 | ||
341 | static struct s3c2410_platform_i2c __initdata n30_i2ccfg = { | 403 | static struct s3c2410_platform_i2c __initdata n30_i2ccfg = { |
@@ -490,17 +552,15 @@ static void __init n30_map_io(void) | |||
490 | s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); | 552 | s3c24xx_init_uarts(n30_uartcfgs, ARRAY_SIZE(n30_uartcfgs)); |
491 | } | 553 | } |
492 | 554 | ||
493 | static void __init n30_init_irq(void) | ||
494 | { | ||
495 | s3c24xx_init_irq(); | ||
496 | } | ||
497 | |||
498 | /* GPB3 is the line that controls the pull-up for the USB D+ line */ | 555 | /* GPB3 is the line that controls the pull-up for the USB D+ line */ |
499 | 556 | ||
500 | static void __init n30_init(void) | 557 | static void __init n30_init(void) |
501 | { | 558 | { |
559 | WARN_ON(gpio_request(S3C2410_GPG(4), "mmc power")); | ||
560 | |||
502 | s3c24xx_fb_set_platdata(&n30_fb_info); | 561 | s3c24xx_fb_set_platdata(&n30_fb_info); |
503 | s3c24xx_udc_set_platdata(&n30_udc_cfg); | 562 | s3c24xx_udc_set_platdata(&n30_udc_cfg); |
563 | s3c24xx_mci_set_platdata(&n30_mci_cfg); | ||
504 | s3c_i2c0_set_platdata(&n30_i2ccfg); | 564 | s3c_i2c0_set_platdata(&n30_i2ccfg); |
505 | 565 | ||
506 | /* Turn off suspend on both USB ports, and switch the | 566 | /* Turn off suspend on both USB ports, and switch the |
@@ -532,7 +592,7 @@ static void __init n30_init(void) | |||
532 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | | 592 | s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | |
533 | S3C2410_MISCCR_USBSUSPND0 | | 593 | S3C2410_MISCCR_USBSUSPND0 | |
534 | S3C2410_MISCCR_USBSUSPND1, | 594 | S3C2410_MISCCR_USBSUSPND1, |
535 | S3C2410_MISCCR_USBSUSPND1); | 595 | S3C2410_MISCCR_USBSUSPND0); |
536 | 596 | ||
537 | platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices)); | 597 | platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices)); |
538 | } | 598 | } |
@@ -547,7 +607,7 @@ MACHINE_START(N30, "Acer-N30") | |||
547 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 607 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
548 | .timer = &s3c24xx_timer, | 608 | .timer = &s3c24xx_timer, |
549 | .init_machine = n30_init, | 609 | .init_machine = n30_init, |
550 | .init_irq = n30_init_irq, | 610 | .init_irq = s3c24xx_init_irq, |
551 | .map_io = n30_map_io, | 611 | .map_io = n30_map_io, |
552 | MACHINE_END | 612 | MACHINE_END |
553 | 613 | ||
@@ -559,6 +619,6 @@ MACHINE_START(N35, "Acer-N35") | |||
559 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 619 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
560 | .timer = &s3c24xx_timer, | 620 | .timer = &s3c24xx_timer, |
561 | .init_machine = n30_init, | 621 | .init_machine = n30_init, |
562 | .init_irq = n30_init_irq, | 622 | .init_irq = s3c24xx_init_irq, |
563 | .map_io = n30_map_io, | 623 | .map_io = n30_map_io, |
564 | MACHINE_END | 624 | MACHINE_END |
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index 14f4798291aa..20647f09aed6 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -674,7 +674,7 @@ static void __init jive_machine_init(void) | |||
674 | } | 674 | } |
675 | 675 | ||
676 | MACHINE_START(JIVE, "JIVE") | 676 | MACHINE_START(JIVE, "JIVE") |
677 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 677 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
678 | .phys_io = S3C2410_PA_UART, | 678 | .phys_io = S3C2410_PA_UART, |
679 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 679 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
680 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 680 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c index 0392065af1af..3d41aa74c362 100644 --- a/arch/arm/mach-s3c2412/mach-smdk2413.c +++ b/arch/arm/mach-s3c2412/mach-smdk2413.c | |||
@@ -150,7 +150,7 @@ static void __init smdk2413_machine_init(void) | |||
150 | } | 150 | } |
151 | 151 | ||
152 | MACHINE_START(S3C2413, "S3C2413") | 152 | MACHINE_START(S3C2413, "S3C2413") |
153 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 153 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
154 | .phys_io = S3C2410_PA_UART, | 154 | .phys_io = S3C2410_PA_UART, |
155 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 155 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
156 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 156 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
@@ -163,7 +163,7 @@ MACHINE_START(S3C2413, "S3C2413") | |||
163 | MACHINE_END | 163 | MACHINE_END |
164 | 164 | ||
165 | MACHINE_START(SMDK2412, "SMDK2412") | 165 | MACHINE_START(SMDK2412, "SMDK2412") |
166 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 166 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
167 | .phys_io = S3C2410_PA_UART, | 167 | .phys_io = S3C2410_PA_UART, |
168 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 168 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
169 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 169 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
@@ -176,7 +176,7 @@ MACHINE_START(SMDK2412, "SMDK2412") | |||
176 | MACHINE_END | 176 | MACHINE_END |
177 | 177 | ||
178 | MACHINE_START(SMDK2413, "SMDK2413") | 178 | MACHINE_START(SMDK2413, "SMDK2413") |
179 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 179 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
180 | .phys_io = S3C2410_PA_UART, | 180 | .phys_io = S3C2410_PA_UART, |
181 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 181 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
182 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 182 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index 1e836e506f8b..d2946de3f365 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -209,7 +209,7 @@ static void __init rx3715_init_machine(void) | |||
209 | } | 209 | } |
210 | 210 | ||
211 | MACHINE_START(RX3715, "IPAQ-RX3715") | 211 | MACHINE_START(RX3715, "IPAQ-RX3715") |
212 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 212 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
213 | .phys_io = S3C2410_PA_UART, | 213 | .phys_io = S3C2410_PA_UART, |
214 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 214 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
215 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 215 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c index 3ac3d636d615..df83276d85ae 100644 --- a/arch/arm/mach-s3c2440/mach-smdk2440.c +++ b/arch/arm/mach-s3c2440/mach-smdk2440.c | |||
@@ -174,7 +174,7 @@ static void __init smdk2440_machine_init(void) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | MACHINE_START(S3C2440, "SMDK2440") | 176 | MACHINE_START(S3C2440, "SMDK2440") |
177 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 177 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
178 | .phys_io = S3C2410_PA_UART, | 178 | .phys_io = S3C2410_PA_UART, |
179 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 179 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
180 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 180 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c2443/mach-smdk2443.c b/arch/arm/mach-s3c2443/mach-smdk2443.c index e2e362bda9b7..4c863d3a52f4 100644 --- a/arch/arm/mach-s3c2443/mach-smdk2443.c +++ b/arch/arm/mach-s3c2443/mach-smdk2443.c | |||
@@ -131,7 +131,7 @@ static void __init smdk2443_machine_init(void) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | MACHINE_START(SMDK2443, "SMDK2443") | 133 | MACHINE_START(SMDK2443, "SMDK2443") |
134 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 134 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
135 | .phys_io = S3C2410_PA_UART, | 135 | .phys_io = S3C2410_PA_UART, |
136 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 136 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
137 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 137 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c index 33ccf7bf766a..5567e037b0d1 100644 --- a/arch/arm/mach-s3c64xx/dma.c +++ b/arch/arm/mach-s3c64xx/dma.c | |||
@@ -414,7 +414,7 @@ err_buff: | |||
414 | EXPORT_SYMBOL(s3c2410_dma_enqueue); | 414 | EXPORT_SYMBOL(s3c2410_dma_enqueue); |
415 | 415 | ||
416 | 416 | ||
417 | int s3c2410_dma_devconfig(int channel, | 417 | int s3c2410_dma_devconfig(unsigned int channel, |
418 | enum s3c2410_dmasrc source, | 418 | enum s3c2410_dmasrc source, |
419 | unsigned long devaddr) | 419 | unsigned long devaddr) |
420 | { | 420 | { |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c index f7b18983950c..59916676d8d2 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6400.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c | |||
@@ -84,7 +84,7 @@ static void __init smdk6400_machine_init(void) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | MACHINE_START(SMDK6400, "SMDK6400") | 86 | MACHINE_START(SMDK6400, "SMDK6400") |
87 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 87 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
88 | .phys_io = S3C_PA_UART & 0xfff00000, | 88 | .phys_io = S3C_PA_UART & 0xfff00000, |
89 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, | 89 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, |
90 | .boot_params = S3C64XX_PA_SDRAM + 0x100, | 90 | .boot_params = S3C64XX_PA_SDRAM + 0x100, |
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c index 2d5afd221d77..9d51455feb31 100644 --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c | |||
@@ -656,7 +656,7 @@ static void __init smdk6410_machine_init(void) | |||
656 | } | 656 | } |
657 | 657 | ||
658 | MACHINE_START(SMDK6410, "SMDK6410") | 658 | MACHINE_START(SMDK6410, "SMDK6410") |
659 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | 659 | /* Maintainer: Ben Dooks <ben-linux@fluff.org> */ |
660 | .phys_io = S3C_PA_UART & 0xfff00000, | 660 | .phys_io = S3C_PA_UART & 0xfff00000, |
661 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, | 661 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, |
662 | .boot_params = S3C64XX_PA_SDRAM + 0x100, | 662 | .boot_params = S3C64XX_PA_SDRAM + 0x100, |
diff --git a/arch/arm/mach-s5p6440/cpu.c b/arch/arm/mach-s5p6440/cpu.c index 1794131aeacb..ca3b3206e6f8 100644 --- a/arch/arm/mach-s5p6440/cpu.c +++ b/arch/arm/mach-s5p6440/cpu.c | |||
@@ -88,7 +88,7 @@ void __init s5p6440_init_irq(void) | |||
88 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 88 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
89 | } | 89 | } |
90 | 90 | ||
91 | static struct sysdev_class s5p6440_sysclass = { | 91 | struct sysdev_class s5p6440_sysclass = { |
92 | .name = "s5p6440-core", | 92 | .name = "s5p6440-core", |
93 | }; | 93 | }; |
94 | 94 | ||
diff --git a/arch/arm/mach-s5p6440/include/mach/pwm-clock.h b/arch/arm/mach-s5p6440/include/mach/pwm-clock.h index c4bb7c555477..6a2a02fdf12a 100644 --- a/arch/arm/mach-s5p6440/include/mach/pwm-clock.h +++ b/arch/arm/mach-s5p6440/include/mach/pwm-clock.h | |||
@@ -1,11 +1,14 @@ | |||
1 | /* linux/arch/arm/mach-s5p6440/include/mach/pwm-clock.h | 1 | /* linux/arch/arm/mach-s5p6440/include/mach/pwm-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
3 | * Copyright 2008 Simtec Electronics | 7 | * Copyright 2008 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 8 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 9 | * http://armlinux.simtec.co.uk/ |
6 | * | 10 | * |
7 | * Copyright 2009 Samsung Electronics Co., Ltd. | 11 | * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h |
8 | * http://www.samsung.com/ | ||
9 | * | 12 | * |
10 | * S5P6440 - pwm clock and timer support | 13 | * S5P6440 - pwm clock and timer support |
11 | * | 14 | * |
@@ -14,16 +17,19 @@ | |||
14 | * published by the Free Software Foundation. | 17 | * published by the Free Software Foundation. |
15 | */ | 18 | */ |
16 | 19 | ||
20 | #ifndef __ASM_ARCH_PWMCLK_H | ||
21 | #define __ASM_ARCH_PWMCLK_H __FILE__ | ||
22 | |||
17 | /** | 23 | /** |
18 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | 24 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk |
19 | * @cfg: The timer TCFG1 register bits shifted down to 0. | 25 | * @tcfg: The timer TCFG1 register bits shifted down to 0. |
20 | * | 26 | * |
21 | * Return true if the given configuration from TCFG1 is a TCLK instead | 27 | * Return true if the given configuration from TCFG1 is a TCLK instead |
22 | * any of the TDIV clocks. | 28 | * any of the TDIV clocks. |
23 | */ | 29 | */ |
24 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | 30 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) |
25 | { | 31 | { |
26 | return tcfg == S3C2410_TCFG1_MUX_TCLK; | 32 | return 0; |
27 | } | 33 | } |
28 | 34 | ||
29 | /** | 35 | /** |
@@ -35,7 +41,7 @@ static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | |||
35 | */ | 41 | */ |
36 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | 42 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) |
37 | { | 43 | { |
38 | return 1 << (1 + tcfg1); | 44 | return 1 << tcfg1; |
39 | } | 45 | } |
40 | 46 | ||
41 | /** | 47 | /** |
@@ -45,7 +51,7 @@ static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | |||
45 | */ | 51 | */ |
46 | static inline unsigned int pwm_tdiv_has_div1(void) | 52 | static inline unsigned int pwm_tdiv_has_div1(void) |
47 | { | 53 | { |
48 | return 0; | 54 | return 1; |
49 | } | 55 | } |
50 | 56 | ||
51 | /** | 57 | /** |
@@ -56,7 +62,9 @@ static inline unsigned int pwm_tdiv_has_div1(void) | |||
56 | */ | 62 | */ |
57 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | 63 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) |
58 | { | 64 | { |
59 | return ilog2(div) - 1; | 65 | return ilog2(div); |
60 | } | 66 | } |
61 | 67 | ||
62 | #define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK | 68 | #define S3C_TCFG1_MUX_TCLK 0 |
69 | |||
70 | #endif /* __ASM_ARCH_PWMCLK_H */ | ||
diff --git a/arch/arm/mach-s5p6442/cpu.c b/arch/arm/mach-s5p6442/cpu.c index bc2524df89b3..a48fb553fd01 100644 --- a/arch/arm/mach-s5p6442/cpu.c +++ b/arch/arm/mach-s5p6442/cpu.c | |||
@@ -95,7 +95,7 @@ void __init s5p6442_init_irq(void) | |||
95 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 95 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
96 | } | 96 | } |
97 | 97 | ||
98 | static struct sysdev_class s5p6442_sysclass = { | 98 | struct sysdev_class s5p6442_sysclass = { |
99 | .name = "s5p6442-core", | 99 | .name = "s5p6442-core", |
100 | }; | 100 | }; |
101 | 101 | ||
diff --git a/arch/arm/mach-s5p6442/include/mach/pwm-clock.h b/arch/arm/mach-s5p6442/include/mach/pwm-clock.h index 15e8525da0f1..2724b37def31 100644 --- a/arch/arm/mach-s5p6442/include/mach/pwm-clock.h +++ b/arch/arm/mach-s5p6442/include/mach/pwm-clock.h | |||
@@ -1,13 +1,14 @@ | |||
1 | /* linux/arch/arm/mach-s5p6442/include/mach/pwm-clock.h | 1 | /* linux/arch/arm/mach-s5p6442/include/mach/pwm-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
3 | * Copyright 2008 Simtec Electronics | 7 | * Copyright 2008 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 8 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 9 | * http://armlinux.simtec.co.uk/ |
6 | * | 10 | * |
7 | * Copyright 2010 Samsung Electronics Co., Ltd. | 11 | * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h |
8 | * http://www.samsung.com/ | ||
9 | * | ||
10 | * Based on arch/arm/plat-s3c24xx/include/mach/pwm-clock.h | ||
11 | * | 12 | * |
12 | * S5P6442 - pwm clock and timer support | 13 | * S5P6442 - pwm clock and timer support |
13 | * | 14 | * |
@@ -21,14 +22,14 @@ | |||
21 | 22 | ||
22 | /** | 23 | /** |
23 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | 24 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk |
24 | * @cfg: The timer TCFG1 register bits shifted down to 0. | 25 | * @tcfg: The timer TCFG1 register bits shifted down to 0. |
25 | * | 26 | * |
26 | * Return true if the given configuration from TCFG1 is a TCLK instead | 27 | * Return true if the given configuration from TCFG1 is a TCLK instead |
27 | * any of the TDIV clocks. | 28 | * any of the TDIV clocks. |
28 | */ | 29 | */ |
29 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | 30 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) |
30 | { | 31 | { |
31 | return tcfg == S3C2410_TCFG1_MUX_TCLK; | 32 | return tcfg == S3C64XX_TCFG1_MUX_TCLK; |
32 | } | 33 | } |
33 | 34 | ||
34 | /** | 35 | /** |
@@ -40,7 +41,7 @@ static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | |||
40 | */ | 41 | */ |
41 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | 42 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) |
42 | { | 43 | { |
43 | return 1 << (1 + tcfg1); | 44 | return 1 << tcfg1; |
44 | } | 45 | } |
45 | 46 | ||
46 | /** | 47 | /** |
@@ -50,7 +51,7 @@ static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | |||
50 | */ | 51 | */ |
51 | static inline unsigned int pwm_tdiv_has_div1(void) | 52 | static inline unsigned int pwm_tdiv_has_div1(void) |
52 | { | 53 | { |
53 | return 0; | 54 | return 1; |
54 | } | 55 | } |
55 | 56 | ||
56 | /** | 57 | /** |
@@ -61,9 +62,9 @@ static inline unsigned int pwm_tdiv_has_div1(void) | |||
61 | */ | 62 | */ |
62 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | 63 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) |
63 | { | 64 | { |
64 | return ilog2(div) - 1; | 65 | return ilog2(div); |
65 | } | 66 | } |
66 | 67 | ||
67 | #define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK | 68 | #define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK |
68 | 69 | ||
69 | #endif /* __ASM_ARCH_PWMCLK_H */ | 70 | #endif /* __ASM_ARCH_PWMCLK_H */ |
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile index 8ebf51c52a01..0acbdb34b560 100644 --- a/arch/arm/mach-s5pv210/Makefile +++ b/arch/arm/mach-s5pv210/Makefile | |||
@@ -12,7 +12,7 @@ obj- := | |||
12 | 12 | ||
13 | # Core support for S5PV210 system | 13 | # Core support for S5PV210 system |
14 | 14 | ||
15 | obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o | 15 | obj-$(CONFIG_CPU_S5PV210) += cpu.o init.o clock.o gpiolib.o |
16 | 16 | ||
17 | # machine support | 17 | # machine support |
18 | 18 | ||
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c index 0e0f8fde2aa6..2b776eb5d150 100644 --- a/arch/arm/mach-s5pv210/cpu.c +++ b/arch/arm/mach-s5pv210/cpu.c | |||
@@ -100,7 +100,7 @@ void __init s5pv210_init_irq(void) | |||
100 | s5p_init_irq(vic, ARRAY_SIZE(vic)); | 100 | s5p_init_irq(vic, ARRAY_SIZE(vic)); |
101 | } | 101 | } |
102 | 102 | ||
103 | static struct sysdev_class s5pv210_sysclass = { | 103 | struct sysdev_class s5pv210_sysclass = { |
104 | .name = "s5pv210-core", | 104 | .name = "s5pv210-core", |
105 | }; | 105 | }; |
106 | 106 | ||
diff --git a/arch/arm/mach-s5pv210/gpiolib.c b/arch/arm/mach-s5pv210/gpiolib.c new file mode 100644 index 000000000000..9ea8972e023d --- /dev/null +++ b/arch/arm/mach-s5pv210/gpiolib.c | |||
@@ -0,0 +1,261 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/gpiolib.c | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S5PV210 - GPIOlib support | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/irq.h> | ||
15 | #include <linux/io.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <plat/gpio-core.h> | ||
18 | #include <plat/gpio-cfg.h> | ||
19 | #include <plat/gpio-cfg-helpers.h> | ||
20 | #include <mach/map.h> | ||
21 | |||
22 | static struct s3c_gpio_cfg gpio_cfg = { | ||
23 | .set_config = s3c_gpio_setcfg_s3c64xx_4bit, | ||
24 | .set_pull = s3c_gpio_setpull_updown, | ||
25 | .get_pull = s3c_gpio_getpull_updown, | ||
26 | }; | ||
27 | |||
28 | static struct s3c_gpio_cfg gpio_cfg_noint = { | ||
29 | .set_config = s3c_gpio_setcfg_s3c64xx_4bit, | ||
30 | .set_pull = s3c_gpio_setpull_updown, | ||
31 | .get_pull = s3c_gpio_getpull_updown, | ||
32 | }; | ||
33 | |||
34 | /* GPIO bank's base address given the index of the bank in the | ||
35 | * list of all gpio banks. | ||
36 | */ | ||
37 | #define S5PV210_BANK_BASE(bank_nr) (S5P_VA_GPIO + ((bank_nr) * 0x20)) | ||
38 | |||
39 | /* | ||
40 | * Following are the gpio banks in v210. | ||
41 | * | ||
42 | * The 'config' member when left to NULL, is initialized to the default | ||
43 | * structure gpio_cfg in the init function below. | ||
44 | * | ||
45 | * The 'base' member is also initialized in the init function below. | ||
46 | * Note: The initialization of 'base' member of s3c_gpio_chip structure | ||
47 | * uses the above macro and depends on the banks being listed in order here. | ||
48 | */ | ||
49 | static struct s3c_gpio_chip s5pv210_gpio_4bit[] = { | ||
50 | { | ||
51 | .chip = { | ||
52 | .base = S5PV210_GPA0(0), | ||
53 | .ngpio = S5PV210_GPIO_A0_NR, | ||
54 | .label = "GPA0", | ||
55 | }, | ||
56 | }, { | ||
57 | .chip = { | ||
58 | .base = S5PV210_GPA1(0), | ||
59 | .ngpio = S5PV210_GPIO_A1_NR, | ||
60 | .label = "GPA1", | ||
61 | }, | ||
62 | }, { | ||
63 | .chip = { | ||
64 | .base = S5PV210_GPB(0), | ||
65 | .ngpio = S5PV210_GPIO_B_NR, | ||
66 | .label = "GPB", | ||
67 | }, | ||
68 | }, { | ||
69 | .chip = { | ||
70 | .base = S5PV210_GPC0(0), | ||
71 | .ngpio = S5PV210_GPIO_C0_NR, | ||
72 | .label = "GPC0", | ||
73 | }, | ||
74 | }, { | ||
75 | .chip = { | ||
76 | .base = S5PV210_GPC1(0), | ||
77 | .ngpio = S5PV210_GPIO_C1_NR, | ||
78 | .label = "GPC1", | ||
79 | }, | ||
80 | }, { | ||
81 | .chip = { | ||
82 | .base = S5PV210_GPD0(0), | ||
83 | .ngpio = S5PV210_GPIO_D0_NR, | ||
84 | .label = "GPD0", | ||
85 | }, | ||
86 | }, { | ||
87 | .chip = { | ||
88 | .base = S5PV210_GPD1(0), | ||
89 | .ngpio = S5PV210_GPIO_D1_NR, | ||
90 | .label = "GPD1", | ||
91 | }, | ||
92 | }, { | ||
93 | .chip = { | ||
94 | .base = S5PV210_GPE0(0), | ||
95 | .ngpio = S5PV210_GPIO_E0_NR, | ||
96 | .label = "GPE0", | ||
97 | }, | ||
98 | }, { | ||
99 | .chip = { | ||
100 | .base = S5PV210_GPE1(0), | ||
101 | .ngpio = S5PV210_GPIO_E1_NR, | ||
102 | .label = "GPE1", | ||
103 | }, | ||
104 | }, { | ||
105 | .chip = { | ||
106 | .base = S5PV210_GPF0(0), | ||
107 | .ngpio = S5PV210_GPIO_F0_NR, | ||
108 | .label = "GPF0", | ||
109 | }, | ||
110 | }, { | ||
111 | .chip = { | ||
112 | .base = S5PV210_GPF1(0), | ||
113 | .ngpio = S5PV210_GPIO_F1_NR, | ||
114 | .label = "GPF1", | ||
115 | }, | ||
116 | }, { | ||
117 | .chip = { | ||
118 | .base = S5PV210_GPF2(0), | ||
119 | .ngpio = S5PV210_GPIO_F2_NR, | ||
120 | .label = "GPF2", | ||
121 | }, | ||
122 | }, { | ||
123 | .chip = { | ||
124 | .base = S5PV210_GPF3(0), | ||
125 | .ngpio = S5PV210_GPIO_F3_NR, | ||
126 | .label = "GPF3", | ||
127 | }, | ||
128 | }, { | ||
129 | .chip = { | ||
130 | .base = S5PV210_GPG0(0), | ||
131 | .ngpio = S5PV210_GPIO_G0_NR, | ||
132 | .label = "GPG0", | ||
133 | }, | ||
134 | }, { | ||
135 | .chip = { | ||
136 | .base = S5PV210_GPG1(0), | ||
137 | .ngpio = S5PV210_GPIO_G1_NR, | ||
138 | .label = "GPG1", | ||
139 | }, | ||
140 | }, { | ||
141 | .chip = { | ||
142 | .base = S5PV210_GPG2(0), | ||
143 | .ngpio = S5PV210_GPIO_G2_NR, | ||
144 | .label = "GPG2", | ||
145 | }, | ||
146 | }, { | ||
147 | .chip = { | ||
148 | .base = S5PV210_GPG3(0), | ||
149 | .ngpio = S5PV210_GPIO_G3_NR, | ||
150 | .label = "GPG3", | ||
151 | }, | ||
152 | }, { | ||
153 | .chip = { | ||
154 | .base = S5PV210_GPI(0), | ||
155 | .ngpio = S5PV210_GPIO_I_NR, | ||
156 | .label = "GPI", | ||
157 | }, | ||
158 | }, { | ||
159 | .chip = { | ||
160 | .base = S5PV210_GPJ0(0), | ||
161 | .ngpio = S5PV210_GPIO_J0_NR, | ||
162 | .label = "GPJ0", | ||
163 | }, | ||
164 | }, { | ||
165 | .chip = { | ||
166 | .base = S5PV210_GPJ1(0), | ||
167 | .ngpio = S5PV210_GPIO_J1_NR, | ||
168 | .label = "GPJ1", | ||
169 | }, | ||
170 | }, { | ||
171 | .chip = { | ||
172 | .base = S5PV210_GPJ2(0), | ||
173 | .ngpio = S5PV210_GPIO_J2_NR, | ||
174 | .label = "GPJ2", | ||
175 | }, | ||
176 | }, { | ||
177 | .chip = { | ||
178 | .base = S5PV210_GPJ3(0), | ||
179 | .ngpio = S5PV210_GPIO_J3_NR, | ||
180 | .label = "GPJ3", | ||
181 | }, | ||
182 | }, { | ||
183 | .chip = { | ||
184 | .base = S5PV210_GPJ4(0), | ||
185 | .ngpio = S5PV210_GPIO_J4_NR, | ||
186 | .label = "GPJ4", | ||
187 | }, | ||
188 | }, { | ||
189 | .config = &gpio_cfg_noint, | ||
190 | .chip = { | ||
191 | .base = S5PV210_MP01(0), | ||
192 | .ngpio = S5PV210_GPIO_MP01_NR, | ||
193 | .label = "MP01", | ||
194 | }, | ||
195 | }, { | ||
196 | .config = &gpio_cfg_noint, | ||
197 | .chip = { | ||
198 | .base = S5PV210_MP02(0), | ||
199 | .ngpio = S5PV210_GPIO_MP02_NR, | ||
200 | .label = "MP02", | ||
201 | }, | ||
202 | }, { | ||
203 | .config = &gpio_cfg_noint, | ||
204 | .chip = { | ||
205 | .base = S5PV210_MP03(0), | ||
206 | .ngpio = S5PV210_GPIO_MP03_NR, | ||
207 | .label = "MP03", | ||
208 | }, | ||
209 | }, { | ||
210 | .base = (S5P_VA_GPIO + 0xC00), | ||
211 | .config = &gpio_cfg_noint, | ||
212 | .chip = { | ||
213 | .base = S5PV210_GPH0(0), | ||
214 | .ngpio = S5PV210_GPIO_H0_NR, | ||
215 | .label = "GPH0", | ||
216 | }, | ||
217 | }, { | ||
218 | .base = (S5P_VA_GPIO + 0xC20), | ||
219 | .config = &gpio_cfg_noint, | ||
220 | .chip = { | ||
221 | .base = S5PV210_GPH1(0), | ||
222 | .ngpio = S5PV210_GPIO_H1_NR, | ||
223 | .label = "GPH1", | ||
224 | }, | ||
225 | }, { | ||
226 | .base = (S5P_VA_GPIO + 0xC40), | ||
227 | .config = &gpio_cfg_noint, | ||
228 | .chip = { | ||
229 | .base = S5PV210_GPH2(0), | ||
230 | .ngpio = S5PV210_GPIO_H2_NR, | ||
231 | .label = "GPH2", | ||
232 | }, | ||
233 | }, { | ||
234 | .base = (S5P_VA_GPIO + 0xC60), | ||
235 | .config = &gpio_cfg_noint, | ||
236 | .chip = { | ||
237 | .base = S5PV210_GPH3(0), | ||
238 | .ngpio = S5PV210_GPIO_H3_NR, | ||
239 | .label = "GPH3", | ||
240 | }, | ||
241 | }, | ||
242 | }; | ||
243 | |||
244 | static __init int s5pv210_gpiolib_init(void) | ||
245 | { | ||
246 | struct s3c_gpio_chip *chip = s5pv210_gpio_4bit; | ||
247 | int nr_chips = ARRAY_SIZE(s5pv210_gpio_4bit); | ||
248 | int i = 0; | ||
249 | |||
250 | for (i = 0; i < nr_chips; i++, chip++) { | ||
251 | if (chip->config == NULL) | ||
252 | chip->config = &gpio_cfg; | ||
253 | if (chip->base == NULL) | ||
254 | chip->base = S5PV210_BANK_BASE(i); | ||
255 | } | ||
256 | |||
257 | samsung_gpiolib_add_4bit_chips(s5pv210_gpio_4bit, nr_chips); | ||
258 | |||
259 | return 0; | ||
260 | } | ||
261 | core_initcall(s5pv210_gpiolib_init); | ||
diff --git a/arch/arm/mach-s5pv210/include/mach/gpio.h b/arch/arm/mach-s5pv210/include/mach/gpio.h index 533b020e21e9..d6461ba2b71d 100644 --- a/arch/arm/mach-s5pv210/include/mach/gpio.h +++ b/arch/arm/mach-s5pv210/include/mach/gpio.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #define gpio_cansleep __gpio_cansleep | 18 | #define gpio_cansleep __gpio_cansleep |
19 | #define gpio_to_irq __gpio_to_irq | 19 | #define gpio_to_irq __gpio_to_irq |
20 | 20 | ||
21 | /* Practically, GPIO banks upto MP03 are the configurable gpio banks */ | ||
22 | |||
21 | /* GPIO bank sizes */ | 23 | /* GPIO bank sizes */ |
22 | #define S5PV210_GPIO_A0_NR (8) | 24 | #define S5PV210_GPIO_A0_NR (8) |
23 | #define S5PV210_GPIO_A1_NR (4) | 25 | #define S5PV210_GPIO_A1_NR (4) |
@@ -47,6 +49,10 @@ | |||
47 | #define S5PV210_GPIO_J3_NR (8) | 49 | #define S5PV210_GPIO_J3_NR (8) |
48 | #define S5PV210_GPIO_J4_NR (5) | 50 | #define S5PV210_GPIO_J4_NR (5) |
49 | 51 | ||
52 | #define S5PV210_GPIO_MP01_NR (8) | ||
53 | #define S5PV210_GPIO_MP02_NR (4) | ||
54 | #define S5PV210_GPIO_MP03_NR (8) | ||
55 | |||
50 | /* GPIO bank numbers */ | 56 | /* GPIO bank numbers */ |
51 | 57 | ||
52 | /* CONFIG_S3C_GPIO_SPACE allows the user to select extra | 58 | /* CONFIG_S3C_GPIO_SPACE allows the user to select extra |
@@ -85,6 +91,9 @@ enum s5p_gpio_number { | |||
85 | S5PV210_GPIO_J2_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J1), | 91 | S5PV210_GPIO_J2_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J1), |
86 | S5PV210_GPIO_J3_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J2), | 92 | S5PV210_GPIO_J3_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J2), |
87 | S5PV210_GPIO_J4_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J3), | 93 | S5PV210_GPIO_J4_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J3), |
94 | S5PV210_GPIO_MP01_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_J4), | ||
95 | S5PV210_GPIO_MP02_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP01), | ||
96 | S5PV210_GPIO_MP03_START = S5PV210_GPIO_NEXT(S5PV210_GPIO_MP02), | ||
88 | }; | 97 | }; |
89 | 98 | ||
90 | /* S5PV210 GPIO number definitions */ | 99 | /* S5PV210 GPIO number definitions */ |
@@ -115,13 +124,16 @@ enum s5p_gpio_number { | |||
115 | #define S5PV210_GPJ2(_nr) (S5PV210_GPIO_J2_START + (_nr)) | 124 | #define S5PV210_GPJ2(_nr) (S5PV210_GPIO_J2_START + (_nr)) |
116 | #define S5PV210_GPJ3(_nr) (S5PV210_GPIO_J3_START + (_nr)) | 125 | #define S5PV210_GPJ3(_nr) (S5PV210_GPIO_J3_START + (_nr)) |
117 | #define S5PV210_GPJ4(_nr) (S5PV210_GPIO_J4_START + (_nr)) | 126 | #define S5PV210_GPJ4(_nr) (S5PV210_GPIO_J4_START + (_nr)) |
127 | #define S5PV210_MP01(_nr) (S5PV210_GPIO_MP01_START + (_nr)) | ||
128 | #define S5PV210_MP02(_nr) (S5PV210_GPIO_MP02_START + (_nr)) | ||
129 | #define S5PV210_MP03(_nr) (S5PV210_GPIO_MP03_START + (_nr)) | ||
118 | 130 | ||
119 | /* the end of the S5PV210 specific gpios */ | 131 | /* the end of the S5PV210 specific gpios */ |
120 | #define S5PV210_GPIO_END (S5PV210_GPJ4(S5PV210_GPIO_J4_NR) + 1) | 132 | #define S5PV210_GPIO_END (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + 1) |
121 | #define S3C_GPIO_END S5PV210_GPIO_END | 133 | #define S3C_GPIO_END S5PV210_GPIO_END |
122 | 134 | ||
123 | /* define the number of gpios we need to the one after the GPJ4() range */ | 135 | /* define the number of gpios we need to the one after the MP03() range */ |
124 | #define ARCH_NR_GPIOS (S5PV210_GPJ4(S5PV210_GPIO_J4_NR) + \ | 136 | #define ARCH_NR_GPIOS (S5PV210_MP03(S5PV210_GPIO_MP03_NR) + \ |
125 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) | 137 | CONFIG_SAMSUNG_GPIO_EXTRA + 1) |
126 | 138 | ||
127 | #include <asm-generic/gpio.h> | 139 | #include <asm-generic/gpio.h> |
diff --git a/arch/arm/mach-s5pv210/include/mach/pwm-clock.h b/arch/arm/mach-s5pv210/include/mach/pwm-clock.h index 69027fea987a..f8a9f1b330e0 100644 --- a/arch/arm/mach-s5pv210/include/mach/pwm-clock.h +++ b/arch/arm/mach-s5pv210/include/mach/pwm-clock.h | |||
@@ -1,13 +1,14 @@ | |||
1 | /* linux/arch/arm/mach-s5pv210/include/mach/pwm-clock.h | 1 | /* linux/arch/arm/mach-s5pv210/include/mach/pwm-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * Copyright 2008 Openmoko, Inc. | ||
3 | * Copyright 2008 Simtec Electronics | 7 | * Copyright 2008 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 8 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 9 | * http://armlinux.simtec.co.uk/ |
6 | * | 10 | * |
7 | * Copyright (c) 2009 Samsung Electronics Co., Ltd. | 11 | * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h |
8 | * http://www.samsung.com/ | ||
9 | * | ||
10 | * Based on arch/arm/plat-s3c24xx/include/mach/pwm-clock.h | ||
11 | * | 12 | * |
12 | * S5PV210 - pwm clock and timer support | 13 | * S5PV210 - pwm clock and timer support |
13 | * | 14 | * |
@@ -21,14 +22,14 @@ | |||
21 | 22 | ||
22 | /** | 23 | /** |
23 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | 24 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk |
24 | * @cfg: The timer TCFG1 register bits shifted down to 0. | 25 | * @tcfg: The timer TCFG1 register bits shifted down to 0. |
25 | * | 26 | * |
26 | * Return true if the given configuration from TCFG1 is a TCLK instead | 27 | * Return true if the given configuration from TCFG1 is a TCLK instead |
27 | * any of the TDIV clocks. | 28 | * any of the TDIV clocks. |
28 | */ | 29 | */ |
29 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | 30 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) |
30 | { | 31 | { |
31 | return tcfg == S3C2410_TCFG1_MUX_TCLK; | 32 | return tcfg == S3C64XX_TCFG1_MUX_TCLK; |
32 | } | 33 | } |
33 | 34 | ||
34 | /** | 35 | /** |
@@ -40,7 +41,7 @@ static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | |||
40 | */ | 41 | */ |
41 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | 42 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) |
42 | { | 43 | { |
43 | return 1 << (1 + tcfg1); | 44 | return 1 << tcfg1; |
44 | } | 45 | } |
45 | 46 | ||
46 | /** | 47 | /** |
@@ -50,7 +51,7 @@ static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | |||
50 | */ | 51 | */ |
51 | static inline unsigned int pwm_tdiv_has_div1(void) | 52 | static inline unsigned int pwm_tdiv_has_div1(void) |
52 | { | 53 | { |
53 | return 0; | 54 | return 1; |
54 | } | 55 | } |
55 | 56 | ||
56 | /** | 57 | /** |
@@ -61,9 +62,9 @@ static inline unsigned int pwm_tdiv_has_div1(void) | |||
61 | */ | 62 | */ |
62 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | 63 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) |
63 | { | 64 | { |
64 | return ilog2(div) - 1; | 65 | return ilog2(div); |
65 | } | 66 | } |
66 | 67 | ||
67 | #define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK | 68 | #define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK |
68 | 69 | ||
69 | #endif /* __ASM_ARCH_PWMCLK_H */ | 70 | #endif /* __ASM_ARCH_PWMCLK_H */ |
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index 9265f09bfa58..cd5b41d0b5a4 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/string.h> | ||
24 | 25 | ||
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
@@ -149,10 +150,14 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) | |||
149 | { | 150 | { |
150 | struct s3c2410fb_mach_info *npd; | 151 | struct s3c2410fb_mach_info *npd; |
151 | 152 | ||
152 | npd = kmalloc(sizeof(*npd), GFP_KERNEL); | 153 | npd = kmemdup(pd, sizeof(*npd), GFP_KERNEL); |
153 | if (npd) { | 154 | if (npd) { |
154 | memcpy(npd, pd, sizeof(*npd)); | ||
155 | s3c_device_lcd.dev.platform_data = npd; | 155 | s3c_device_lcd.dev.platform_data = npd; |
156 | npd->displays = kmemdup(pd->displays, | ||
157 | sizeof(struct s3c2410fb_display) * npd->num_displays, | ||
158 | GFP_KERNEL); | ||
159 | if (!npd->displays) | ||
160 | printk(KERN_ERR "no memory for LCD display data\n"); | ||
156 | } else { | 161 | } else { |
157 | printk(KERN_ERR "no memory for LCD platform data\n"); | 162 | printk(KERN_ERR "no memory for LCD platform data\n"); |
158 | } | 163 | } |
@@ -338,14 +343,6 @@ struct platform_device s3c_device_adc = { | |||
338 | .resource = s3c_adc_resource, | 343 | .resource = s3c_adc_resource, |
339 | }; | 344 | }; |
340 | 345 | ||
341 | /* HWMON */ | ||
342 | |||
343 | struct platform_device s3c_device_hwmon = { | ||
344 | .name = "s3c-hwmon", | ||
345 | .id = -1, | ||
346 | .dev.parent = &s3c_device_adc.dev, | ||
347 | }; | ||
348 | |||
349 | /* SDI */ | 346 | /* SDI */ |
350 | 347 | ||
351 | static struct resource s3c_sdi_resource[] = { | 348 | static struct resource s3c_sdi_resource[] = { |
@@ -371,7 +368,7 @@ struct platform_device s3c_device_sdi = { | |||
371 | 368 | ||
372 | EXPORT_SYMBOL(s3c_device_sdi); | 369 | EXPORT_SYMBOL(s3c_device_sdi); |
373 | 370 | ||
374 | void s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata) | 371 | void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata) |
375 | { | 372 | { |
376 | struct s3c24xx_mci_pdata *npd; | 373 | struct s3c24xx_mci_pdata *npd; |
377 | 374 | ||
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 93827b3d4e84..6ad274e7593d 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -1104,7 +1104,7 @@ EXPORT_SYMBOL(s3c2410_dma_config); | |||
1104 | * devaddr: physical address of the source | 1104 | * devaddr: physical address of the source |
1105 | */ | 1105 | */ |
1106 | 1106 | ||
1107 | int s3c2410_dma_devconfig(int channel, | 1107 | int s3c2410_dma_devconfig(unsigned int channel, |
1108 | enum s3c2410_dmasrc source, | 1108 | enum s3c2410_dmasrc source, |
1109 | unsigned long devaddr) | 1109 | unsigned long devaddr) |
1110 | { | 1110 | { |
diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c index aa96e335073b..3fef951445dc 100644 --- a/arch/arm/plat-s5p/clock.c +++ b/arch/arm/plat-s5p/clock.c | |||
@@ -33,6 +33,11 @@ struct clk clk_ext_xtal_mux = { | |||
33 | .id = -1, | 33 | .id = -1, |
34 | }; | 34 | }; |
35 | 35 | ||
36 | struct clk clk_xusbxti = { | ||
37 | .name = "xusbxti", | ||
38 | .id = -1, | ||
39 | }; | ||
40 | |||
36 | static struct clk s5p_clk_27m = { | 41 | static struct clk s5p_clk_27m = { |
37 | .name = "clk_27m", | 42 | .name = "clk_27m", |
38 | .id = -1, | 43 | .id = -1, |
diff --git a/arch/arm/plat-s5p/include/plat/irqs.h b/arch/arm/plat-s5p/include/plat/irqs.h index 42e757f2e40c..9ff3d718be39 100644 --- a/arch/arm/plat-s5p/include/plat/irqs.h +++ b/arch/arm/plat-s5p/include/plat/irqs.h | |||
@@ -79,7 +79,7 @@ | |||
79 | #define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) | 79 | #define S5P_IRQ_VIC2(x) (S5P_VIC2_BASE + (x)) |
80 | #define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) | 80 | #define S5P_IRQ_VIC3(x) (S5P_VIC3_BASE + (x)) |
81 | 81 | ||
82 | #define S5P_TIMER_IRQ(x) S5P_IRQ(11 + (x)) | 82 | #define S5P_TIMER_IRQ(x) (11 + (x)) |
83 | 83 | ||
84 | #define IRQ_TIMER0 S5P_TIMER_IRQ(0) | 84 | #define IRQ_TIMER0 S5P_TIMER_IRQ(0) |
85 | #define IRQ_TIMER1 S5P_TIMER_IRQ(1) | 85 | #define IRQ_TIMER1 S5P_TIMER_IRQ(1) |
diff --git a/arch/arm/plat-s5p/include/plat/s5p-clock.h b/arch/arm/plat-s5p/include/plat/s5p-clock.h index 56fb8b414d41..a476a9f14697 100644 --- a/arch/arm/plat-s5p/include/plat/s5p-clock.h +++ b/arch/arm/plat-s5p/include/plat/s5p-clock.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define clk_fin_vpll clk_ext_xtal_mux | 23 | #define clk_fin_vpll clk_ext_xtal_mux |
24 | 24 | ||
25 | extern struct clk clk_ext_xtal_mux; | 25 | extern struct clk clk_ext_xtal_mux; |
26 | extern struct clk clk_xusbxti; | ||
26 | extern struct clk clk_48m; | 27 | extern struct clk clk_48m; |
27 | extern struct clk clk_fout_apll; | 28 | extern struct clk clk_fout_apll; |
28 | extern struct clk clk_fout_mpll; | 29 | extern struct clk clk_fout_mpll; |
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig index d552c65fa1b0..7a36cf85e138 100644 --- a/arch/arm/plat-samsung/Kconfig +++ b/arch/arm/plat-samsung/Kconfig | |||
@@ -160,6 +160,11 @@ config S3C_DEV_HSMMC2 | |||
160 | help | 160 | help |
161 | Compile in platform device definitions for HSMMC channel 2 | 161 | Compile in platform device definitions for HSMMC channel 2 |
162 | 162 | ||
163 | config S3C_DEV_HWMON | ||
164 | bool | ||
165 | help | ||
166 | Compile in platform device definitions for HWMON | ||
167 | |||
163 | config S3C_DEV_I2C1 | 168 | config S3C_DEV_I2C1 |
164 | bool | 169 | bool |
165 | help | 170 | help |
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile index 22c89d08f6e5..0ad820acc385 100644 --- a/arch/arm/plat-samsung/Makefile +++ b/arch/arm/plat-samsung/Makefile | |||
@@ -33,6 +33,7 @@ obj-$(CONFIG_S3C_ADC) += adc.o | |||
33 | obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o | 33 | obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o |
34 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o | 34 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o |
35 | obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o | 35 | obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o |
36 | obj-$(CONFIG_S3C_DEV_HWMON) += dev-hwmon.o | ||
36 | obj-y += dev-i2c0.o | 37 | obj-y += dev-i2c0.o |
37 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o | 38 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o |
38 | obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o | 39 | obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o |
diff --git a/arch/arm/plat-samsung/dev-hwmon.c b/arch/arm/plat-samsung/dev-hwmon.c new file mode 100644 index 000000000000..b3ffb9587250 --- /dev/null +++ b/arch/arm/plat-samsung/dev-hwmon.c | |||
@@ -0,0 +1,42 @@ | |||
1 | /* linux/arch/arm/plat-samsung/dev-hwmon.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * Adapted for HWMON by Maurus Cuelenaere | ||
8 | * | ||
9 | * Samsung series device definition for HWMON | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | #include <plat/devs.h> | ||
20 | #include <plat/hwmon.h> | ||
21 | |||
22 | struct platform_device s3c_device_hwmon = { | ||
23 | .name = "s3c-hwmon", | ||
24 | .id = -1, | ||
25 | .dev.parent = &s3c_device_adc.dev, | ||
26 | }; | ||
27 | |||
28 | void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd) | ||
29 | { | ||
30 | struct s3c_hwmon_pdata *npd; | ||
31 | |||
32 | if (!pd) { | ||
33 | printk(KERN_ERR "%s: no platform data\n", __func__); | ||
34 | return; | ||
35 | } | ||
36 | |||
37 | npd = kmemdup(pd, sizeof(struct s3c_hwmon_pdata), GFP_KERNEL); | ||
38 | if (!npd) | ||
39 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
40 | |||
41 | s3c_device_hwmon.dev.platform_data = npd; | ||
42 | } | ||
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h index d316b4a579f4..c54f318991b6 100644 --- a/arch/arm/plat-samsung/include/plat/cpu.h +++ b/arch/arm/plat-samsung/include/plat/cpu.h | |||
@@ -78,6 +78,9 @@ extern struct sysdev_class s3c2442_sysclass; | |||
78 | extern struct sysdev_class s3c2443_sysclass; | 78 | extern struct sysdev_class s3c2443_sysclass; |
79 | extern struct sysdev_class s3c6410_sysclass; | 79 | extern struct sysdev_class s3c6410_sysclass; |
80 | extern struct sysdev_class s3c64xx_sysclass; | 80 | extern struct sysdev_class s3c64xx_sysclass; |
81 | extern struct sysdev_class s5p6440_sysclass; | ||
82 | extern struct sysdev_class s5p6442_sysclass; | ||
83 | extern struct sysdev_class s5pv210_sysclass; | ||
81 | 84 | ||
82 | extern void (*s5pc1xx_idle)(void); | 85 | extern void (*s5pc1xx_idle)(void); |
83 | 86 | ||
diff --git a/arch/arm/plat-samsung/include/plat/dma.h b/arch/arm/plat-samsung/include/plat/dma.h index 7584d751ed51..2e8f8c6560d7 100644 --- a/arch/arm/plat-samsung/include/plat/dma.h +++ b/arch/arm/plat-samsung/include/plat/dma.h | |||
@@ -110,8 +110,8 @@ extern int s3c2410_dma_config(unsigned int channel, int xferunit); | |||
110 | * configure the device we're talking to | 110 | * configure the device we're talking to |
111 | */ | 111 | */ |
112 | 112 | ||
113 | extern int s3c2410_dma_devconfig(int channel, enum s3c2410_dmasrc source, | 113 | extern int s3c2410_dma_devconfig(unsigned int channel, |
114 | unsigned long devaddr); | 114 | enum s3c2410_dmasrc source, unsigned long devaddr); |
115 | 115 | ||
116 | /* s3c2410_dma_getposition | 116 | /* s3c2410_dma_getposition |
117 | * | 117 | * |
diff --git a/arch/arm/plat-samsung/include/plat/hwmon.h b/arch/arm/plat-samsung/include/plat/hwmon.h index 1ba88ea0aa31..c167e4429bc7 100644 --- a/arch/arm/plat-samsung/include/plat/hwmon.h +++ b/arch/arm/plat-samsung/include/plat/hwmon.h | |||
@@ -37,5 +37,15 @@ struct s3c_hwmon_pdata { | |||
37 | struct s3c_hwmon_chcfg *in[8]; | 37 | struct s3c_hwmon_chcfg *in[8]; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | /** | ||
41 | * s3c_hwmon_set_platdata - Set platform data for S3C HWMON device | ||
42 | * @pd: Platform data to register to device. | ||
43 | * | ||
44 | * Register the given platform data for use with the S3C HWMON device. | ||
45 | * The call will copy the platform data, so the board definitions can | ||
46 | * make the structure itself __initdata. | ||
47 | */ | ||
48 | extern void __init s3c_hwmon_set_platdata(struct s3c_hwmon_pdata *pd); | ||
49 | |||
40 | #endif /* __ASM_ARCH_ADC_HWMON_H */ | 50 | #endif /* __ASM_ARCH_ADC_HWMON_H */ |
41 | 51 | ||