summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-2.6.24/ts72xx/ts72xx-use-cpld-reset.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/linux/linux-2.6.24/ts72xx/ts72xx-use-cpld-reset.patch')
-rw-r--r--recipes/linux/linux-2.6.24/ts72xx/ts72xx-use-cpld-reset.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes/linux/linux-2.6.24/ts72xx/ts72xx-use-cpld-reset.patch b/recipes/linux/linux-2.6.24/ts72xx/ts72xx-use-cpld-reset.patch
new file mode 100644
index 0000000000..9744a67653
--- /dev/null
+++ b/recipes/linux/linux-2.6.24/ts72xx/ts72xx-use-cpld-reset.patch
@@ -0,0 +1,41 @@
+
+Use CPLD watchdog to reset the machine instead of buggy ep93xx one, which
+sometimes get stuck...
+
+Signed-off-by: Petr Stetiar <ynezz@true.cz>
+
+Index: linux-2.6.22/include/asm-arm/arch-ep93xx/system.h
+===================================================================
+--- linux-2.6.22.orig/include/asm-arm/arch-ep93xx/system.h 2007-08-30 00:53:47.000000000 +0200
++++ linux-2.6.22/include/asm-arm/arch-ep93xx/system.h 2007-08-30 00:54:28.000000000 +0200
+@@ -3,6 +3,7 @@
+ */
+
+ #include <asm/hardware.h>
++#include <asm/mach-types.h>
+
+ static inline void arch_idle(void)
+ {
+@@ -15,11 +16,17 @@
+
+ local_irq_disable();
+
+- devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
+- __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
+- __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
+- __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
+- __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
++ if (machine_is_ts72xx()) {
++ __raw_writeb(0x5, TS72XX_WATCHDOG_FEED_PHYS_BASE);
++ __raw_writeb(0x1, TS72XX_WATCHDOG_CONTROL_PHYS_BASE);
++ } else {
++ devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
++ __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
++ __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
++ __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
++ __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
++ }
++
+
+ while (1)
+ ;