public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sinan Akman <sinan@writeme.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Revert "imx: wdog: correct wcr register settings"
Date: Thu, 1 Oct 2015 15:39:17 -0400	[thread overview]
Message-ID: <560D8BE5.30000@writeme.com> (raw)
In-Reply-To: <1443727970-10347-1-git-send-email-festevam@gmail.com>



On 01/10/15 03:32 PM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> This reverts commit 623d96e89aca64c2762150087f4e872c55481f13.
>
> commit 623d96e89aca6("imx: wdog: correct wcr register settings")
> introduced the usage of clrsetbits_le16(), which causes a regression
> on LS1021 systems.
>
> Unlike i.MX, LS1021 uses big-endian ordering for the watchdog
> controller, which means we cannot use the little endian accessors.
>
> Reported-by: Sinan Akman <sinan@writeme.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>   drivers/watchdog/imx_watchdog.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/imx_watchdog.c b/drivers/watchdog/imx_watchdog.c
> index 9a77a54..1d18d4b 100644
> --- a/drivers/watchdog/imx_watchdog.c
> +++ b/drivers/watchdog/imx_watchdog.c
> @@ -55,8 +55,7 @@ void reset_cpu(ulong addr)
>   {
>   	struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR;
>   
> -	clrsetbits_le16(&wdog->wcr, 0, WCR_WDE);
> -
> +	writew(WCR_WDE, &wdog->wcr);
>   	writew(0x5555, &wdog->wsr);
>   	writew(0xaaaa, &wdog->wsr);	/* load minimum 1/2 second timeout */
>   	while (1) {

   Hi Fabio, I just wanted to point out that with this revert we don't 
only break imx again
(whatever the initial bug was for this commit) but also we are having 
ls1021atwr
working accidentally, just because  writew(WCR_WDE, &wdog->wcr) clears SRS
bit which is the only requirement for reset if watchdog is not running.

   I don't have any strong opinion on this but i just wanted to make it 
clear that
we are leaving both imx6 and ls1021atwr not properly implemented.

   Regards
   Sinan Akman

  reply	other threads:[~2015-10-01 19:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 19:32 [U-Boot] [PATCH] Revert "imx: wdog: correct wcr register settings" Fabio Estevam
2015-10-01 19:39 ` Sinan Akman [this message]
2015-10-01 19:45   ` Fabio Estevam
2015-10-01 19:50     ` Sinan Akman
2015-10-01 19:52       ` Fabio Estevam
2015-10-01 20:11 ` Wolfgang Denk
2015-10-01 20:19   ` Fabio Estevam
2015-10-01 20:50     ` Wolfgang Denk
2015-10-01 23:11       ` Fabio Estevam
2015-10-02  1:48         ` Sinan Akman
2015-10-02  4:30         ` Wolfgang Denk
2015-10-02 11:10           ` Fabio Estevam
2015-10-02 11:39             ` Fabio Estevam
2015-10-02 13:04               ` Sinan Akman
2015-10-02 13:29                 ` Fabio Estevam

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=560D8BE5.30000@writeme.com \
    --to=sinan@writeme.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox