diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2008-10-09 11:58:13 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-11 04:52:38 -0400 |
commit | 69fc7eed5f56bce15b239e5110de2575a6970df4 (patch) | |
tree | def52983185ffcea4da23cb747f10ee39c1b3396 /arch/arm/mach-pxa/reset.c | |
parent | 6defd90433729c2d795865165cb34d938d8ff07c (diff) |
[ARM] 5300/1: fixup spitz reset during boot
Some machines don't have the pullup/down on their reset
pin, so configuring the reset generating pin as input makes
them reset immediately. Fix that by making reset pin direction
configurable.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/reset.c')
-rw-r--r-- | arch/arm/mach-pxa/reset.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c index 31d78855aac8..1b2af575c40f 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 | ||
21 | static int reset_gpio = -1; | 21 | static int reset_gpio = -1; |
22 | 22 | ||
23 | int init_gpio_reset(int gpio) | 23 | int init_gpio_reset(int gpio, int output) |
24 | { | 24 | { |
25 | int rc; | 25 | int rc; |
26 | 26 | ||
@@ -30,9 +30,12 @@ int init_gpio_reset(int gpio) | |||
30 | goto out; | 30 | goto out; |
31 | } | 31 | } |
32 | 32 | ||
33 | rc = gpio_direction_input(gpio); | 33 | if (output) |
34 | rc = gpio_direction_output(gpio, 0); | ||
35 | else | ||
36 | rc = gpio_direction_input(gpio); | ||
34 | if (rc) { | 37 | if (rc) { |
35 | printk(KERN_ERR "Can't configure reset_gpio for input\n"); | 38 | printk(KERN_ERR "Can't configure reset_gpio\n"); |
36 | gpio_free(gpio); | 39 | gpio_free(gpio); |
37 | goto out; | 40 | goto out; |
38 | } | 41 | } |