ARM: imx6qlogic: Cleanup board_init_f
PATCH v2 1/2 ARM: imx6qlogic: Cleanup board_init_f
Per the workflow found in crt0.S, we don't need to clear BSS in board_init_f nor do we need to call board_init_r since that will be done for us from main when we return from board_init_f.
This patch removes the unneeded function calls from board_init_f.
---
V2: Limit this patch to only removing unneeded function calls.
board/logicpd/imx6/imx6logic.c +0 -6
@@ -349,11 +349,5 @@ void board_init_f(ulong dummy)/* UART clocks enabled and gd valid - init serial console */ preloader_console_init(); - -/* Clear the BSS. */ -memset (__bss_start,0 , __bss_end - __bss_start); - -/* load/boot image from boot device */ - board_init_r(NULL, 0); }#endif
Signature · 1 line
2.17.1
PATCH v2 2/2 ARM: imx6q_logic: Enable DM_SERIAL
In order to call preloader_console_init from board_init_f when DM_SERIAL is enabled, it neesd to call spl_early_init() to get early access to DM and device tree.
This patch calls spl_early_init just before preloader_console_init() and enables DM_SERIAL and SPL_DM_SERIAL.
---
V2: Add the call to spl_early_init this patch which is requred for DM_SERIAL
board/logicpd/imx6/imx6logic.c +3 -0
@@ -347,6 +347,9 @@ void board_init_f(ulong dummy)/* setup GP timer */ timer_init (); +/* Enable device tree and early DM support*/ +spl_early_init (); +/* UART clocks enabled and gd valid - init serial console */ preloader_console_init (); }
configs/imx6q_logic_defconfig +1 -0
@@ -84,6 +84,7 @@ CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_PFUZE100=y CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_GPIO=y +CONFIG_DM_SERIAL=y CONFIG_MXC_UART=y CONFIG_USB=y CONFIG_DM_USB=y
Signature · 1 line
2.17.1
Fabio Estevam
reviewerPATCH v2 2/2 ARM: imx6q_logic: Enable DM_SERIAL
Quoted 11 lines · Adam Ford
In order to call
preloader_console_initfromboard_init_fwhenDM_SERIALis enabled, it neesd to callspl_early_init()to get early access to DM and device tree.This patch calls
spl_early_initjust beforepreloader_console_init()and enablesDM_SERIALandSPL_DM_SERIAL.Signed-off-by Adam Ford <[email protected]>---
V2: Add the call tospl_early_initthis patch which is requred forDM_SERIAL
Fabio Estevam
reviewerPATCH v2 1/2 ARM: imx6qlogic: Cleanup board_init_f
In reply to Adam FordHi Adam,
Quoted 10 lines · Adam Ford
Per the workflow found in
crt0.S, we don't need to clear BSS inboard_init_fnor do we need to callboard_init_rsince that will be done for us from main when we return fromboard_init_f.This patch removes the unneeded function calls from
board_init_f.Signed-off-by Adam Ford <[email protected]>---
V2: Limit this patch to only removing unneeded function calls.