aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorDaniel Ribeiro <drwyrm@gmail.com>2009-05-05 21:43:18 -0400
committerEric Miao <eric.miao@marvell.com>2009-05-18 09:52:09 -0400
commit216e3b7abbd05c35d2d1a3f86629ade485351f0d (patch)
treefe89595dba787748fe311721cebd6a6101255752 /arch/arm
parent818bc814447a35350ae90a329133e474bf1a2bd7 (diff)
[ARM] pxa: allow gpio_reset drive high during normal work
I want to reuse tosa/spitz gpio_reset code, but my board needs the reset gpio to be driven high during normal operation. Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com> Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/include/mach/reset.h5
-rw-r--r--arch/arm/mach-pxa/reset.c4
-rw-r--r--arch/arm/mach-pxa/spitz.c2
-rw-r--r--arch/arm/mach-pxa/tosa.c2
4 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/include/mach/reset.h b/arch/arm/mach-pxa/include/mach/reset.h
index 31e6a7b6ad80..b6c10556fbc7 100644
--- a/arch/arm/mach-pxa/include/mach/reset.h
+++ b/arch/arm/mach-pxa/include/mach/reset.h
@@ -13,8 +13,9 @@ extern void clear_reset_status(unsigned int mask);
13/** 13/**
14 * init_gpio_reset() - register GPIO as reset generator 14 * init_gpio_reset() - register GPIO as reset generator
15 * @gpio: gpio nr 15 * @gpio: gpio nr
16 * @output: set gpio as out/low instead of input during normal work 16 * @output: set gpio as output instead of input during normal work
17 * @level: output level
17 */ 18 */
18extern int init_gpio_reset(int gpio, int output); 19extern int init_gpio_reset(int gpio, int output, int level);
19 20
20#endif /* __ASM_ARCH_RESET_H */ 21#endif /* __ASM_ARCH_RESET_H */
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
index df29d45fb4e7..01e9d643394a 100644
--- a/arch/arm/mach-pxa/reset.c
+++ b/arch/arm/mach-pxa/reset.c
@@ -20,7 +20,7 @@ static void do_hw_reset(void);
20 20
21static int reset_gpio = -1; 21static int reset_gpio = -1;
22 22
23int init_gpio_reset(int gpio, int output) 23int init_gpio_reset(int gpio, int output, int level)
24{ 24{
25 int rc; 25 int rc;
26 26
@@ -31,7 +31,7 @@ int init_gpio_reset(int gpio, int output)
31 } 31 }
32 32
33 if (output) 33 if (output)
34 rc = gpio_direction_output(gpio, 0); 34 rc = gpio_direction_output(gpio, level);
35 else 35 else
36 rc = gpio_direction_input(gpio); 36 rc = gpio_direction_input(gpio);
37 if (rc) { 37 if (rc) {
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index c18e34acafcb..cdacea09abfa 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -731,7 +731,7 @@ static void spitz_restart(char mode, const char *cmd)
731 731
732static void __init common_init(void) 732static void __init common_init(void)
733{ 733{
734 init_gpio_reset(SPITZ_GPIO_ON_RESET, 1); 734 init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
735 pm_power_off = spitz_poweroff; 735 pm_power_off = spitz_poweroff;
736 arm_pm_restart = spitz_restart; 736 arm_pm_restart = spitz_restart;
737 737
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index afac5b6d3d78..a0bd46ef5d30 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -897,7 +897,7 @@ static void __init tosa_init(void)
897 gpio_set_wake(MFP_PIN_GPIO1, 1); 897 gpio_set_wake(MFP_PIN_GPIO1, 1);
898 /* We can't pass to gpio-keys since it will drop the Reset altfunc */ 898 /* We can't pass to gpio-keys since it will drop the Reset altfunc */
899 899
900 init_gpio_reset(TOSA_GPIO_ON_RESET, 0); 900 init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0);
901 901
902 pm_power_off = tosa_poweroff; 902 pm_power_off = tosa_poweroff;
903 arm_pm_restart = tosa_restart; 903 arm_pm_restart = tosa_restart;