summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ep93xx/include
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2017-02-02 12:12:26 -0800
committerArnd Bergmann <arnd@arndb.de>2017-02-07 16:02:34 +0100
commit7781e61b5ba09a22e719636ae8b5a3186df438fc (patch)
tree3bf8630eb354191310b637d585f1b8b10173d8a8 /arch/arm/mach-ep93xx/include
parent4b483ed0be8b4aa8006300d502148aa4548fb261 (diff)
ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
The TS-72xx/73xx boards have a CPLD watchdog which is configured to reset the board after 8 seconds, if the kernel is large enough that this takes about this time to decompress the kernel, we will encounter a spurious reboot. Do not pull ts72xx.h, but instead locally define what we need to disable the watchdog. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-ep93xx/include')
-rw-r--r--arch/arm/mach-ep93xx/include/mach/uncompress.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index 03c42e5400d2..b0cf2de77f81 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -10,6 +10,7 @@
*/
#include <mach/ep93xx-regs.h>
+#include <asm/mach-types.h>
static unsigned char __raw_readb(unsigned int ptr)
{
@@ -75,8 +76,19 @@ static void ethernet_reset(void)
;
}
+#define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000
+#define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000
+#define TS72XX_WDT_FEED_VAL 0x05
+
+static void __maybe_unused ts72xx_watchdog_disable(void)
+{
+ __raw_writeb(TS72XX_WDT_FEED_VAL, TS72XX_WDT_FEED_PHYS_BASE);
+ __raw_writeb(0, TS72XX_WDT_CONTROL_PHYS_BASE);
+}
static void arch_decomp_setup(void)
{
+ if (machine_is_ts72xx())
+ ts72xx_watchdog_disable();
ethernet_reset();
}