Commit 7781e61b authored by Florian Fainelli's avatar Florian Fainelli Committed by Arnd Bergmann

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: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 4b483ed0
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
*/ */
#include <mach/ep93xx-regs.h> #include <mach/ep93xx-regs.h>
#include <asm/mach-types.h>
static unsigned char __raw_readb(unsigned int ptr) static unsigned char __raw_readb(unsigned int ptr)
{ {
...@@ -75,8 +76,19 @@ static void ethernet_reset(void) ...@@ -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) static void arch_decomp_setup(void)
{ {
if (machine_is_ts72xx())
ts72xx_watchdog_disable();
ethernet_reset(); ethernet_reset();
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment