From: Peng Fan <peng.fan@oss.nxp.com>
To: alice.guo@oss.nxp.com
Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
u-boot@lists.denx.de, "Christoph Stoidner" <c.stoidner@phytec.de>,
upstream@lists.phytec.de, "Stefano Babic" <sbabic@nabladev.com>,
"Fabio Estevam" <festevam@gmail.com>,
"Tom Rini" <trini@konsulko.com>, "Peng Fan" <peng.fan@nxp.com>,
"Marek Vasut" <marek.vasut+renesas@mailbox.org>,
"Joseph Guo" <qijian.guo@nxp.com>,
"Sumit Garg" <sumit.garg@oss.qualcomm.com>,
"Francesco Valla" <francesco@valla.it>, "Ye Li" <ye.li@nxp.com>,
"Primoz Fiser" <primoz.fiser@norik.com>,
"Jacky Bai" <ping.bai@nxp.com>,
"Frieder Schrempf" <frieder.schrempf@kontron.de>,
"Sam Protsenko" <semen.protsenko@linaro.org>,
"Tien Fong Chee" <tien.fong.chee@altera.com>,
"Svyatoslav Ryhel" <clamor95@gmail.com>,
"Andre Przywara" <andre.przywara@arm.com>,
"Brian Sune" <briansune@gmail.com>,
"Johan Jonker" <jbx6244@gmail.com>,
"Hai Pham" <hai.pham.ud@renesas.com>,
"David Lechner" <dlechner@baylibre.com>,
"Emanuele Ghidoli" <emanuele.ghidoli@toradex.com>,
"Parth Pancholi" <parth.pancholi@toradex.com>,
"Ion Agorria" <ion@agorria.com>,
"Paul Kocialkowski" <contact@paulk.fr>,
"Ernest Van Hoecke" <ernest.vanhoecke@toradex.com>,
"Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>,
"Mathieu Othacehe" <m.othacehe@gmail.com>,
"David Zang" <davidzangcs@gmail.com>,
"Simon Glass" <sjg@chromium.org>,
"João Paulo Gonçalves" <joao.goncalves@toradex.com>,
"Sébastien Szymanski" <sebastien.szymanski@armadeus.com>,
"Jérémie Dautheribes (Schneider Electric)"
<jeremie.dautheribes@bootlin.com>,
"Stefan Roese" <stefan.roese@mailbox.org>,
"Francesco Dolcini" <francesco.dolcini@toradex.com>,
"Lukasz Majewski" <lukma@denx.de>,
"Max Krummenacher" <max.krummenacher@toradex.com>,
"Wadim Egorov" <w.egorov@phytec.de>,
"Martin Schwan" <m.schwan@phytec.de>,
"Tim Harvey" <tharvey@gateworks.com>,
"Simona Toaca" <simona.toaca@nxp.com>,
"Franz Schnyder" <franz.schnyder@toradex.com>,
"Alice Guo" <alice.guo@nxp.com>
Subject: Re: [PATCH v3 5/9] imx: soc: Get watchdog base addresses from device tree
Date: Wed, 13 May 2026 16:36:30 +0800 [thread overview]
Message-ID: <agQ4DkOO0M42nmki@shlinux89> (raw)
In-Reply-To: <20260512-wdt-v1-5-0b9e1993557b@nxp.com>
On Tue, May 12, 2026 at 11:10:12AM +0800, alice.guo@oss.nxp.com wrote:
>From: Alice Guo <alice.guo@nxp.com>
>
>Replace hardcoded watchdog base addresses with dynamic address lookup
>from device tree for i.MX7ULP, i.MX8ULP, i.MX91, i.MX93, i.MX943, i.MX95
>and i.MX952.
>
>Move i.MX7ULP watchdog initialization from s_init() to
>arch_cpu_init() because ofnode_* APIs depend on FDT, which is not
>available during s_init().
>
>Signed-off-by: Alice Guo <alice.guo@nxp.com>
>---
> arch/arm/mach-imx/imx8ulp/soc.c | 14 +++++++++++++-
> arch/arm/mach-imx/imx9/scmi/soc.c | 15 ++++++++++++---
> arch/arm/mach-imx/imx9/soc.c | 16 +++++++++++++---
> arch/arm/mach-imx/mx7ulp/soc.c | 24 ++++++++++++++++++------
> 4 files changed, 56 insertions(+), 13 deletions(-)
>
>diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c
>index 1ee483065e8..ec85625ea25 100644
>--- a/arch/arm/mach-imx/imx8ulp/soc.c
>+++ b/arch/arm/mach-imx/imx8ulp/soc.c
>@@ -343,7 +343,19 @@ static void disable_wdog(void __iomem *wdog_base)
>
> void init_wdog(void)
> {
>- disable_wdog((void __iomem *)WDG3_RBASE);
>+ ofnode node;
>+
>+ for (node = ofnode_by_compatible(ofnode_null(), "fsl,imx8ulp-wdt");
>+ ofnode_valid(node);
>+ node = ofnode_by_compatible(node, "fsl,imx8ulp-wdt")) {
Use ofnode_for_each_compatible_node.
>+ phys_addr_t base;
>+
>+ base = ofnode_get_addr(node);
>+ if (base == FDT_ADDR_T_NONE)
>+ continue;
>+
>+ disable_wdog((void __iomem *)base);
>+ }
> }
>
> static struct mm_region imx8ulp_arm64_mem_map[] = {
>diff --git a/arch/arm/mach-imx/imx9/scmi/soc.c b/arch/arm/mach-imx/imx9/scmi/soc.c
>index fbee435786c..365891d1d1a 100644
>--- a/arch/arm/mach-imx/imx9/scmi/soc.c
>+++ b/arch/arm/mach-imx/imx9/scmi/soc.c
>@@ -786,9 +786,18 @@ static void gpio_reset(ulong gpio_base)
> int arch_cpu_init(void)
> {
> if (IS_ENABLED(CONFIG_SPL_BUILD)) {
>- if (!IS_ENABLED(CONFIG_IMX952)) {
>- disable_wdog((void __iomem *)WDG3_BASE_ADDR);
>- disable_wdog((void __iomem *)WDG4_BASE_ADDR);
>+ ofnode node;
>+
>+ for (node = ofnode_by_compatible(ofnode_null(), "fsl,imx93-wdt");
>+ ofnode_valid(node);
>+ node = ofnode_by_compatible(node, "fsl,imx93-wdt")) {
Ditto.
And same to other changes in this patch.
Regards
Peng
next prev parent reply other threads:[~2026-05-13 12:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 3:10 [PATCH v3 0/9] imx: Switch watchdog addressing from macros to devicetree alice.guo
2026-05-12 3:10 ` [PATCH v3 1/9] imx7ulp: Switch to OF_UPSTREAM alice.guo
2026-05-13 8:37 ` Peng Fan
2026-05-12 3:10 ` [PATCH v3 2/9] imx91: " alice.guo
2026-05-13 8:38 ` Peng Fan
2026-05-12 3:10 ` [PATCH v3 3/9] imx93-frdm: " alice.guo
2026-05-13 8:39 ` Peng Fan
2026-05-12 3:10 ` [PATCH v3 4/9] imx93_var_som: " alice.guo
2026-05-12 3:10 ` [PATCH v3 5/9] imx: soc: Get watchdog base addresses from device tree alice.guo
2026-05-13 8:36 ` Peng Fan [this message]
2026-05-12 3:10 ` [PATCH v3 6/9] arm: dts: imx: Update watchdog nodes for dynamic base address lookup alice.guo
2026-05-13 8:43 ` Peng Fan
2026-05-12 3:10 ` [PATCH v3 7/9] watchdog: ulp_wdog: Use driver model for reset_cpu() alice.guo
2026-05-13 8:52 ` Peng Fan
2026-05-13 8:51 ` Peng Fan (OSS)
2026-05-12 3:10 ` [PATCH v3 8/9] arm: dts: imx: Enable watchdog driver model support alice.guo
2026-05-12 8:06 ` Francesco Dolcini
2026-05-12 3:10 ` [PATCH v3 9/9] imx: Remove hardcoded watchdog base address macros alice.guo
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=agQ4DkOO0M42nmki@shlinux89 \
--to=peng.fan@oss.nxp.com \
--cc=alice.guo@nxp.com \
--cc=alice.guo@oss.nxp.com \
--cc=andre.przywara@arm.com \
--cc=briansune@gmail.com \
--cc=c.stoidner@phytec.de \
--cc=clamor95@gmail.com \
--cc=contact@paulk.fr \
--cc=davidzangcs@gmail.com \
--cc=dlechner@baylibre.com \
--cc=emanuele.ghidoli@toradex.com \
--cc=ernest.vanhoecke@toradex.com \
--cc=festevam@gmail.com \
--cc=francesco.dolcini@toradex.com \
--cc=francesco@valla.it \
--cc=franz.schnyder@toradex.com \
--cc=frieder.schrempf@kontron.de \
--cc=hai.pham.ud@renesas.com \
--cc=ion@agorria.com \
--cc=jbx6244@gmail.com \
--cc=jeremie.dautheribes@bootlin.com \
--cc=joao.goncalves@toradex.com \
--cc=lukma@denx.de \
--cc=m.othacehe@gmail.com \
--cc=m.schwan@phytec.de \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=max.krummenacher@toradex.com \
--cc=parth.pancholi@toradex.com \
--cc=peng.fan@nxp.com \
--cc=ping.bai@nxp.com \
--cc=primoz.fiser@norik.com \
--cc=qijian.guo@nxp.com \
--cc=sbabic@nabladev.com \
--cc=sebastien.szymanski@armadeus.com \
--cc=semen.protsenko@linaro.org \
--cc=simona.toaca@nxp.com \
--cc=sjg@chromium.org \
--cc=stefan.roese@mailbox.org \
--cc=sumit.garg@oss.qualcomm.com \
--cc=tharvey@gateworks.com \
--cc=tien.fong.chee@altera.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=upstream@lists.phytec.de \
--cc=w.egorov@phytec.de \
--cc=ye.li@nxp.com \
/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.