All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: sbabic@denx.de, festevam@gmail.com,
	"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>
Cc: u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 14/17] imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL
Date: Tue,  3 May 2022 20:24:14 +0800	[thread overview]
Message-ID: <20220503122417.26953-15-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20220503122417.26953-1-peng.fan@oss.nxp.com>

From: Peng Fan <peng.fan@nxp.com>

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,
set_wdog_reset function could be handled by imx_watchdog.c driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi |  4 ++++
 board/kontron/sl-mx8mm/spl.c                  | 18 ------------------
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi b/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi
index 22d18e6f1cf..6882513f161 100644
--- a/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi
@@ -126,3 +126,7 @@
 &wdog1 {
 	u-boot,dm-spl;
 };
+
+&pinctrl_wdog {
+	u-boot,dm-spl;
+};
diff --git a/board/kontron/sl-mx8mm/spl.c b/board/kontron/sl-mx8mm/spl.c
index a58a75dc958..63361f1d2ab 100644
--- a/board/kontron/sl-mx8mm/spl.c
+++ b/board/kontron/sl-mx8mm/spl.c
@@ -32,7 +32,6 @@ enum {
 
 #define GPIO_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 #define I2C_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_HYS | PAD_CTL_PUE)
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
 
 #define TOUCH_RESET_GPIO	IMX_GPIO_NR(3, 23)
 
@@ -50,10 +49,6 @@ static iomux_v3_cfg_t const touch_gpio[] = {
 	IMX8MM_PAD_SAI5_RXD2_GPIO3_IO23 | MUX_PAD_CTRL(GPIO_PAD_CTRL)
 };
 
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
 	switch (boot_dev_spl) {
@@ -216,17 +211,6 @@ void spl_board_init(void)
 		printf("Failed to find clock node. Check device tree\n");
 }
 
-int board_early_init_f(void)
-{
-	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
-	imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
-	set_wdog_reset(wdog);
-
-	return 0;
-}
-
 static int power_init_board(void)
 {
 	struct udevice *dev;
@@ -261,8 +245,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(2);
 
-	board_early_init_f();
-
 	timer_init();
 
 	/* Clear the BSS. */
-- 
2.36.0


  parent reply	other threads:[~2022-05-03 11:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 12:24 [PATCH 00/17] imx: imx8m: clean up wdog code Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 01/17] imx: imx8mn_evk: enable pinctrl_wdog in SPL Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 02/17] imx: imx8mm_evk: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 03/17] imx: imx8mp_evk: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 04/17] imx: imx8mm_beacon: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 05/17] imx: imx8mm-cl-iot-gate: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 06/17] imx: imx8mm-data-modul-edm-sbc: " Peng Fan (OSS)
2022-05-03 13:51   ` Marek Vasut
2022-05-05 10:16     ` Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 07/17] imx: engicam-imx8mm: drop unused macro Peng Fan (OSS)
2022-05-03 11:49   ` Michael Nazzareno Trimarchi
2022-05-03 12:24 ` [PATCH 08/17] imx: imx8mm-mx8menlo: drop unneeded watchdog settings Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 09/17] imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL Peng Fan (OSS)
2022-05-03 16:19   ` Tim Harvey
2022-05-03 12:24 ` [PATCH 10/17] imx: imx8mn-beacon: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 11/17] imx: imx8mn_smm_s2: clean up board watchdog code Peng Fan (OSS)
2022-05-04 19:18   ` Ariel D'Alessandro
2022-05-03 12:24 ` [PATCH 12/17] imx: imx8mn_var_som: " Peng Fan (OSS)
2022-05-04 19:10   ` Ariel D'Alessandro
2022-05-03 12:24 ` [PATCH 13/17] imx: imx8mp_rsb7320a1: enable wdog driver model in SPL Peng Fan (OSS)
2022-05-03 12:24 ` Peng Fan (OSS) [this message]
2022-05-03 12:24 ` [PATCH 15/17] imx: phycore_imx8mm/p: clean up board watchdog code Peng Fan (OSS)
2022-05-03 13:52   ` Teresa Remmet
2022-05-03 12:24 ` [PATCH 16/17] imx: verdin-imx8mm/p: cleanup " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 17/17] imx: toradex/verdin-imx8mm/p: " Peng Fan (OSS)

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=20220503122417.26953-15-peng.fan@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=festevam@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@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.