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, Teresa Remmet <t.remmet@phytec.de>
Cc: u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH V2 14/16] imx: phycore_imx8mm/p: clean up board watchdog code
Date: Thu,  5 May 2022 19:06:10 +0800	[thread overview]
Message-ID: <20220505110613.31314-15-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20220505110613.31314-1-peng.fan@oss.nxp.com>

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

pinctrl_wdog already marked u-boot,dm-spl, so 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>
Tested-by: Teresa Remmet <t.remmet@phytec.de>
---
 board/phytec/phycore_imx8mm/spl.c | 19 -------------------
 board/phytec/phycore_imx8mp/spl.c | 19 -------------------
 2 files changed, 38 deletions(-)

diff --git a/board/phytec/phycore_imx8mm/spl.c b/board/phytec/phycore_imx8mm/spl.c
index 7f24a3affc8..d87ab6d4497 100644
--- a/board/phytec/phycore_imx8mm/spl.c
+++ b/board/phytec/phycore_imx8mm/spl.c
@@ -57,23 +57,6 @@ int board_fit_config_name_match(const char *name)
 	return 0;
 }
 
-#define WDOG_PAD_CTRL	(PAD_CTL_DSE6 | PAD_CTL_ODE)
-
-static iomux_v3_cfg_t const wdog_pads[] = {
-	IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
-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;
-}
-
 void board_init_f(ulong dummy)
 {
 	int ret;
@@ -82,8 +65,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(2);
 
-	board_early_init_f();
-
 	/* Clear the BSS. */
 	memset(__bss_start, 0, __bss_end - __bss_start);
 
diff --git a/board/phytec/phycore_imx8mp/spl.c b/board/phytec/phycore_imx8mp/spl.c
index 38a581bef57..faed6fc3b76 100644
--- a/board/phytec/phycore_imx8mp/spl.c
+++ b/board/phytec/phycore_imx8mp/spl.c
@@ -89,23 +89,6 @@ int board_fit_config_name_match(const char *name)
 	return 0;
 }
 
-#define WDOG_PAD_CTRL   (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
-static iomux_v3_cfg_t const wdog_pads[] = {
-	MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B  | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
-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;
-}
-
 void board_init_f(ulong dummy)
 {
 	int ret;
@@ -114,8 +97,6 @@ void board_init_f(ulong dummy)
 
 	init_uart_clk(0);
 
-	board_early_init_f();
-
 	ret = spl_early_init();
 	if (ret) {
 		debug("spl_early_init() failed: %d\n", ret);
-- 
2.36.0


  parent reply	other threads:[~2022-05-05 10:28 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 ` [PATCH V2 13/16] imx: imx8mn-kontron-n801x: enable pinctrl_wdog " Peng Fan (OSS)
2022-05-05 11:06 ` Peng Fan (OSS) [this message]
2022-05-05 11:06 ` [PATCH V2 15/16] imx: verdin-imx8mm/p: cleanup board watchdog code 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-15-peng.fan@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=festevam@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=t.remmet@phytec.de \
    --cc=u-boot@lists.denx.de \
    /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.