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 V2 13/16] imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL
Date: Thu,  5 May 2022 19:06:09 +0800	[thread overview]
Message-ID: <20220505110613.31314-14-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20220505110613.31314-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,

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

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-05 10:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 11:05 [PATCH V2 00/16] imx: imx8m: clean up wdog code Peng Fan (OSS)
2022-05-05 11:05 ` [PATCH V2 01/16] imx: imx8mn_evk: enable pinctrl_wdog in SPL Peng Fan (OSS)
2022-05-20 13:40   ` sbabic
2022-05-05 11:05 ` [PATCH V2 02/16] imx: imx8mm_evk: " Peng Fan (OSS)
2022-05-20 13:41   ` sbabic
2022-05-05 11:05 ` [PATCH V2 03/16] imx: imx8mp_evk: " Peng Fan (OSS)
2022-05-20 13:42   ` sbabic
2022-05-05 11:06 ` [PATCH V2 04/16] imx: imx8mm_beacon: " Peng Fan (OSS)
2022-05-05 11:06 ` [PATCH V2 05/16] imx: imx8mm-cl-iot-gate: " Peng Fan (OSS)
2022-05-05 11:06 ` [PATCH V2 06/16] imx: engicam-imx8mm: drop unused macro Peng Fan (OSS)
2022-05-05 11:06 ` [PATCH V2 07/16] imx: imx8mm-mx8menlo: drop unneeded watchdog settings Peng Fan (OSS)
2022-05-05 12:23   ` Marek Vasut
2022-05-20 13:41   ` sbabic
2022-05-05 11:06 ` [PATCH V2 08/16] imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL Peng Fan (OSS)
2022-05-05 11:06 ` [PATCH V2 09/16] imx: imx8mn-beacon: " Peng Fan (OSS)
2022-05-05 11:06 ` [PATCH V2 10/16] imx: imx8mn_smm_s2: clean up board watchdog code Peng Fan (OSS)
2022-05-20 13:41   ` sbabic
2022-05-05 11:06 ` [PATCH V2 11/16] imx: imx8mn_var_som: " Peng Fan (OSS)
2022-05-05 11:06 ` [PATCH V2 12/16] imx: imx8mp_rsb7320a1: enable wdog driver model in SPL Peng Fan (OSS)
2022-05-05 11:06 ` Peng Fan (OSS) [this message]
2022-05-05 11:06 ` [PATCH V2 14/16] imx: phycore_imx8mm/p: clean up board watchdog code Peng Fan (OSS)
2022-05-05 11:06 ` [PATCH V2 15/16] imx: verdin-imx8mm/p: cleanup " Peng Fan (OSS)
2022-05-16 22:24   ` Marcel Ziswiler
2022-05-20 13:43   ` sbabic
2022-05-05 11:06 ` [PATCH V2 16/16] imx: toradex/verdin-imx8mm/p: " Peng Fan (OSS)
2022-05-20 13:41   ` sbabic

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=20220505110613.31314-14-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.