imx9[4,5]_evk: Drop init_uart_clk from board code
v2 cover imx9[4,5]_evk: Drop init_uart_clk from board code
The serial driver could enable the uart clk using clk_enable, there is no need to call init_uart_clk in board_early_init_f.
The init_uart_clk() function is still kept, in case it is needed for debug purpose.
---
Changes in v2:
- Drop board_early_init_f and update defconfig
- Include cleanup to toradex smarc-imx95
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Peng Fan (3):
nxp: imx95_evk: Drop init_uart_clk
nxp: imx94_evk: Drop init_uart_clk
toradex: smarc-imx95: Drop init_uart_clk
board/nxp/imx94_evk/imx94_evk.c | 6 ------ board/nxp/imx94_evk/spl.c | 2 -- board/nxp/imx95_evk/imx95_evk.c | 8 -------- board/nxp/imx95_evk/spl.c | 2 -- board/toradex/smarc-imx95/smarc-imx95.c | 8 -------- board/toradex/smarc-imx95/spl.c | 2 -- configs/imx943_evk_defconfig | 1 - configs/imx95_15x15_evk_defconfig | 1 - configs/imx95_evk.config | 1 - configs/toradex-smarc-imx95_defconfig | 1 - 10 files changed, 32 deletions(-)
---
base-commit: b5213bbfdcb1812be510427857827ee8becb9f8f
change-id: 20260206-imx9-board-clean-uart-7eda1c7fed1c
Best regards,
Signature · 1 line
Peng Fan <[email protected]>
PATCH v2 1/3 nxp: imx95_evk: Drop init_uart_clk
From: Peng Fan <[email protected]>
Rely on serial driver calling clk_enable to enable the lpuart clk, no need to do init_uart_clk in board_early_init_f().
Also remove board_early_init_f(), because it is empty now.
--- board/nxp/imx95_evk/imx95_evk.c | 8 -------- board/nxp/imx95_evk/spl.c | 2 -- configs/imx95_15x15_evk_defconfig | 1 - configs/imx95_evk.config | 1 - 4 files changed, 12 deletions(-)
board/nxp/imx95_evk/imx95_evk.c +0 -8
@@ -7,14 +7,6 @@#include <asm/arch/clock.h> #include <asm/mach-imx/sys_proto.h> -int board_early_init_f (void ) -{ -/* UART1: A55, UART2: M33, UART3: M7 */ -init_uart_clk (0 ); - -return 0 ; -} -int board_late_init (void ) {if (IS_ENABLED (CONFIG_ENV_IS_IN_MMC ))
board/nxp/imx95_evk/spl.c +0 -2
@@ -67,8 +67,6 @@ void board_init_f(ulong dummy)arch_cpu_init (); -board_early_init_f (); -preloader_console_init ();debug ("SOC: 0x%x\n" , gd->arch.soc_rev);
configs/imx95_15x15_evk_defconfig +0 -1
@@ -38,7 +38,6 @@ CONFIG_BOOTCOMMAND="bootflow scan -l; run bsp_bootcmd" CONFIG_DEFAULT_FDT_FILE="imx95-15x15-evk.dtb" CONFIG_SYS_CBSIZE=2048 CONFIG_SYS_PBSIZE=2074 -CONFIG_BOARD_EARLY_INIT_F=y # CONFIG_BOARD_INIT is not set CONFIG_BOARD_LATE_INIT=y CONFIG_PCI_INIT_R=y
configs/imx95_evk.config +0 -1
@@ -37,7 +37,6 @@ CONFIG_BOOTCOMMAND="bootflow scan -l; run bsp_bootcmd" CONFIG_DEFAULT_FDT_FILE="imx95-19x19-evk.dtb" CONFIG_SYS_CBSIZE=2048 CONFIG_SYS_PBSIZE=2074 -CONFIG_BOARD_EARLY_INIT_F=y # CONFIG_BOARD_INIT is not set CONFIG_BOARD_LATE_INIT=y CONFIG_PCI_INIT_R=y
Signature · 1 line
2.51.0
PATCH v2 2/3 nxp: imx94_evk: Drop init_uart_clk
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Rely on serial driver calling clk_enable to enable the lpuart clk, no need to do init_uart_clk in board_early_init_f().
Also remove board_early_init_f(), because it is empty now.
--- board/nxp/imx94_evk/imx94_evk.c | 6 ------ board/nxp/imx94_evk/spl.c | 2 -- configs/imx943_evk_defconfig | 1 - 3 files changed, 9 deletions(-)
board/nxp/imx94_evk/imx94_evk.c +0 -6
@@ -9,12 +9,6 @@#include <asm/arch/clock.h> #include <asm/mach-imx/sys_proto.h> -int board_early_init_f (void ) -{ -init_uart_clk (0 ); -return 0 ; -} -int board_init (void ) {return 0 ;
board/nxp/imx94_evk/spl.c +0 -2
@@ -69,8 +69,6 @@ void board_init_f(ulong dummy)arch_cpu_init (); -board_early_init_f (); -preloader_console_init ();debug ("SOC: 0x%x\n" , gd->arch.soc_rev);
configs/imx943_evk_defconfig +0 -1
@@ -37,7 +37,6 @@ CONFIG_BOOTCOMMAND="bootflow scan -l; run bsp_bootcmd" CONFIG_DEFAULT_FDT_FILE="imx943-evk.dtb" CONFIG_SYS_CBSIZE=2048 CONFIG_SYS_PBSIZE=2074 -CONFIG_BOARD_EARLY_INIT_F=y CONFIG_BOARD_LATE_INIT=y CONFIG_PCI_INIT_R=y CONFIG_SPL_MAX_SIZE=0x30000
Signature · 1 line
2.51.0
PATCH v2 3/3 toradex: smarc-imx95: Drop init_uart_clk
In reply to Peng Fan (OSS)From: Peng Fan <[email protected]>
Rely on serial driver calling clk_enable to enable the lpuart clk, no need to do init_uart_clk in board_early_init_f().
Also remove board_early_init_f(), because it is empty now.
--- board/toradex/smarc-imx95/smarc-imx95.c | 8 -------- board/toradex/smarc-imx95/spl.c | 2 -- configs/toradex-smarc-imx95_defconfig | 1 - 3 files changed, 11 deletions(-)
board/toradex/smarc-imx95/smarc-imx95.c +0 -8
@@ -8,14 +8,6 @@#include "../common/tdx-cfg-block.h" -int board_early_init_f (void ) -{ -/* UART1: A55 */ -init_uart_clk (0 ); - -return 0 ; -} -int board_phys_sdram_size (phys_size_t *size) { *size =PHYS_SDRAM_SIZE +PHYS_SDRAM_2_SIZE ;
board/toradex/smarc-imx95/spl.c +0 -2
@@ -105,8 +105,6 @@ void board_init_f(ulong dummy)arch_cpu_init (); -board_early_init_f (); -preloader_console_init ();debug ("SOC: 0x%x\n" , gd->arch.soc_rev);
configs/toradex-smarc-imx95_defconfig +0 -1
@@ -43,7 +43,6 @@ CONFIG_SYS_PBSIZE=2074 CONFIG_LOG=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_BOARD_EARLY_INIT_F=y # CONFIG_BOARD_INIT is not set CONFIG_SPL_MAX_SIZE=0x30000 CONFIG_SPL_BOARD_INIT=y
Signature · 1 line
2.51.0
Re: [PATCH v2 3/3] toradex: smarc-imx95: Drop init_uart_clk
Hello Peng,
thanks for the patch.
Quoted 8 lines · Peng Fan (OSS)
From: Peng Fan <[email protected]>
Rely on serial driver calling
clk_enableto enable the lpuart clk, no need to doinit_uart_clkinboard_early_init_f().Also remove
board_early_init_f(), because it is empty now.Signed-off-by Peng Fan <[email protected]>
Francesco