Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1540055 > unrolled thread

[PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing

Started byFlorian Fainelli <f.fainelli@gmail.com>
First post2016-12-11 20:20 +0100
Last post2016-12-19 17:10 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing Florian Fainelli <f.fainelli@gmail.com> - 2016-12-11 20:20 +0100
    Re: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before  uncompressing Florian Fainelli <f.fainelli@gmail.com> - 2016-12-19 03:20 +0100
      RE: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before  uncompressing Hartley Sweeten <HartleyS@visionengravers.com> - 2016-12-19 17:10 +0100

#1540055 — [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2016-12-11 20:20 +0100
Subject[PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
Message-ID<sNhPb-2YZ-13@gated-at.bofh.it>
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>
---
 arch/arm/mach-ep93xx/include/mach/uncompress.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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();
 }
-- 
2.9.3

[toc] | [next] | [standalone]


#1544295 — Re: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2016-12-19 03:20 +0100
SubjectRe: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
Message-ID<sPVIu-1Cr-33@gated-at.bofh.it>
In reply to#1540055
Le 12/11/16 à 11:16, Florian Fainelli a écrit :
> 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>

Hartley, Ryan, do you guys maintain a git tree with EP93xx patches, or
should I submit them through RMK's patch system once you are okay with them?

Thanks!
-- 
Florian

[toc] | [prev] | [next] | [standalone]


#1544635 — RE: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing

FromHartley Sweeten <HartleyS@visionengravers.com>
Date2016-12-19 17:10 +0100
SubjectRE: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
Message-ID<sQ8FI-1Hm-49@gated-at.bofh.it>
In reply to#1544295
On Sunday, December 18, 2016 7:08 PM, Florian Fainelli wrote:
> Le 12/11/16 à 11:16, Florian Fainelli a écrit :
>> 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>
>
> Hartley, Ryan, do you guys maintain a git tree with EP93xx patches, or
> should I submit them through RMK's patch system once you are okay with them?

Ryan has an old tree on github but it has not been updated since Oct 14, 2013.  I'm
not sure if he is doing any active development at this time.

This patch will have to go through RMK's patch system or some other tree.

Thanks,
Hartley

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web