[PATCH 15/17] imx: phycore_imx8mm/p: clean up board watchdog code

Teresa Remmet T.Remmet at phytec.de
Tue May 3 15:52:21 CEST 2022


Am Dienstag, dem 03.05.2022 um 20:24 +0800 schrieb Peng Fan (OSS):
> From: Peng Fan <peng.fan at nxp.com>
> 
> pinctrl_wdog already marked u-boot,dm-spl, so clean up board code.
> set_wdog_reset function could be handled by imx_watchdog.c driver.

Thank you for the cleanup!

Tested on phyCORE-i.MX8MM and phyCORE-i.MX8MP. 

Tested-by: Teresa Remmet <t.remmet at phytec.de>

Regards,
Teresa


> 
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
>  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);
-- 
PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany

Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber |
Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE
149059855


More information about the U-Boot mailing list