mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] clk: imx25: Add support for watchdog clock
Date: Mon, 27 Jun 2022 12:33:58 +0200	[thread overview]
Message-ID: <20220627103358.34487-3-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20220627103358.34487-1-u.kleine-koenig@pengutronix.de>

This is necessary to make the watchdog driver probe successfully.

Fixes: 87cad179648c ("watchdog: imxwd: get and enable clock")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 arch/arm/mach-imx/include/mach/imx25-regs.h | 1 +
 drivers/clk/imx/clk-imx25.c                 | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/arch/arm/mach-imx/include/mach/imx25-regs.h b/arch/arm/mach-imx/include/mach/imx25-regs.h
index d63669e1e0e7..bf89701fe048 100644
--- a/arch/arm/mach-imx/include/mach/imx25-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx25-regs.h
@@ -56,6 +56,7 @@
 #define MX25_KPP_BASE_ADDR		0x43fa8000
 #define MX25_RNGB_BASE_ADDR		0x53fb0000
 #define MX25_SDMA_BASE_ADDR		0x53fd4000
+#define MX25_WATCHDOG_BASE_ADDR		0x53fdc000
 #define MX25_USB_BASE_ADDR		0x53ff4000
 #define MX25_USB_OTG_BASE_ADDR			(MX25_USB_BASE_ADDR + 0x0000)
 /*
diff --git a/drivers/clk/imx/clk-imx25.c b/drivers/clk/imx/clk-imx25.c
index 612edb222789..2bd0d6004b52 100644
--- a/drivers/clk/imx/clk-imx25.c
+++ b/drivers/clk/imx/clk-imx25.c
@@ -143,6 +143,9 @@ static int imx25_ccm_probe(struct device_d *dev)
 	clks[rngb_ipg] = imx_clk_gate("rngb_ipg", "ipg", base + CCM_CGCR2, 3);
 	clks[dryice_ipg] = imx_clk_gate("dryice_ipg", "ipg", base + CCM_CGCR1, 8);
 
+	/* reserved in datasheet, but used as wdt in FSL kernel */
+	clks[wdt_ipg] = imx_clk_gate("wdt_ipg", "ipg", base + CCM_CGCR2, 19);
+
 	clkdev_add_physbase(clks[per15], MX25_UART1_BASE_ADDR, NULL);
 	clkdev_add_physbase(clks[per15], MX25_UART2_BASE_ADDR, NULL);
 	clkdev_add_physbase(clks[per15], MX25_UART3_BASE_ADDR, NULL);
@@ -168,6 +171,7 @@ static int imx25_ccm_probe(struct device_d *dev)
 	clkdev_add_physbase(clks[scc_ipg], MX25_SCC_BASE_ADDR, "ipg");
 	clkdev_add_physbase(clks[rngb_ipg], MX25_RNGB_BASE_ADDR, "ipg");
 	clkdev_add_physbase(clks[dryice_ipg], MX25_DRYICE_BASE_ADDR, NULL);
+	clkdev_add_physbase(clks[wdt_ipg], MX25_WATCHDOG_BASE_ADDR, NULL);
 
 	return 0;
 }
-- 
2.36.1




  parent reply	other threads:[~2022-06-27 10:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 10:33 [PATCH 1/3] watchdog: imxwd: Add error messages for some failure points in .probe() Uwe Kleine-König
2022-06-27 10:33 ` [PATCH 2/3] clk: imx25: Add comments to clk list with offsets Uwe Kleine-König
2022-06-27 13:13   ` Alexander Shiyan
2022-06-29  7:40     ` Sascha Hauer
2022-06-27 10:33 ` Uwe Kleine-König [this message]
2022-06-27 10:51 ` [PATCH 1/3] watchdog: imxwd: Add error messages for some failure points in .probe() Ahmad Fatoum
2022-06-29  8:54   ` 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=20220627103358.34487-3-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox