All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
@ 2017-02-02 20:12 ` Florian Fainelli
  0 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2017-02-02 20:12 UTC (permalink / raw)
  To: arm
  Cc: arnd, olof, khilman, Florian Fainelli, Hartley Sweeten,
	Ryan Mallon, Russell King,
	moderated list:ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE,
	open list

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>
---
Arnd, this is a recent, so you can queue this up, thanks!

 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
@ 2017-02-02 20:12 ` Florian Fainelli
  0 siblings, 0 replies; 10+ messages in thread
From: Florian Fainelli @ 2017-02-02 20:12 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
Arnd, this is a recent, so you can queue this up, thanks!

 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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* RE: [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  2017-02-02 20:12 ` Florian Fainelli
@ 2017-02-02 20:43   ` Hartley Sweeten
  -1 siblings, 0 replies; 10+ messages in thread
From: Hartley Sweeten @ 2017-02-02 20:43 UTC (permalink / raw)
  To: Florian Fainelli, arm
  Cc: arnd, olof, khilman, Ryan Mallon, Russell King,
	moderated list:ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE,
	open list

On Thursday, February 02, 2017 1:12 PM, Florian Fainelli wrote:
> 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>
> ---
> Arnd, this is a recent, so you can queue this up, thanks!

Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>

or Tested-by/Acked-by as appropriate...

Hartley

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
@ 2017-02-02 20:43   ` Hartley Sweeten
  0 siblings, 0 replies; 10+ messages in thread
From: Hartley Sweeten @ 2017-02-02 20:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday, February 02, 2017 1:12 PM, Florian Fainelli wrote:
> 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>
> ---
> Arnd, this is a recent, so you can queue this up, thanks!

Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>

or Tested-by/Acked-by as appropriate...

Hartley

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  2017-02-02 20:43   ` Hartley Sweeten
@ 2017-02-07 15:05     ` Arnd Bergmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2017-02-07 15:05 UTC (permalink / raw)
  To: Hartley Sweeten
  Cc: Florian Fainelli, arm, olof, khilman, Ryan Mallon, Russell King,
	moderated list:ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE,
	open list

On Thursday, February 2, 2017 8:43:52 PM CET Hartley Sweeten wrote:
> On Thursday, February 02, 2017 1:12 PM, Florian Fainelli wrote:
> > 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>
> > ---
> > Arnd, this is a recent, so you can queue this up, thanks!
> 
> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> 
> or Tested-by/Acked-by as appropriate...
> 

Too bad, this really gets in the way of a future multiplatform
ep93xx configuration as that doesn't easily allow us to have
board specific hacks in the decompressor.

Applied to next/soc with Hartley's reviewed-by tag.

It's not clear from your description if this is needed for stable
backports. If it is, please write to stable@vger.kernel.org
once it is merged upstream.

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
@ 2017-02-07 15:05     ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2017-02-07 15:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Thursday, February 2, 2017 8:43:52 PM CET Hartley Sweeten wrote:
> On Thursday, February 02, 2017 1:12 PM, Florian Fainelli wrote:
> > 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>
> > ---
> > Arnd, this is a recent, so you can queue this up, thanks!
> 
> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> 
> or Tested-by/Acked-by as appropriate...
> 

Too bad, this really gets in the way of a future multiplatform
ep93xx configuration as that doesn't easily allow us to have
board specific hacks in the decompressor.

Applied to next/soc with Hartley's reviewed-by tag.

It's not clear from your description if this is needed for stable
backports. If it is, please write to stable at vger.kernel.org
once it is merged upstream.

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  2017-02-02 20:12 ` Florian Fainelli
@ 2017-02-08 12:23   ` Afzal Mohammed
  -1 siblings, 0 replies; 10+ messages in thread
From: Afzal Mohammed @ 2017-02-08 12:23 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: arm, arnd, olof, khilman, Hartley Sweeten, Ryan Mallon,
	Russell King,
	moderated list:ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE,
	open list, Lokesh Vutla

Hi,

On Thu, Feb 02, 2017 at 12:12:26PM -0800, Florian Fainelli wrote:
> 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.

so once it reaches Kernel proper, that dog is being killed, right ?

iirc, TI AM335x's & AM43x's ROM code too leaves the on-chip watchdog
enabled & the bootloader disables it (else once it boots to prompt, it
reboots always unless watchdog driver [if present] takes care of it),
Lokesh, right ?

But yes, that brings a bootloader dependency.

Regards
afzal

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
@ 2017-02-08 12:23   ` Afzal Mohammed
  0 siblings, 0 replies; 10+ messages in thread
From: Afzal Mohammed @ 2017-02-08 12:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Thu, Feb 02, 2017 at 12:12:26PM -0800, Florian Fainelli wrote:
> 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.

so once it reaches Kernel proper, that dog is being killed, right ?

iirc, TI AM335x's & AM43x's ROM code too leaves the on-chip watchdog
enabled & the bootloader disables it (else once it boots to prompt, it
reboots always unless watchdog driver [if present] takes care of it),
Lokesh, right ?

But yes, that brings a bootloader dependency.

Regards
afzal

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  2017-02-08 12:23   ` Afzal Mohammed
@ 2017-02-13  3:38     ` Lokesh Vutla
  -1 siblings, 0 replies; 10+ messages in thread
From: Lokesh Vutla @ 2017-02-13  3:38 UTC (permalink / raw)
  To: Afzal Mohammed, Florian Fainelli
  Cc: arm, arnd, olof, khilman, Hartley Sweeten, Ryan Mallon,
	Russell King,
	moderated list:ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE,
	open list



On Wednesday 08 February 2017 05:53 PM, Afzal Mohammed wrote:
> Hi,
> 
> On Thu, Feb 02, 2017 at 12:12:26PM -0800, Florian Fainelli wrote:
>> 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.
> 
> so once it reaches Kernel proper, that dog is being killed, right ?
> 
> iirc, TI AM335x's & AM43x's ROM code too leaves the on-chip watchdog
> enabled & the bootloader disables it (else once it boots to prompt, it
> reboots always unless watchdog driver [if present] takes care of it),
> Lokesh, right ?

Yes, that's right. Watchdog is disabled in U-Boot.

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
@ 2017-02-13  3:38     ` Lokesh Vutla
  0 siblings, 0 replies; 10+ messages in thread
From: Lokesh Vutla @ 2017-02-13  3:38 UTC (permalink / raw)
  To: linux-arm-kernel



On Wednesday 08 February 2017 05:53 PM, Afzal Mohammed wrote:
> Hi,
> 
> On Thu, Feb 02, 2017 at 12:12:26PM -0800, Florian Fainelli wrote:
>> 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.
> 
> so once it reaches Kernel proper, that dog is being killed, right ?
> 
> iirc, TI AM335x's & AM43x's ROM code too leaves the on-chip watchdog
> enabled & the bootloader disables it (else once it boots to prompt, it
> reboots always unless watchdog driver [if present] takes care of it),
> Lokesh, right ?

Yes, that's right. Watchdog is disabled in U-Boot.

Thanks and regards,
Lokesh

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-13  3:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-02 20:12 [PATCH RESEND] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing Florian Fainelli
2017-02-02 20:12 ` Florian Fainelli
2017-02-02 20:43 ` Hartley Sweeten
2017-02-02 20:43   ` Hartley Sweeten
2017-02-07 15:05   ` Arnd Bergmann
2017-02-07 15:05     ` Arnd Bergmann
2017-02-08 12:23 ` Afzal Mohammed
2017-02-08 12:23   ` Afzal Mohammed
2017-02-13  3:38   ` Lokesh Vutla
2017-02-13  3:38     ` Lokesh Vutla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.