linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
@ 2016-12-11 19:16 Florian Fainelli
  2016-12-19  2:08 ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2016-12-11 19:16 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Florian Fainelli, Hartley Sweeten, Ryan Mallon, Russell King, 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>
---
 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] 5+ messages in thread

* Re: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  2016-12-11 19:16 [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing Florian Fainelli
@ 2016-12-19  2:08 ` Florian Fainelli
  2016-12-19 16:08   ` Hartley Sweeten
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2016-12-19  2:08 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Hartley Sweeten, Ryan Mallon, Russell King, open list

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

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

* RE: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  2016-12-19  2:08 ` Florian Fainelli
@ 2016-12-19 16:08   ` Hartley Sweeten
  2017-01-20  1:05     ` Florian Fainelli
  0 siblings, 1 reply; 5+ messages in thread
From: Hartley Sweeten @ 2016-12-19 16:08 UTC (permalink / raw)
  To: Florian Fainelli, linux-arm-kernel; +Cc: Ryan Mallon, Russell King, open list

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

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

* Re: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  2016-12-19 16:08   ` Hartley Sweeten
@ 2017-01-20  1:05     ` Florian Fainelli
  2017-01-27 16:27       ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2017-01-20  1:05 UTC (permalink / raw)
  To: Hartley Sweeten, linux-arm-kernel, arm
  Cc: Ryan Mallon, open list, olof, arnd, khilman

On 12/19/2016 08:08 AM, Hartley Sweeten wrote:
> 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.

Olof, Arnd, Kevin, should I just resent this patch to arm@kernel.org for
you to pick it?

Thanks
-- 
Florian

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

* Re: [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
  2017-01-20  1:05     ` Florian Fainelli
@ 2017-01-27 16:27       ` Arnd Bergmann
  0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2017-01-27 16:27 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Hartley Sweeten, linux-arm-kernel, arm-soc, Ryan Mallon,
	open list, Olof Johansson, khilman

On Fri, Jan 20, 2017 at 2:05 AM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> On 12/19/2016 08:08 AM, Hartley Sweeten wrote:
>> On Sunday, December 18, 2016 7:08 PM, Florian Fainelli wrote:
>>> Le 12/11/16 à 11:16, Florian Fainelli a écrit :

>> 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.
>
> Olof, Arnd, Kevin, should I just resent this patch to arm@kernel.org for
> you to pick it?

Yes, that would be good. I've added it to my todo folder now, but
having the patch
itself there is easier for us.

     Arnd

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

end of thread, other threads:[~2017-01-27 16:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-11 19:16 [PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing Florian Fainelli
2016-12-19  2:08 ` Florian Fainelli
2016-12-19 16:08   ` Hartley Sweeten
2017-01-20  1:05     ` Florian Fainelli
2017-01-27 16:27       ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).