diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2011-01-28 01:39:45 +0100 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-01-28 01:39:48 +0100 |
commit | ee54dba9c360944b34e06478c05c6f283bf64eda (patch) | |
tree | 78b52c057f5adb414582456217836ca14cd0b0d9 /arch/arm/mach-omap1/reset.c | |
parent | arm: mach-omap1: board-h3: make nand_platdata static (diff) | |
download | linux-ee54dba9c360944b34e06478c05c6f283bf64eda.tar.xz linux-ee54dba9c360944b34e06478c05c6f283bf64eda.zip |
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.c | 25 |
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 @@ +/* + * OMAP1 reset support + */ +#include <linux/kernel.h> +#include <linux/io.h> + +#include <mach/hardware.h> +#include <mach/system.h> +#include <plat/prcm.h> + +void omap1_arch_reset(char mode, const char *cmd) +{ + /* + * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 + * "Global Software Reset Affects Traffic Controller Frequency". + */ + if (cpu_is_omap5912()) { + omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL); + omap_writew(0x8, ARM_RSTCT1); + } + + omap_writew(1, ARM_RSTCT1); +} + +void (*arch_reset)(char, const char *) = omap1_arch_reset; |