aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/reset.c
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2011-01-27 19:39:45 -0500
committerTony Lindgren <tony@atomide.com>2011-01-27 19:39:48 -0500
commitee54dba9c360944b34e06478c05c6f283bf64eda (patch)
tree78b52c057f5adb414582456217836ca14cd0b0d9 /arch/arm/mach-omap1/reset.c
parent277a28567fe928bd94e9953a187002f5041c34a4 (diff)
ARM: OMAP: Allow platforms to hook reset cleanly
This adds a clean method to allow platforms to hook into the reset code if they require to. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/reset.c')
-rw-r--r--arch/arm/mach-omap1/reset.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
new file mode 100644
index 000000000000..ad951ee69205
--- /dev/null
+++ b/arch/arm/mach-omap1/reset.c
@@ -0,0 +1,25 @@
1/*
2 * OMAP1 reset support
3 */
4#include <linux/kernel.h>
5#include <linux/io.h>
6
7#include <mach/hardware.h>
8#include <mach/system.h>
9#include <plat/prcm.h>
10
11void omap1_arch_reset(char mode, const char *cmd)
12{
13 /*
14 * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28
15 * "Global Software Reset Affects Traffic Controller Frequency".
16 */
17 if (cpu_is_omap5912()) {
18 omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL);
19 omap_writew(0x8, ARM_RSTCT1);
20 }
21
22 omap_writew(1, ARM_RSTCT1);
23}
24
25void (*arch_reset)(char, const char *) = omap1_arch_reset;