diff options
Diffstat (limited to 'arch/mips/au1000/common/reset.c')
-rw-r--r-- | arch/mips/au1000/common/reset.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c index 60cec537c745..d555429c8d6f 100644 --- a/arch/mips/au1000/common/reset.c +++ b/arch/mips/au1000/common/reset.c | |||
@@ -1,11 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * |
3 | * BRIEF MODULE DESCRIPTION | 3 | * BRIEF MODULE DESCRIPTION |
4 | * Au1000 reset routines. | 4 | * Au1xx0 reset routines. |
5 | * | 5 | * |
6 | * Copyright 2001 MontaVista Software Inc. | 6 | * Copyright 2001, 2006, 2008 MontaVista Software Inc. |
7 | * Author: MontaVista Software, Inc. | 7 | * Author: MontaVista Software, Inc. <source@mvista.com> |
8 | * ppopov@mvista.com or source@mvista.com | ||
9 | * | 8 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 9 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 10 | * under the terms of the GNU General Public License as published by the |
@@ -28,10 +27,11 @@ | |||
28 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 27 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
29 | */ | 28 | */ |
30 | 29 | ||
30 | #include <asm/cacheflush.h> | ||
31 | |||
31 | #include <asm/mach-au1x00/au1000.h> | 32 | #include <asm/mach-au1x00/au1000.h> |
32 | 33 | ||
33 | extern int au_sleep(void); | 34 | extern int au_sleep(void); |
34 | extern void (*flush_cache_all)(void); | ||
35 | 35 | ||
36 | void au1000_restart(char *command) | 36 | void au1000_restart(char *command) |
37 | { | 37 | { |
@@ -40,8 +40,8 @@ void au1000_restart(char *command) | |||
40 | u32 prid = read_c0_prid(); | 40 | u32 prid = read_c0_prid(); |
41 | 41 | ||
42 | printk(KERN_NOTICE "\n** Resetting Integrated Peripherals\n"); | 42 | printk(KERN_NOTICE "\n** Resetting Integrated Peripherals\n"); |
43 | switch (prid & 0xFF000000) | 43 | |
44 | { | 44 | switch (prid & 0xFF000000) { |
45 | case 0x00000000: /* Au1000 */ | 45 | case 0x00000000: /* Au1000 */ |
46 | au_writel(0x02, 0xb0000010); /* ac97_enable */ | 46 | au_writel(0x02, 0xb0000010); /* ac97_enable */ |
47 | au_writel(0x08, 0xb017fffc); /* usbh_enable - early errata */ | 47 | au_writel(0x08, 0xb017fffc); /* usbh_enable - early errata */ |
@@ -138,9 +138,6 @@ void au1000_restart(char *command) | |||
138 | au_writel(0x00, 0xb1900064); /* sys_auxpll */ | 138 | au_writel(0x00, 0xb1900064); /* sys_auxpll */ |
139 | au_writel(0x00, 0xb1900100); /* sys_pininputen */ | 139 | au_writel(0x00, 0xb1900100); /* sys_pininputen */ |
140 | break; | 140 | break; |
141 | |||
142 | default: | ||
143 | break; | ||
144 | } | 141 | } |
145 | 142 | ||
146 | set_c0_status(ST0_BEV | ST0_ERL); | 143 | set_c0_status(ST0_BEV | ST0_ERL); |
@@ -158,25 +155,25 @@ void au1000_restart(char *command) | |||
158 | void au1000_halt(void) | 155 | void au1000_halt(void) |
159 | { | 156 | { |
160 | #if defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550) | 157 | #if defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550) |
161 | /* power off system */ | 158 | /* Power off system */ |
162 | printk("\n** Powering off...\n"); | 159 | printk(KERN_NOTICE "\n** Powering off...\n"); |
163 | au_writew(au_readw(0xAF00001C) | (3<<14), 0xAF00001C); | 160 | au_writew(au_readw(0xAF00001C) | (3 << 14), 0xAF00001C); |
164 | au_sync(); | 161 | au_sync(); |
165 | while(1); /* should not get here */ | 162 | while (1); /* should not get here */ |
166 | #else | 163 | #else |
167 | printk(KERN_NOTICE "\n** You can safely turn off the power\n"); | 164 | printk(KERN_NOTICE "\n** You can safely turn off the power\n"); |
168 | #ifdef CONFIG_MIPS_MIRAGE | 165 | #ifdef CONFIG_MIPS_MIRAGE |
169 | au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT); | 166 | au_writel((1 << 26) | (1 << 10), GPIO2_OUTPUT); |
170 | #endif | 167 | #endif |
171 | #ifdef CONFIG_MIPS_DB1200 | 168 | #ifdef CONFIG_MIPS_DB1200 |
172 | au_writew(au_readw(0xB980001C) | (1<<14), 0xB980001C); | 169 | au_writew(au_readw(0xB980001C) | (1 << 14), 0xB980001C); |
173 | #endif | 170 | #endif |
174 | #ifdef CONFIG_PM | 171 | #ifdef CONFIG_PM |
175 | au_sleep(); | 172 | au_sleep(); |
176 | 173 | ||
177 | /* should not get here */ | 174 | /* Should not get here */ |
178 | printk(KERN_ERR "Unable to put cpu in sleep mode\n"); | 175 | printk(KERN_ERR "Unable to put CPU in sleep mode\n"); |
179 | while(1); | 176 | while (1); |
180 | #else | 177 | #else |
181 | while (1) | 178 | while (1) |
182 | __asm__(".set\tmips3\n\t" | 179 | __asm__(".set\tmips3\n\t" |