summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap1/reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/reset.c')
-rw-r--r--arch/arm/mach-omap1/reset.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
new file mode 100644
index 00000000..f255b153
--- /dev/null
+++ b/arch/arm/mach-omap1/reset.c
@@ -0,0 +1,23 @@
+/*
+ * OMAP1 reset support
+ */
+#include <linux/kernel.h>
+#include <linux/io.h>
+
+#include <plat/prcm.h>
+
+#include <mach/hardware.h>
+
+void omap1_restart(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);
+}