1 From a6f03929fa4d20cef339dbed7ef5cd1e040d0548 Mon Sep 17 00:00:00 2001
2 From: Dmitry Baryshkov <dbaryshkov@gmail.com>
3 Date: Sun, 20 Jan 2008 02:48:07 +0300
4 Subject: [PATCH 57/64] Clean up tosa resetting
6 Use new gpio-assertion reset.
8 Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
10 arch/arm/mach-pxa/tosa.c | 16 +++++++---------
11 1 files changed, 7 insertions(+), 9 deletions(-)
13 diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
14 index d1cf3dc..2b4aef7 100644
15 --- a/arch/arm/mach-pxa/tosa.c
16 +++ b/arch/arm/mach-pxa/tosa.c
18 #include <asm/arch/irda.h>
19 #include <asm/arch/mmc.h>
20 #include <asm/arch/udc.h>
21 +#include <asm/arch/pm.h>
22 +#include <asm/arch/system.h>
24 #include <asm/mach/arch.h>
25 #include <asm/mach/map.h>
26 @@ -489,13 +491,7 @@ static struct platform_device *devices[] __initdata = {
28 static void tosa_poweroff(void)
30 - RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
32 - pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT);
33 - GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET);
36 - arm_machine_restart('h');
37 + arm_machine_restart('g');
40 static void tosa_restart(char mode)
41 @@ -504,7 +500,7 @@ static void tosa_restart(char mode)
42 if((MSC0 & 0xffff0000) == 0x7ff00000)
43 MSC0 = (MSC0 & 0xffff) | 0x7ee00000;
46 + arm_machine_restart('g');
49 static void __init tosa_init(void)
50 @@ -512,7 +508,6 @@ static void __init tosa_init(void)
51 pm_power_off = tosa_poweroff;
52 arm_pm_restart = tosa_restart;
54 - pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
55 pxa_gpio_mode(TOSA_GPIO_TC6393XB_INT | GPIO_IN);
56 pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
58 @@ -544,6 +539,9 @@ static void __init fixup_tosa(struct machine_desc *desc,
59 mi->bank[0].start = 0xa0000000;
61 mi->bank[0].size = (64*1024*1024);
63 + if (reset_gpio == -1)
64 + reset_gpio = TOSA_GPIO_ON_RESET;
67 MACHINE_START(TOSA, "SHARP Tosa")