imx: imx8m: clean up wdog code
Subsystems (2)
v2 cover imx: imx8m: clean up wdog code
From: Peng Fan <[email protected]>
V2:
Drop patch 6 in V1
Update commit log
Add R-b/T-b tag
Enable pinctrl wdog to clean up board level code imx_watchdog.c already has function of set_wdog_reset, so after watchdog driver enabled, no need that.
Note: I only have NXP EVK board, so please help test if possible.
Based on: https://patchwork.ozlabs.org/project/uboot/cover/[email protected]/
Peng Fan (16):
imx: imx8mn_evk: enable pinctrl_wdog in SPL
imx: imx8mm_evk: enable pinctrl_wdog in SPL
imx: imx8mp_evk: enable pinctrl_wdog in SPL
imx: imx8mm_beacon: enable pinctrl_wdog in SPL
imx: imx8mm-cl-iot-gate: enable pinctrl_wdog in SPL
imx: engicam-imx8mm: drop unused macro
imx: imx8mm-mx8menlo: drop unneeded watchdog settings
imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL
imx: imx8mn-beacon: enable pinctrl_wdog in SPL
imx: imx8mn_smm_s2: clean up board watchdog code
imx: imx8mn_var_som: clean up board watchdog code
imx: imx8mp_rsb7320a1: enable wdog driver model in SPL
imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL
imx: phycore_imx8mm/p: clean up board watchdog code
imx: verdin-imx8mm/p: cleanup board watchdog code
imx: toradex/verdin-imx8mm/p: cleanup board watchdog code
arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mm-evk-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mm-venice-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mn-venice-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mp-evk-u-boot.dtsi | 4 +++ arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi | 8 +++++ arch/arm/dts/imx8mp-venice-u-boot.dtsi | 4 +++ .../imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 12 -------- board/beacon/imx8mm/spl.c | 19 ------------ board/beacon/imx8mn/spl.c | 10 ------- board/bsh/imx8mn_smm_s2/spl.c | 11 ------- board/compulab/imx8mm-cl-iot-gate/spl.c | 19 ------------ board/engicam/imx8mm/spl.c | 2 -- board/freescale/imx8mm_evk/spl.c | 19 ------------ board/freescale/imx8mn_evk/spl.c | 19 ------------ board/freescale/imx8mp_evk/imx8mp_evk.c | 17 ----------- board/freescale/imx8mp_evk/spl.c | 2 -- board/gateworks/venice/spl.c | 30 ------------------- board/kontron/sl-mx8mm/spl.c | 18 ----------- board/menlo/mx8menlo/mx8menlo.c | 12 -------- board/phytec/phycore_imx8mm/spl.c | 19 ------------ board/phytec/phycore_imx8mp/spl.c | 19 ------------ board/toradex/verdin-imx8mm/spl.c | 11 ------- board/toradex/verdin-imx8mp/verdin-imx8mp.c | 11 ------- board/variscite/imx8mn_var_som/spl.c | 11 ------- configs/imx8mp_evk_defconfig | 1 - 30 files changed, 48 insertions(+), 262 deletions(-)
Signature · 1 line
2.36.0
PATCH v2 1/16 imx: imx8mn_evk: enable pinctrl_wdog in SPL
From: Peng Fan <[email protected]>
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.
--- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 4 ++++ board/freescale/imx8mn_evk/spl.c | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-)
arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +4 -0
@@ -80,6 +80,10 @@ u-boot,dm-spl; }; +&pinctrl_wdog { + u-boot,dm-spl; +}; + &gpio1 { u-boot,dm-spl; };
board/freescale/imx8mn_evk/spl.c +0 -19
@@ -115,23 +115,6 @@ int board_fit_config_name_match(const char *name) }#endif -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -static iomux_v3_cfg_t const wdog_pads[] = { -IMX8MN_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;
@@ -140,8 +123,6 @@ void board_init_f(ulong dummy)init_uart_clk (1 ); -board_early_init_f (); -timer_init ();/* Clear the BSS. */
Signature · 1 line
2.36.0
PATCH v2 1/16 imx: imx8mn_evk: enable pinctrl_wdog in SPL
Quoted 6 lines
From: Peng Fan <[email protected]>
Markpinctrl_wdogas u-boot,dm-spl to clean up board code, Theset_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 2/16 imx: imx8mm_evk: enable pinctrl_wdog in SPL
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 4 ++++ board/freescale/imx8mm_evk/spl.c | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-)
arch/arm/dts/imx8mm-evk-u-boot.dtsi +4 -0
@@ -121,6 +121,10 @@ u-boot,dm-spl; }; +&pinctrl_wdog { + u-boot,dm-spl; +}; + &fec1 { phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; };
board/freescale/imx8mm_evk/spl.c +0 -19
@@ -72,23 +72,6 @@ int board_fit_config_name_match(const char *name) }#endif -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -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 ; -} -static int power_init_board (void ) {struct udevice *dev;
@@ -135,8 +118,6 @@ void board_init_f(ulong dummy)init_uart_clk (1 ); -board_early_init_f (); -timer_init ();/* Clear the BSS. */
Signature · 1 line
2.36.0
PATCH v2 2/16 imx: imx8mm_evk: enable pinctrl_wdog in SPL
Quoted 6 lines
From: Peng Fan <[email protected]>
Markpinctrl_wdogas u-boot,dm-spl to clean up board code, Theset_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 3/16 imx: imx8mp_evk: enable pinctrl_wdog in SPL
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- arch/arm/dts/imx8mp-evk-u-boot.dtsi | 4 ++++ board/freescale/imx8mp_evk/imx8mp_evk.c | 17 ----------------- board/freescale/imx8mp_evk/spl.c | 2 -- configs/imx8mp_evk_defconfig | 1 - 4 files changed, 4 insertions(+), 20 deletions(-)
arch/arm/dts/imx8mp-evk-u-boot.dtsi +4 -0
@@ -43,6 +43,10 @@ u-boot,dm-spl; }; +&pinctrl_wdog { + u-boot,dm-spl; +}; + &gpio1 { u-boot,dm-spl; };
board/freescale/imx8mp_evk/imx8mp_evk.c +0 -17
@@ -20,23 +20,6 @@DECLARE_GLOBAL_DATA_PTR ; -#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 ; -} -static void setup_fec (void ) { struct iomuxc_gpr_base_regs *gpr =
board/freescale/imx8mp_evk/spl.c +0 -2
@@ -134,8 +134,6 @@ void board_init_f(ulong dummy)init_uart_clk (1 ); -board_early_init_f (); - ret =spl_early_init ();if (ret) {debug ("spl_init() failed: %d\n" , ret);
configs/imx8mp_evk_defconfig +0 -1
@@ -27,7 +27,6 @@ CONFIG_SPL_LOAD_FIT=y # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_SYSTEM_SETUP=y CONFIG_DEFAULT_FDT_FILE="imx8mp-evk.dtb" -CONFIG_BOARD_EARLY_INIT_F=y CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_BOARD_INIT=y CONFIG_SPL_BOOTROM_SUPPORT=y
Signature · 1 line
2.36.0
PATCH v2 3/16 imx: imx8mp_evk: enable pinctrl_wdog in SPL
Quoted 6 lines
From: Peng Fan <[email protected]>
Markpinctrl_wdogas u-boot,dm-spl to clean up board code, Theset_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 4/16 imx: imx8mm_beacon: enable pinctrl_wdog in SPL
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi | 4 ++++ board/beacon/imx8mm/spl.c | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-)
arch/arm/dts/imx8mm-beacon-kit-u-boot.dtsi +4 -0
@@ -73,6 +73,10 @@ u-boot,dm-spl; }; +&pinctrl_wdog { + u-boot,dm-spl; +}; + &uart2 { u-boot,dm-spl; };
board/beacon/imx8mm/spl.c +0 -19
@@ -59,23 +59,6 @@ int board_fit_config_name_match(const char *name) }#endif -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -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 ; -} -static int power_init_board (void ) {struct udevice *dev;
@@ -116,8 +99,6 @@ void board_init_f(ulong dummy)init_uart_clk (1 ); -board_early_init_f (); -timer_init ();/* Clear the BSS. */
Signature · 1 line
2.36.0
PATCH v2 5/16 imx: imx8mm-cl-iot-gate: enable pinctrl_wdog in SPL
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi | 4 ++++ board/compulab/imx8mm-cl-iot-gate/spl.c | 19 ------------------- 2 files changed, 4 insertions(+), 19 deletions(-)
arch/arm/dts/imx8mm-cl-iot-gate-u-boot.dtsi +4 -0
@@ -84,6 +84,10 @@ u-boot,dm-spl; }; +&pinctrl_wdog { + u-boot,dm-spl; +}; + &uart3 { u-boot,dm-spl; };
board/compulab/imx8mm-cl-iot-gate/spl.c +0 -19
@@ -83,23 +83,6 @@ int board_fit_config_name_match(const char *name) }#endif -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -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 ; -} -static int power_init_board (void ) {struct udevice *dev;
@@ -141,8 +124,6 @@ void board_init_f(ulong dummy)arch_cpu_init (); -board_early_init_f (); -init_uart_clk (2 );timer_init ();
Signature · 1 line
2.36.0
PATCH v2 6/16 imx: engicam-imx8mm: drop unused macro
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Drop unused WDOG macro
--- board/engicam/imx8mm/spl.c | 2 -- 1 file changed, 2 deletions(-)
board/engicam/imx8mm/spl.c +0 -2
@@ -54,8 +54,6 @@ int board_fit_config_name_match(const char *name) }#endif -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) -int board_early_init_f (void ) {return 0 ;
Signature · 1 line
2.36.0
PATCH v2 7/16 imx: imx8mm-mx8menlo: drop unneeded watchdog settings
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
pinctrl_wdog as u-boot,dm-spl already marked in imx8mm-verdin-u-boot.dtsi,
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.
--- board/menlo/mx8menlo/mx8menlo.c | 12 ------------ 1 file changed, 12 deletions(-)
board/menlo/mx8menlo/mx8menlo.c +0 -12
@@ -12,12 +12,6 @@#include <asm/mach-imx/iomux-v3.h> #include <spl.h> -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -static iomux_v3_cfg_t const wdog_pads[] = { -IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B |MUX_PAD_CTRL (WDOG_PAD_CTRL ), -}; -#define SNVS_BASE_ADDR 0x30370000#define SNVS_LPSR 0x4c#define SNVS_LPLVDR 0x64
@@ -35,12 +29,6 @@ static void setup_snvs(void)void board_early_init (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); -init_uart_clk (1 );setup_snvs ();
Signature · 1 line
2.36.0
Re: [PATCH V2 07/16] imx: imx8mm-mx8menlo: drop unneeded watchdog settings
Quoted 9 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
pinctrl_wdogas u-boot,dm-spl already marked inimx8mm-verdin-u-boot.dtsi,The
set_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>
Thanks
PATCH v2 7/16 imx: imx8mm-mx8menlo: drop unneeded watchdog settings
In reply to Peng Fan (OSS)Quoted 7 lines
From: Peng Fan <[email protected]>
pinctrl_wdogas u-boot,dm-spl already marked inimx8mm-verdin-u-boot.dtsi, Theset_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>Reviewed-by Marek Vasut <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 8/16 imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- arch/arm/dts/imx8mm-venice-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mn-venice-u-boot.dtsi | 4 ++++ arch/arm/dts/imx8mp-venice-u-boot.dtsi | 4 ++++ board/gateworks/venice/spl.c | 30 -------------------------- 4 files changed, 12 insertions(+), 30 deletions(-)
arch/arm/dts/imx8mm-venice-u-boot.dtsi +4 -0
@@ -72,3 +72,7 @@ &wdog1 { u-boot,dm-spl; }; + +&pinctrl_wdog { + u-boot,dm-spl; +};
arch/arm/dts/imx8mn-venice-u-boot.dtsi +4 -0
@@ -110,6 +110,10 @@ u-boot,dm-spl; }; +&pinctrl_wdog { + u-boot,dm-spl; +}; + &binman { u-boot-spl-ddr { align = <4>;
arch/arm/dts/imx8mp-venice-u-boot.dtsi +4 -0
@@ -72,3 +72,7 @@ &wdog1 { u-boot,dm-spl; }; + +&pinctrl_wdog { + u-boot,dm-spl; +};
board/gateworks/venice/spl.c +0 -30
@@ -87,34 +87,6 @@ static void spl_dram_init(int size)ddr_init (dram_timing); } -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -#ifdef CONFIG_IMX8MM -static iomux_v3_cfg_t const wdog_pads[] = { -IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B |MUX_PAD_CTRL (WDOG_PAD_CTRL ), -}; -#elif CONFIG_IMX8MN -static const iomux_v3_cfg_t wdog_pads[] = { -IMX8MN_PAD_GPIO1_IO02__WDOG1_WDOG_B |MUX_PAD_CTRL (WDOG_PAD_CTRL ), -}; -#elif CONFIG_IMX8MP -static const iomux_v3_cfg_t wdog_pads[] = { -MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B |MUX_PAD_CTRL (WDOG_PAD_CTRL ), -}; - -#endif - -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 ; -} -/* * Model specific PMIC adjustments necessary prior to DRAM init *
@@ -254,8 +226,6 @@ void board_init_f(ulong dummy)init_uart_clk (1 ); -board_early_init_f (); -timer_init ();/* Clear the BSS. */
Signature · 1 line
2.36.0
PATCH v2 9/16 imx: imx8mn-beacon: enable pinctrl_wdog in SPL
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi | 4 ++++ board/beacon/imx8mn/spl.c | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-)
arch/arm/dts/imx8mn-beacon-kit-u-boot.dtsi +4 -0
@@ -132,6 +132,10 @@ u-boot,dm-spl; }; +&pinctrl_wdog { + u-boot,dm-spl; +}; + &binman { u-boot-spl-ddr { filename = "u-boot-spl-ddr.bin";
board/beacon/imx8mn/spl.c +0 -10
@@ -68,27 +68,17 @@ int board_fit_config_name_match(const char *name) }#endif -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)#define PWM1_PAD_CTRL (PAD_CTL_FSEL2 | PAD_CTL_DSE6)static iomux_v3_cfg_t const pwm_pads[] = {IMX8MN_PAD_GPIO1_IO01__PWM1_OUT |MUX_PAD_CTRL (PWM1_PAD_CTRL ), }; -static iomux_v3_cfg_t const wdog_pads[] = { -IMX8MN_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 ; -/* Claiming pwm pins prevents LCD flicker during startup*/ imx_iomux_v3_setup_multiple_pads (pwm_pads,ARRAY_SIZE (pwm_pads)); -imx_iomux_v3_setup_multiple_pads (wdog_pads,ARRAY_SIZE (wdog_pads)); -set_wdog_reset (wdog); -init_uart_clk (1 );return 0 ;
Signature · 1 line
2.36.0
PATCH v2 10/16 imx: imx8mn_smm_s2: clean up board watchdog code
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- board/bsh/imx8mn_smm_s2/spl.c | 11 ----------- 1 file changed, 11 deletions(-)
board/bsh/imx8mn_smm_s2/spl.c +0 -11
@@ -40,19 +40,8 @@ void spl_board_init(void)puts ("Failed to find clock node. Check device tree\n" ); } -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -static const iomux_v3_cfg_t wdog_pads[] = { -IMX8MN_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); -init_uart_clk (3 );if (IS_ENABLED (CONFIG_NAND_MXS )) {
Signature · 1 line
2.36.0
PATCH v2 10/16 imx: imx8mn_smm_s2: clean up board watchdog code
Quoted 7 lines
From: Peng Fan <[email protected]>
pinctrl_wdogalready marked u-boot,dm-spl, so clean up board code. Theset_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>Tested-by Ariel D'Alessandro <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 11/16 imx: imx8mn_var_som: clean up board watchdog code
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- board/variscite/imx8mn_var_som/spl.c | 11 ----------- 1 file changed, 11 deletions(-)
board/variscite/imx8mn_var_som/spl.c +0 -11
@@ -40,19 +40,8 @@ void spl_board_init(void)puts ("Failed to find clock node. Check device tree\n" ); } -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -static const iomux_v3_cfg_t wdog_pads[] = { -IMX8MN_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); -init_uart_clk (3 );return 0 ;
Signature · 1 line
2.36.0
PATCH v2 12/16 imx: imx8mp_rsb7320a1: enable wdog driver model in SPL
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Mark wdog1/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.
--- arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi | 8 ++++++++ board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 12 ------------ 2 files changed, 8 insertions(+), 12 deletions(-)
arch/arm/dts/imx8mp-rsb3720-a1-u-boot.dtsi +8 -0
@@ -89,6 +89,14 @@ u-boot,dm-spl; }; +&wdog1 { + u-boot,dm-spl; +}; + +&pinctrl_wdog { + u-boot,dm-spl; +}; + &pinctrl_i2c1 { u-boot,dm-spl; };
board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +0 -12
@@ -28,12 +28,6 @@DECLARE_GLOBAL_DATA_PTR ; -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE) - -static const iomux_v3_cfg_t wdog_pads[] = { -MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B |MUX_PAD_CTRL (WDOG_PAD_CTRL ), -}; -#ifdef CONFIG_NAND_MXS static void setup_gpmi_nand (void ) {
@@ -69,12 +63,6 @@ u8 num_image_type_guids = ARRAY_SIZE(fw_images);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); -init_uart_clk (2 );return 0 ;
Signature · 1 line
2.36.0
PATCH v2 13/16 imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi | 4 ++++ board/kontron/sl-mx8mm/spl.c | 18 ------------------ 2 files changed, 4 insertions(+), 18 deletions(-)
arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi +4 -0
@@ -126,3 +126,7 @@ &wdog1 { u-boot,dm-spl; }; + +&pinctrl_wdog { + u-boot,dm-spl; +};
board/kontron/sl-mx8mm/spl.c +0 -18
@@ -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. */
Signature · 1 line
2.36.0
PATCH v2 14/16 imx: phycore_imx8mm/p: clean up board watchdog code
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- board/phytec/phycore_imx8mm/spl.c | 19 ------------------- board/phytec/phycore_imx8mp/spl.c | 19 ------------------- 2 files changed, 38 deletions(-)
board/phytec/phycore_imx8mm/spl.c +0 -19
@@ -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);
board/phytec/phycore_imx8mp/spl.c +0 -19
@@ -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);
Signature · 1 line
2.36.0
PATCH v2 15/16 imx: verdin-imx8mm/p: cleanup board watchdog code
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- board/toradex/verdin-imx8mp/verdin-imx8mp.c | 11 ----------- 1 file changed, 11 deletions(-)
board/toradex/verdin-imx8mp/verdin-imx8mp.c +0 -11
@@ -24,7 +24,6 @@DECLARE_GLOBAL_DATA_PTR ;#define UART_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_FSEL1) -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)/* Verdin UART_3, Console/Debug UART */ static const iomux_v3_cfg_t uart_pads[] = {
@@ -32,18 +31,8 @@ static const iomux_v3_cfg_t uart_pads[] = { MX8MP_PAD_UART3_TXD__UART3_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL), }; -static const iomux_v3_cfg_t 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); -imx_iomux_v3_setup_multiple_pads (uart_pads,ARRAY_SIZE (uart_pads));init_uart_clk (2 );
Signature · 1 line
2.36.0
Re: [PATCH V2 15/16] imx: verdin-imx8mm/p: cleanup board watchdog code
Hi Peng
Quoted 41 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
pinctrl_wdogalready marked u-boot,dm-spl, so clean up board code.The
set_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>---
board/toradex/verdin-imx8mp/verdin-imx8mp.c | 11 -----------1 file changed, 11 deletions(-)board/toradex/verdin-imx8mp/verdin-imx8mp.c +0
-0@@ -24,7 +24,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define UART_PAD_CTRL (PAD_CTL_DSE6 |PAD_CTL_FSEL1)
-#define WDOG_PAD_CTRL (PAD_CTL_DSE6 |PAD_CTL_ODE|PAD_CTL_PUE|PAD_CTL_PE)
/* VerdinUART_3, Console/Debug UART */
static constiomux_v3_cfg_tuart_pads[] = {board/toradex/verdin-imx8mp/verdin-imx8mp.c +0
-0@@ -32,18 +31,8 @@ static const iomux_v3_cfg_t uart_pads[] = { MX8MP_PAD_UART3_TXD__UART3_DCE_TX | MUX_PAD_CTRL(UART_PAD_CTRL), };board/toradex/verdin-imx8mp/verdin-imx8mp.c +0
-4-static const iomux_v3_cfg_t wdog_pads[] = { - MX8MP_PAD_GPIO1_IO02__WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL), -}; -int
board_early_init_f(void)
{
- structwdog_regs*wdog = (structwdog_regs*)WDOG1_BASE_ADDR;board/toradex/verdin-imx8mp/verdin-imx8mp.c +0
-5- - imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads)); - - set_wdog_reset(wdog); -
Quoted 3 lines
imx_iomux_v3_setup_multiple_pads(uart_pads,
ARRAY_SIZE(uart_pads));
init_uart_clk(2);
Unfortunately, this one won't apply anymore after the following hot-fix [1] and will require re-basing.
Sorry about that.
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Cheers
Marcel
PATCH v2 15/16 imx: verdin-imx8mm/p: cleanup board watchdog code
In reply to Peng Fan (OSS)Quoted 6 lines
From: Peng Fan <[email protected]>
pinctrl_wdogalready marked u-boot,dm-spl, so clean up board code. Theset_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================
PATCH v2 16/16 imx: toradex/verdin-imx8mm/p: cleanup board watchdog code
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
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.
--- board/toradex/verdin-imx8mm/spl.c | 11 ----------- 1 file changed, 11 deletions(-)
board/toradex/verdin-imx8mm/spl.c +0 -11
@@ -75,7 +75,6 @@ int board_fit_config_name_match(const char *name)#endif #define UART_PAD_CTRL (PAD_CTL_PUE | PAD_CTL_PE | PAD_CTL_DSE4) -#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)/* Verdin UART_3, Console/Debug UART */ static iomux_v3_cfg_t const uart_pads[] = {
@@ -83,20 +82,10 @@ static iomux_v3_cfg_t const uart_pads[] = { IMX8MM_PAD_SAI2_RXC_UART1_RX | MUX_PAD_CTRL(UART_PAD_CTRL), }; -static iomux_v3_cfg_t const wdog_pads[] = { -IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B |MUX_PAD_CTRL (WDOG_PAD_CTRL ), -}; -__weak void board_early_init (void ) { -struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR ; -init_uart_clk (0 ); -imx_iomux_v3_setup_multiple_pads (wdog_pads,ARRAY_SIZE (wdog_pads)); - -set_wdog_reset (wdog); -imx_iomux_v3_setup_multiple_pads (uart_pads,ARRAY_SIZE (uart_pads)); }
Signature · 1 line
2.36.0
PATCH v2 16/16 imx: toradex/verdin-imx8mm/p: cleanup board watchdog code
Quoted 6 lines
From: Peng Fan <[email protected]>
pinctrl_wdogalready marked u-boot,dm-spl, so clean up board code. Theset_wdog_reset()function is not necessary as this is handled by theimx_watchdog.cdriver due to the 'fsl,ext-reset-output' property being set.Signed-off-by Peng Fan <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected] =====================================================================