* [U-Boot] [PATCH V2 1/2] ARM: imx6qlogic: Cleanup board_init_f
@ 2019-08-07 17:05 Adam Ford
2019-08-07 17:05 ` [U-Boot] [PATCH V2 2/2] ARM: imx6q_logic: Enable DM_SERIAL Adam Ford
2019-08-07 23:22 ` [U-Boot] [PATCH V2 1/2] ARM: imx6qlogic: Cleanup board_init_f Fabio Estevam
0 siblings, 2 replies; 4+ messages in thread
From: Adam Ford @ 2019-08-07 17:05 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2: Limit this patch to only removing unneeded function calls.
diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c
index 6e3ffa72d7..d97f9e18af 100644
--- a/board/logicpd/imx6/imx6logic.c
+++ b/board/logicpd/imx6/imx6logic.c
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V2 2/2] ARM: imx6q_logic: Enable DM_SERIAL
2019-08-07 17:05 [U-Boot] [PATCH V2 1/2] ARM: imx6qlogic: Cleanup board_init_f Adam Ford
@ 2019-08-07 17:05 ` Adam Ford
2019-08-07 23:23 ` Fabio Estevam
2019-08-07 23:22 ` [U-Boot] [PATCH V2 1/2] ARM: imx6qlogic: Cleanup board_init_f Fabio Estevam
1 sibling, 1 reply; 4+ messages in thread
From: Adam Ford @ 2019-08-07 17:05 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2: Add the call to spl_early_init this patch which is requred for DM_SERIAL
diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c
index d97f9e18af..218ed6f356 100644
--- a/board/logicpd/imx6/imx6logic.c
+++ b/board/logicpd/imx6/imx6logic.c
@@ -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();
}
diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
index b95c9783a4..c2c46d2f57 100644
--- a/configs/imx6q_logic_defconfig
+++ b/configs/imx6q_logic_defconfig
@@ -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
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V2 1/2] ARM: imx6qlogic: Cleanup board_init_f
2019-08-07 17:05 [U-Boot] [PATCH V2 1/2] ARM: imx6qlogic: Cleanup board_init_f Adam Ford
2019-08-07 17:05 ` [U-Boot] [PATCH V2 2/2] ARM: imx6q_logic: Enable DM_SERIAL Adam Ford
@ 2019-08-07 23:22 ` Fabio Estevam
1 sibling, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2019-08-07 23:22 UTC (permalink / raw)
To: u-boot
Hi Adam,
On Wed, Aug 7, 2019 at 2:06 PM Adam Ford <aford173@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V2: Limit this patch to only removing unneeded function calls.
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V2 2/2] ARM: imx6q_logic: Enable DM_SERIAL
2019-08-07 17:05 ` [U-Boot] [PATCH V2 2/2] ARM: imx6q_logic: Enable DM_SERIAL Adam Ford
@ 2019-08-07 23:23 ` Fabio Estevam
0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2019-08-07 23:23 UTC (permalink / raw)
To: u-boot
On Wed, Aug 7, 2019 at 2:06 PM Adam Ford <aford173@gmail.com> wrote:
>
> 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.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V2: Add the call to spl_early_init this patch which is requred for DM_SERIAL
Reviewed-by: Fabio Estevam <festevam@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-07 23:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07 17:05 [U-Boot] [PATCH V2 1/2] ARM: imx6qlogic: Cleanup board_init_f Adam Ford
2019-08-07 17:05 ` [U-Boot] [PATCH V2 2/2] ARM: imx6q_logic: Enable DM_SERIAL Adam Ford
2019-08-07 23:23 ` Fabio Estevam
2019-08-07 23:22 ` [U-Boot] [PATCH V2 1/2] ARM: imx6qlogic: Cleanup board_init_f Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox