merge of '7393275c6ccce67cadeb49d4afb3459e56edf8a9'
[vuplus_openembedded] / packages / linux / linux-rp-2.6.24 / tosa / 0057-Clean-up-tosa-resetting.patch
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
5
6 Use new gpio-assertion reset.
7
8 Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
9 ---
10  arch/arm/mach-pxa/tosa.c |   16 +++++++---------
11  1 files changed, 7 insertions(+), 9 deletions(-)
12
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
17 @@ -41,6 +41,8 @@
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>
23  
24  #include <asm/mach/arch.h>
25  #include <asm/mach/map.h>
26 @@ -489,13 +491,7 @@ static struct platform_device *devices[] __initdata = {
27  
28  static void tosa_poweroff(void)
29  {
30 -       RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
31 -
32 -       pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT);
33 -       GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET);
34 -
35 -       mdelay(1000);
36 -       arm_machine_restart('h');
37 +       arm_machine_restart('g');
38  }
39  
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;
44  
45 -       tosa_poweroff();
46 +       arm_machine_restart('g');
47  }
48  
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;
53  
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);
57  
58 @@ -544,6 +539,9 @@ static void __init fixup_tosa(struct machine_desc *desc,
59         mi->bank[0].start = 0xa0000000;
60         mi->bank[0].node = 0;
61         mi->bank[0].size = (64*1024*1024);
62 +
63 +       if (reset_gpio == -1)
64 +               reset_gpio = TOSA_GPIO_ON_RESET;
65  }
66  
67  MACHINE_START(TOSA, "SHARP Tosa")
68 -- 
69 1.5.3.8
70