diff options
author | Ben Dooks <ben-linux@fluff.org> | 2010-05-19 05:04:08 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-19 05:04:08 -0400 |
commit | ff1b8ba01dc80da338890a187c112fdd3c0b9202 (patch) | |
tree | 415999aa2c3ac52e48c2b6f690bba393e3d7a00c /arch/arm/mach-s3c2440 | |
parent | 5fcdb16bd04fdeb313ee33bb269b04e59a9abf91 (diff) | |
parent | 32b6cb3872883861f3a2669cce880f3a7ef8979a (diff) |
ARM: Merge for-2635/gpio2
Merge branch 'for-2635/gpio2' into for-linus/samsung2
Diffstat (limited to 'arch/arm/mach-s3c2440')
-rw-r--r-- | arch/arm/mach-s3c2440/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-mini2440.c | 23 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-nexcoder.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-osiris.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/s3c2440.c | 8 |
5 files changed, 29 insertions, 17 deletions
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig index a6c5df6d41ef..cd8e7de388f0 100644 --- a/arch/arm/mach-s3c2440/Kconfig +++ b/arch/arm/mach-s3c2440/Kconfig | |||
@@ -6,6 +6,7 @@ config CPU_S3C2440 | |||
6 | bool | 6 | bool |
7 | depends on ARCH_S3C2410 | 7 | depends on ARCH_S3C2410 |
8 | select CPU_ARM920T | 8 | select CPU_ARM920T |
9 | select S3C_GPIO_PULL_UP | ||
9 | select S3C2410_CLOCK | 10 | select S3C2410_CLOCK |
10 | select S3C2410_PM if PM | 11 | select S3C2410_PM if PM |
11 | select S3C2410_GPIO | 12 | select S3C2410_GPIO |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index 571b17683d96..a76bcda210ad 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/mtd/nand_ecc.h> | 53 | #include <linux/mtd/nand_ecc.h> |
54 | #include <linux/mtd/partitions.h> | 54 | #include <linux/mtd/partitions.h> |
55 | 55 | ||
56 | #include <plat/gpio-cfg.h> | ||
56 | #include <plat/clock.h> | 57 | #include <plat/clock.h> |
57 | #include <plat/devs.h> | 58 | #include <plat/devs.h> |
58 | #include <plat/cpu.h> | 59 | #include <plat/cpu.h> |
@@ -102,10 +103,10 @@ static void mini2440_udc_pullup(enum s3c2410_udc_cmd_e cmd) | |||
102 | 103 | ||
103 | switch (cmd) { | 104 | switch (cmd) { |
104 | case S3C2410_UDC_P_ENABLE : | 105 | case S3C2410_UDC_P_ENABLE : |
105 | s3c2410_gpio_setpin(S3C2410_GPC(5), 1); | 106 | gpio_set_value(S3C2410_GPC(5), 1); |
106 | break; | 107 | break; |
107 | case S3C2410_UDC_P_DISABLE : | 108 | case S3C2410_UDC_P_DISABLE : |
108 | s3c2410_gpio_setpin(S3C2410_GPC(5), 0); | 109 | gpio_set_value(S3C2410_GPC(5), 0); |
109 | break; | 110 | break; |
110 | case S3C2410_UDC_P_RESET : | 111 | case S3C2410_UDC_P_RESET : |
111 | break; | 112 | break; |
@@ -632,25 +633,25 @@ static void __init mini2440_init(void) | |||
632 | mini2440_parse_features(&features, mini2440_features_str); | 633 | mini2440_parse_features(&features, mini2440_features_str); |
633 | 634 | ||
634 | /* turn LCD on */ | 635 | /* turn LCD on */ |
635 | s3c2410_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND); | 636 | s3c_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND); |
636 | 637 | ||
637 | /* Turn the backlight early on */ | 638 | /* Turn the backlight early on */ |
638 | s3c2410_gpio_setpin(S3C2410_GPG(4), 1); | 639 | WARN_ON(gpio_request(S3C2410_GPG(4), "backlight")); |
639 | s3c2410_gpio_cfgpin(S3C2410_GPG(4), S3C2410_GPIO_OUTPUT); | 640 | gpio_direction_output(S3C2410_GPG(4), 1); |
640 | 641 | ||
641 | /* remove pullup on optional PWM backlight -- unused on 3.5 and 7"s */ | 642 | /* remove pullup on optional PWM backlight -- unused on 3.5 and 7"s */ |
642 | s3c2410_gpio_pullup(S3C2410_GPB(1), 0); | 643 | s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP); |
643 | s3c2410_gpio_setpin(S3C2410_GPB(1), 0); | 644 | s3c2410_gpio_setpin(S3C2410_GPB(1), 0); |
644 | s3c2410_gpio_cfgpin(S3C2410_GPB(1), S3C2410_GPIO_INPUT); | 645 | s3c_gpio_cfgpin(S3C2410_GPB(1), S3C2410_GPIO_INPUT); |
645 | 646 | ||
646 | /* Make sure the D+ pullup pin is output */ | 647 | /* Make sure the D+ pullup pin is output */ |
647 | s3c2410_gpio_cfgpin(S3C2410_GPC(5), S3C2410_GPIO_OUTPUT); | 648 | WARN_ON(gpio_request(S3C2410_GPC(5), "udc pup")); |
649 | gpio_direction_output(S3C2410_GPC(5), 0); | ||
648 | 650 | ||
649 | /* mark the key as input, without pullups (there is one on the board) */ | 651 | /* mark the key as input, without pullups (there is one on the board) */ |
650 | for (i = 0; i < ARRAY_SIZE(mini2440_buttons); i++) { | 652 | for (i = 0; i < ARRAY_SIZE(mini2440_buttons); i++) { |
651 | s3c2410_gpio_pullup(mini2440_buttons[i].gpio, 0); | 653 | s3c_gpio_setpull(mini2440_buttons[i].gpio, S3C_GPIO_PULL_UP); |
652 | s3c2410_gpio_cfgpin(mini2440_buttons[i].gpio, | 654 | s3c_gpio_cfgpin(mini2440_buttons[i].gpio, S3C2410_GPIO_INPUT); |
653 | S3C2410_GPIO_INPUT); | ||
654 | } | 655 | } |
655 | if (features.lcd_index != -1) { | 656 | if (features.lcd_index != -1) { |
656 | int li; | 657 | int li; |
diff --git a/arch/arm/mach-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c index 342041593f22..3ff62de45fde 100644 --- a/arch/arm/mach-s3c2440/mach-nexcoder.c +++ b/arch/arm/mach-s3c2440/mach-nexcoder.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <plat/regs-serial.h> | 40 | #include <plat/regs-serial.h> |
41 | #include <plat/iic.h> | 41 | #include <plat/iic.h> |
42 | 42 | ||
43 | #include <plat/gpio-cfg.h> | ||
43 | #include <plat/s3c2410.h> | 44 | #include <plat/s3c2410.h> |
44 | #include <plat/s3c244x.h> | 45 | #include <plat/s3c244x.h> |
45 | #include <plat/clock.h> | 46 | #include <plat/clock.h> |
@@ -122,15 +123,15 @@ static void __init nexcoder_sensorboard_init(void) | |||
122 | { | 123 | { |
123 | // Initialize SCCB bus | 124 | // Initialize SCCB bus |
124 | s3c2410_gpio_setpin(S3C2410_GPE(14), 1); // IICSCL | 125 | s3c2410_gpio_setpin(S3C2410_GPE(14), 1); // IICSCL |
125 | s3c2410_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPIO_OUTPUT); | 126 | s3c_gpio_cfgpin(S3C2410_GPE(14), S3C2410_GPIO_OUTPUT); |
126 | s3c2410_gpio_setpin(S3C2410_GPE(15), 1); // IICSDA | 127 | s3c2410_gpio_setpin(S3C2410_GPE(15), 1); // IICSDA |
127 | s3c2410_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPIO_OUTPUT); | 128 | s3c_gpio_cfgpin(S3C2410_GPE(15), S3C2410_GPIO_OUTPUT); |
128 | 129 | ||
129 | // Power up the sensor board | 130 | // Power up the sensor board |
130 | s3c2410_gpio_setpin(S3C2410_GPF(1), 1); | 131 | s3c2410_gpio_setpin(S3C2410_GPF(1), 1); |
131 | s3c2410_gpio_cfgpin(S3C2410_GPF(1), S3C2410_GPIO_OUTPUT); // CAM_GPIO7 => nLDO_PWRDN | 132 | s3c_gpio_cfgpin(S3C2410_GPF(1), S3C2410_GPIO_OUTPUT); // CAM_GPIO7 => nLDO_PWRDN |
132 | s3c2410_gpio_setpin(S3C2410_GPF(2), 0); | 133 | s3c2410_gpio_setpin(S3C2410_GPF(2), 0); |
133 | s3c2410_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); // CAM_GPIO6 => CAM_PWRDN | 134 | s3c_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); // CAM_GPIO6 => CAM_PWRDN |
134 | } | 135 | } |
135 | 136 | ||
136 | static void __init nexcoder_map_io(void) | 137 | static void __init nexcoder_map_io(void) |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index f35371db33f5..319458da71a0 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/mtd/nand_ecc.h> | 49 | #include <linux/mtd/nand_ecc.h> |
50 | #include <linux/mtd/partitions.h> | 50 | #include <linux/mtd/partitions.h> |
51 | 51 | ||
52 | #include <plat/gpio-cfg.h> | ||
52 | #include <plat/clock.h> | 53 | #include <plat/clock.h> |
53 | #include <plat/devs.h> | 54 | #include <plat/devs.h> |
54 | #include <plat/cpu.h> | 55 | #include <plat/cpu.h> |
@@ -298,7 +299,7 @@ static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state) | |||
298 | 299 | ||
299 | /* ensure that an nRESET is not generated on resume. */ | 300 | /* ensure that an nRESET is not generated on resume. */ |
300 | s3c2410_gpio_setpin(S3C2410_GPA(21), 1); | 301 | s3c2410_gpio_setpin(S3C2410_GPA(21), 1); |
301 | s3c2410_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPIO_OUTPUT); | 302 | s3c_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPIO_OUTPUT); |
302 | 303 | ||
303 | return 0; | 304 | return 0; |
304 | } | 305 | } |
@@ -310,7 +311,7 @@ static int osiris_pm_resume(struct sys_device *sd) | |||
310 | 311 | ||
311 | __raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0); | 312 | __raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0); |
312 | 313 | ||
313 | s3c2410_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPA21_nRSTOUT); | 314 | s3c_gpio_cfgpin(S3C2410_GPA(21), S3C2410_GPA21_nRSTOUT); |
314 | 315 | ||
315 | return 0; | 316 | return 0; |
316 | } | 317 | } |
diff --git a/arch/arm/mach-s3c2440/s3c2440.c b/arch/arm/mach-s3c2440/s3c2440.c index 2b68f7ea45ae..d50f3ae6173d 100644 --- a/arch/arm/mach-s3c2440/s3c2440.c +++ b/arch/arm/mach-s3c2440/s3c2440.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
21 | #include <linux/sysdev.h> | 21 | #include <linux/sysdev.h> |
22 | #include <linux/gpio.h> | ||
22 | #include <linux/clk.h> | 23 | #include <linux/clk.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | 25 | ||
@@ -33,6 +34,10 @@ | |||
33 | #include <plat/cpu.h> | 34 | #include <plat/cpu.h> |
34 | #include <plat/s3c244x.h> | 35 | #include <plat/s3c244x.h> |
35 | 36 | ||
37 | #include <plat/gpio-core.h> | ||
38 | #include <plat/gpio-cfg.h> | ||
39 | #include <plat/gpio-cfg-helpers.h> | ||
40 | |||
36 | static struct sys_device s3c2440_sysdev = { | 41 | static struct sys_device s3c2440_sysdev = { |
37 | .cls = &s3c2440_sysclass, | 42 | .cls = &s3c2440_sysclass, |
38 | }; | 43 | }; |
@@ -41,6 +46,9 @@ int __init s3c2440_init(void) | |||
41 | { | 46 | { |
42 | printk("S3C2440: Initialising architecture\n"); | 47 | printk("S3C2440: Initialising architecture\n"); |
43 | 48 | ||
49 | s3c24xx_gpiocfg_default.set_pull = s3c_gpio_setpull_1up; | ||
50 | s3c24xx_gpiocfg_default.get_pull = s3c_gpio_getpull_1up; | ||
51 | |||
44 | /* change irq for watchdog */ | 52 | /* change irq for watchdog */ |
45 | 53 | ||
46 | s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT; | 54 | s3c_device_wdt.resource[1].start = IRQ_S3C2440_WDT; |