diff options
| -rw-r--r-- | arch/arm/mach-pxa/include/mach/reset.h | 9 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/reset.c | 9 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/spitz.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-pxa/tosa.c | 2 |
4 files changed, 14 insertions, 8 deletions
diff --git a/arch/arm/mach-pxa/include/mach/reset.h b/arch/arm/mach-pxa/include/mach/reset.h index 9489a48871a8..7b8842cfa5fc 100644 --- a/arch/arm/mach-pxa/include/mach/reset.h +++ b/arch/arm/mach-pxa/include/mach/reset.h | |||
| @@ -10,9 +10,12 @@ | |||
| 10 | extern unsigned int reset_status; | 10 | extern unsigned int reset_status; |
| 11 | extern void clear_reset_status(unsigned int mask); | 11 | extern void clear_reset_status(unsigned int mask); |
| 12 | 12 | ||
| 13 | /* | 13 | /** |
| 14 | * register GPIO as reset generator | 14 | * init_gpio_reset() - register GPIO as reset generator |
| 15 | * | ||
| 16 | * @gpio - gpio nr | ||
| 17 | * @output - set gpio as out/low instead of input during normal work | ||
| 15 | */ | 18 | */ |
| 16 | extern int init_gpio_reset(int gpio); | 19 | extern int init_gpio_reset(int gpio, int output); |
| 17 | 20 | ||
| 18 | #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 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 | } |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 9b4f24c7c055..524f656dc56d 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
| @@ -618,7 +618,7 @@ static void spitz_restart(char mode) | |||
| 618 | 618 | ||
| 619 | static void __init common_init(void) | 619 | static void __init common_init(void) |
| 620 | { | 620 | { |
| 621 | init_gpio_reset(SPITZ_GPIO_ON_RESET); | 621 | init_gpio_reset(SPITZ_GPIO_ON_RESET, 1); |
| 622 | pm_power_off = spitz_poweroff; | 622 | pm_power_off = spitz_poweroff; |
| 623 | arm_pm_restart = spitz_restart; | 623 | arm_pm_restart = spitz_restart; |
| 624 | 624 | ||
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 9f3ef9eb32e3..130e37e4ebdd 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
| @@ -781,7 +781,7 @@ static void __init tosa_init(void) | |||
| 781 | gpio_set_wake(MFP_PIN_GPIO1, 1); | 781 | gpio_set_wake(MFP_PIN_GPIO1, 1); |
| 782 | /* We can't pass to gpio-keys since it will drop the Reset altfunc */ | 782 | /* We can't pass to gpio-keys since it will drop the Reset altfunc */ |
| 783 | 783 | ||
| 784 | init_gpio_reset(TOSA_GPIO_ON_RESET); | 784 | init_gpio_reset(TOSA_GPIO_ON_RESET, 0); |
| 785 | 785 | ||
| 786 | pm_power_off = tosa_poweroff; | 786 | pm_power_off = tosa_poweroff; |
| 787 | arm_pm_restart = tosa_restart; | 787 | arm_pm_restart = tosa_restart; |
