All of lore.kernel.org
 help / color / mirror / Atom feed
From: ryan@bluewatersys.com (Ryan Mallon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: ep93xx: use more reliable CPLD watchdog for reset on ts72xx
Date: Tue, 31 May 2011 18:47:57 +1000	[thread overview]
Message-ID: <4DE4AB3D.2010305@bluewatersys.com> (raw)
In-Reply-To: <1306665346-26657-5-git-send-email-ynezz@true.cz>

On 29/05/11 20:35, Petr ?tetiar wrote:
> On all ep93xx based boards from Technologic Systems, there's CPLD watchdog
> available, so use this one to reset the board instead of the soft reset in
> CPU.  I've seen some weird lockups with the soft reset on ep93xx in the past,
> while the reset via CPLD watchdog seems to be rock solid (tm) and works fine
> so far.
> 
> Cc: Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <ryan@bluewatersys.com>
> Signed-off-by: Petr ?tetiar <ynezz@true.cz>
> ---
>  arch/arm/mach-ep93xx/include/mach/system.h |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
> index 6d661fe..4d02ddd 100644
> --- a/arch/arm/mach-ep93xx/include/mach/system.h
> +++ b/arch/arm/mach-ep93xx/include/mach/system.h
> @@ -3,6 +3,10 @@
>   */
>  
>  #include <mach/hardware.h>
> +#ifdef CONFIG_MACH_TS72XX
> +#include <linux/io.h>
> +#include <mach/ts72xx.h>
> +#endif
>  
>  static inline void arch_idle(void)
>  {
> @@ -13,11 +17,22 @@ static inline void arch_reset(char mode, const char *cmd)
>  {
>  	local_irq_disable();
>  
> +#ifdef CONFIG_MACH_TS72XX
> +	/*
> +	 * It's more reliable to use CPLD watchdog to perform the reset
> +	 */
> +	if (board_is_ts7200() || board_is_ts7250() || board_is_ts7260() ||
> +	    board_is_ts7300() || board_is_ts7400()) {
> +		__raw_writeb(0x5, TS72XX_WDT_FEED_PHYS_BASE);
> +		__raw_writeb(0x1, TS72XX_WDT_CONTROL_PHYS_BASE);
> +	}
> +#else
>  	/*
>  	 * Set then clear the SWRST bit to initiate a software reset
>  	 */
>  	ep93xx_devcfg_set_bits(EP93XX_SYSCON_DEVCFG_SWRST);
>  	ep93xx_devcfg_clear_bits(EP93XX_SYSCON_DEVCFG_SWRST);
> +#endif

Do we need the ifdef here? Isn't the if (board_is_xxx) test enough?

~Ryan

       reply	other threads:[~2011-05-31  8:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1306665346-26657-1-git-send-email-ynezz@true.cz>
     [not found] ` <1306665346-26657-5-git-send-email-ynezz@true.cz>
2011-05-31  8:47   ` Ryan Mallon [this message]
2011-05-31  9:37     ` [PATCH 4/4] ARM: ep93xx: use more reliable CPLD watchdog for reset on ts72xx Petr Štetiar
2011-05-31 16:48       ` H Hartley Sweeten
2011-05-31 18:34         ` [PATCH v2] " Petr Štetiar
2011-05-31 18:39           ` H Hartley Sweeten
2011-05-31 19:02             ` [PATCH v3] " Petr Štetiar
2011-05-31 19:24               ` H Hartley Sweeten
2011-05-31 19:55                 ` Petr Štetiar
2011-05-31 20:02                   ` H Hartley Sweeten
2011-05-31 21:42                 ` Ryan Mallon
2011-05-31 22:41                   ` H Hartley Sweeten
2011-06-03 18:28                     ` [PATCH v4] " Petr Štetiar
2011-06-03 18:43                       ` Olof Johansson
2011-06-05  7:51                         ` Petr Štetiar
2011-06-05  9:54                       ` Mika Westerberg
2011-06-05 16:07                         ` Petr Štetiar
2011-06-05 18:18                           ` Mika Westerberg
2011-08-10 17:45                       ` H Hartley Sweeten
2011-06-02  9:54               ` [PATCH v3] " Mika Westerberg
2011-06-02 10:56                 ` Petr Štetiar
2011-06-03 18:34                 ` Petr Štetiar
     [not found] ` <1306665346-26657-4-git-send-email-ynezz@true.cz>
2011-05-31 16:55   ` [PATCH 3/4] ARM: ep93xx: add model detection for ts-7300 and ts-7400 boards H Hartley Sweeten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DE4AB3D.2010305@bluewatersys.com \
    --to=ryan@bluewatersys.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.