mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Kurz <akurz@blala.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] wdog: imx-wd: distinguish for WICR/WMCR support
Date: Tue, 5 Jul 2016 00:40:29 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1607042356330.21588@blala.de> (raw)
In-Reply-To: <20160704093704.GJ20657@pengutronix.de>



On Mon, 4 Jul 2016, Sascha Hauer wrote:

> On Sat, Jul 02, 2016 at 04:50:02PM +0200, Alexander Kurz wrote:
> > The IMX watchdog driver currently distinguishes two variants: imx1-wdt
> > using a 32-bit register interface and imx21-wdt with a 16-bit register
> > interface.
> > Further distinguishment is required: the i.MX21, i.MX27 and i.MX31 SOC
> > do provide a three register interface (WCR, WSR, WRSR) while later SOC
> > starting with i.MX25 provide two additional registers (WICR and WMCR).
> > The five-register interface is also used on i.MX35, and Cortex-A based
> > i.MX SOC.
> > 
> > With commit 4cc0a3d9c547 ("wdog: imx-wd: Disable watchdog powerdown counter")
> > one of the extended registers (WMCR) got used first.
> > 
> > Make imx-wd distinguish between the three and five register Watchdog Timers
> > and introduce the five register support as imx25-wdt.
> > 
> > Note on DTS: keep the i.MX related DTS in sync with linux and make the
> > existing programming model fsl,imx21-wdt behave like fsl,imx25-wdt for
> > the mean time until this is addressed upstream in linux.
> > 
> > fixes: 4cc0a3d9c547 ("wdog: imx-wd: Disable watchdog powerdown counter")
> 
> So beginning with 4cc0a3d9c547 i.MX21, i.MX27 and i.MX31 accidently use
> the five-register interface. What are the practical consequences? Does
> the driver still work properly on these SoCs?
The access of this non-existing register triggers a crash of a barebox run 
out of the factory shipped u-boot on an MX31 based Kindle-DX (u-boot gets 
re-started, probably some abort handler) - I dont have any JTAG interface 
running yet to see what's going on in detail.

> 
> I'm aksing because even with this patch...
> 
> >  		.compatible = "fsl,imx21-wdt",
> > -		.data = &imx21_wd_ops,
> > +		/* FIXME: backward compaibility for imported linux DTS
> > +		   Most references to fsl,imx21-wdt from linux imported DTS
> > +		   linux actually mean fsl,imx25-wdt. Make fsl,imx21-wdt
> > +		   behave like fsl,imx25-wdt for the mean time until
> > +		   this is fixed there */
> > +		.data = &imx25_wd_ops,
> > +	}, {
> 
> ...device tree based i.MX21/27/31 boards still use the five-register
> interface. There are no i.MX21/31 based device tree boards, but there
> are some i.MX27 boards with device tree support.
Yes, this point is open.
I did not want to break the sync between the linux und barebox IMX DTS 
stock. My Idea was:
1) do this first fix in barebox which will not cover DTS (do 
 workaround "wdt21 behaves like wdt25") 
2) fix it in linux, wait till next rc which contains the fix
3) linux DTS gets imported into barebox, and the workarkound wdt21 behaves   
 like wdt25" can be removed

Regards, Alexander

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2016-07-04 22:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-02 14:50 Alexander Kurz
2016-07-04  9:37 ` Sascha Hauer
2016-07-04 22:40   ` Alexander Kurz [this message]
2016-07-05  6:36     ` Sascha Hauer

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=alpine.DEB.2.00.1607042356330.21588@blala.de \
    --to=akurz@blala.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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