diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-02-02 15:12:26 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2017-02-07 10:02:34 -0500 |
commit | 7781e61b5ba09a22e719636ae8b5a3186df438fc (patch) | |
tree | 3bf8630eb354191310b637d585f1b8b10173d8a8 | |
parent | 4b483ed0be8b4aa8006300d502148aa4548fb261 (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>
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/uncompress.h | 12 |
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 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <mach/ep93xx-regs.h> | 12 | #include <mach/ep93xx-regs.h> |
13 | #include <asm/mach-types.h> | ||
13 | 14 | ||
14 | static unsigned char __raw_readb(unsigned int ptr) | 15 | static unsigned char __raw_readb(unsigned int ptr) |
15 | { | 16 | { |
@@ -75,8 +76,19 @@ static void ethernet_reset(void) | |||
75 | ; | 76 | ; |
76 | } | 77 | } |
77 | 78 | ||
79 | #define TS72XX_WDT_CONTROL_PHYS_BASE 0x23800000 | ||
80 | #define TS72XX_WDT_FEED_PHYS_BASE 0x23c00000 | ||
81 | #define TS72XX_WDT_FEED_VAL 0x05 | ||
82 | |||
83 | static void __maybe_unused ts72xx_watchdog_disable(void) | ||
84 | { | ||
85 | __raw_writeb(TS72XX_WDT_FEED_VAL, TS72XX_WDT_FEED_PHYS_BASE); | ||
86 | __raw_writeb(0, TS72XX_WDT_CONTROL_PHYS_BASE); | ||
87 | } | ||
78 | 88 | ||
79 | static void arch_decomp_setup(void) | 89 | static void arch_decomp_setup(void) |
80 | { | 90 | { |
91 | if (machine_is_ts72xx()) | ||
92 | ts72xx_watchdog_disable(); | ||
81 | ethernet_reset(); | 93 | ethernet_reset(); |
82 | } | 94 | } |