From: Vladimir Zapolskiy <vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>
To: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Wim Van Sebroeck <wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>,
Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>,
linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [RFC PATCH 0/2] watchdog: imx2+: fix hangup during watchdog initialization
Date: Mon, 26 Sep 2016 03:39:19 +0300 [thread overview]
Message-ID: <1474850361-20884-1-git-send-email-vz@mleia.com> (raw)
It was discovered that the current version of imx2+ watchdog driver
does not work properly on i.MX31 boards and due to the same root
cause the kernel should not work on i.MX21 and i.MX27 powered boards,
if watchdog device driver is probed.
The root cause is that the watchdog controller on all modern SoCs from
i.MX series has two more registers in comparison to the watchdog on
i.MX21, i.MX27 and i.MX31, thus write access to the non-existing
register by the driver probe function causes a core hang.
The commit which caused a regression is 5fe65ce7ccbb ("watchdog:
imx2_wdt: Disable power down counter on boot"), for me it's hard
to say if this change is utterly needed or not (e.g. if it is done
in a bootloader), but it seems to be valid for modern i.MX SoCs.
The solution introduces a runtime difference between i.MX21 and i.MX25
compatible watchdog controllers, also this is reflected in the
updated DTS files.
The change is an RFC, because
* it is based on v4.8-rc1 and it will be rebased after getting review
comments,
* the selection of compatible watchdog controllers is partially done
on RMs, but I don't have access to all of them,
* the change fixes legacy boards (prior to DT support), but the fix is
excessive in sense that WMCR register won't be set on them, to cover
this case I feel reluctant to add a new header with platform data
structure declaration for legacy boards, but comments are welcome
* I don't know if a complete list of watchdog compatibles (which is
expected to be growing with time) is wanted in the driver code,
* if the DT change from the series is added, then only a check for
fsl,imx25-wdt compatible migth be good enough, but this will
nullify "disable power down counter" change for boards with
not updated DTBs.
* note that ls1021a.dtsi does not have its named watchdog compatible,
I know that Rob insists on adding SoC-named compatibles for
controllers, this may help in situations like this one, other
opinions or discussion or fix for LS1021A is welcome.
Vladimir Zapolskiy (2):
watchdog: imx2: fix hang-up on boot for i.MX21, i.MX27 and i.MX31 SoCs
ARM: i.MX: dts: add fsl,imx25-wdt compatible to all relevant watchdog nodes
arch/arm/boot/dts/imx35.dtsi | 3 ++-
arch/arm/boot/dts/imx50.dtsi | 3 ++-
arch/arm/boot/dts/imx51.dtsi | 6 ++++--
arch/arm/boot/dts/imx53.dtsi | 6 ++++--
arch/arm/boot/dts/imx6qdl.dtsi | 6 ++++--
arch/arm/boot/dts/imx6sl.dtsi | 6 ++++--
arch/arm/boot/dts/imx6sx.dtsi | 9 +++++---
arch/arm/boot/dts/imx6ul.dtsi | 6 ++++--
arch/arm/boot/dts/imx7s.dtsi | 12 +++++++----
arch/arm/boot/dts/ls1021a.dtsi | 2 +-
arch/arm/boot/dts/vfxxx.dtsi | 3 ++-
drivers/watchdog/imx2_wdt.c | 47 ++++++++++++++++++++++++++++++++++++++++--
12 files changed, 86 insertions(+), 23 deletions(-)
--
2.8.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2016-09-26 0:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 0:39 Vladimir Zapolskiy [this message]
[not found] ` <1474850361-20884-1-git-send-email-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>
2016-09-26 0:39 ` [RFC PATCH 1/2] watchdog: imx2: fix hang-up on boot for i.MX21, i.MX27 and i.MX31 SoCs Vladimir Zapolskiy
[not found] ` <1474850361-20884-2-git-send-email-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>
2016-09-26 13:02 ` Guenter Roeck
[not found] ` <ebece25b-7a3b-3fdf-d117-dd0a3a2975b7-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-12-10 19:28 ` Magnus Lilja
[not found] ` <CAM=E1R6hzob5ZzyTLmrLL5s-6=vbZQbCig1sLHMSLChJEz9YgA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-10 20:14 ` Guenter Roeck
2016-12-10 22:37 ` Vladimir Zapolskiy
2016-09-26 0:39 ` [RFC PATCH 2/2] ARM: i.MX: dts: add fsl,imx25-wdt compatible to all relevant watchdog nodes Vladimir Zapolskiy
[not found] ` <1474850361-20884-3-git-send-email-vz-ChpfBGZJDbMAvxtiuMwx3w@public.gmane.org>
2016-09-26 4:34 ` [RFC PATCH 2/2] ARM: i.MX: dts: add fsl, imx25-wdt " Baruch Siach
2016-09-26 6:27 ` Uwe Kleine-König
[not found] ` <20160926062759.3eoezyezog6clz6x-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-12-11 9:40 ` Uwe Kleine-König
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=1474850361-20884-1-git-send-email-vz@mleia.com \
--to=vz-chpfbgzjdbmavxtiumwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=fabio.estevam-3arQi8VN3Tc@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=wim-IQzOog9fTRqzQB+pC5nmwQ@public.gmane.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 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).