* [U-Boot] [PATCH 1/2] ARM: imx6qlogic: Cleanup board_init_f and enable spl_early_init
@ 2019-08-07 16:35 Adam Ford
2019-08-07 16:35 ` [U-Boot] [PATCH 2/2] ARM: imx6q_logic: Enable DM_SERIAL Adam Ford
2019-08-07 16:39 ` [U-Boot] [PATCH 1/2] ARM: imx6qlogic: Cleanup board_init_f and enable spl_early_init Fabio Estevam
0 siblings, 2 replies; 5+ messages in thread
From: Adam Ford @ 2019-08-07 16:35 UTC (permalink / raw)
To: u-boot
According to the the documentation, call spl_early_init from board_init_f
to make the device tree and driver model early before board_init_r.
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.
This patch removes the unneeded function calls from board_init_f and
enables early access to device tree and DM which will permit the use of
SPL_DM_SERIAL in the future.
Signed-off-by: Adam Ford <aford173@gmail.com>
diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c
index 6e3ffa72d7..2eea7aade5 100644
--- a/board/logicpd/imx6/imx6logic.c
+++ b/board/logicpd/imx6/imx6logic.c
@@ -347,13 +347,9 @@ void board_init_f(ulong dummy)
/* setup GP timer */
timer_init();
+ spl_early_init();
+
/* 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] 5+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: imx6q_logic: Enable DM_SERIAL
2019-08-07 16:35 [U-Boot] [PATCH 1/2] ARM: imx6qlogic: Cleanup board_init_f and enable spl_early_init Adam Ford
@ 2019-08-07 16:35 ` Adam Ford
2019-08-07 16:40 ` Fabio Estevam
2019-08-07 16:39 ` [U-Boot] [PATCH 1/2] ARM: imx6qlogic: Cleanup board_init_f and enable spl_early_init Fabio Estevam
1 sibling, 1 reply; 5+ messages in thread
From: Adam Ford @ 2019-08-07 16:35 UTC (permalink / raw)
To: u-boot
With spl_early_init() now enabled in board_init_f, the
preloader_console_init() function can correctly initialize the
serial port based on the device tree during SPL.
This patch enables DM_SERIAL in both U-Boot and SPL.
Signed-off-by: Adam Ford <aford173@gmail.com>
diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
index b95c9783a4..2c77b9c218 100644
--- a/configs/imx6q_logic_defconfig
+++ b/configs/imx6q_logic_defconfig
@@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
-CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_MX6LOGICPD=y
CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
@@ -84,6 +83,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] 5+ messages in thread
* [U-Boot] [PATCH 1/2] ARM: imx6qlogic: Cleanup board_init_f and enable spl_early_init
2019-08-07 16:35 [U-Boot] [PATCH 1/2] ARM: imx6qlogic: Cleanup board_init_f and enable spl_early_init Adam Ford
2019-08-07 16:35 ` [U-Boot] [PATCH 2/2] ARM: imx6q_logic: Enable DM_SERIAL Adam Ford
@ 2019-08-07 16:39 ` Fabio Estevam
1 sibling, 0 replies; 5+ messages in thread
From: Fabio Estevam @ 2019-08-07 16:39 UTC (permalink / raw)
To: u-boot
Hi Adam,
On Wed, Aug 7, 2019 at 1:36 PM Adam Ford <aford173@gmail.com> wrote:
>
> According to the the documentation, call spl_early_init from board_init_f
> to make the device tree and driver model early before board_init_r.
> 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.
>
> This patch removes the unneeded function calls from board_init_f and
> enables early access to device tree and DM which will permit the use of
> SPL_DM_SERIAL in the future.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
>
> diff --git a/board/logicpd/imx6/imx6logic.c b/board/logicpd/imx6/imx6logic.c
> index 6e3ffa72d7..2eea7aade5 100644
> --- a/board/logicpd/imx6/imx6logic.c
> +++ b/board/logicpd/imx6/imx6logic.c
> @@ -347,13 +347,9 @@ void board_init_f(ulong dummy)
> /* setup GP timer */
> timer_init();
>
> + spl_early_init();
> +
> /* 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);
I would suggest splitting these changes in two different patches.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: imx6q_logic: Enable DM_SERIAL
2019-08-07 16:35 ` [U-Boot] [PATCH 2/2] ARM: imx6q_logic: Enable DM_SERIAL Adam Ford
@ 2019-08-07 16:40 ` Fabio Estevam
2019-08-07 16:42 ` Adam Ford
0 siblings, 1 reply; 5+ messages in thread
From: Fabio Estevam @ 2019-08-07 16:40 UTC (permalink / raw)
To: u-boot
On Wed, Aug 7, 2019 at 1:36 PM Adam Ford <aford173@gmail.com> wrote:
>
> With spl_early_init() now enabled in board_init_f, the
> preloader_console_init() function can correctly initialize the
> serial port based on the device tree during SPL.
> This patch enables DM_SERIAL in both U-Boot and SPL.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
>
> diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
> index b95c9783a4..2c77b9c218 100644
> --- a/configs/imx6q_logic_defconfig
> +++ b/configs/imx6q_logic_defconfig
> @@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
> CONFIG_SPL_GPIO_SUPPORT=y
> CONFIG_SPL_LIBCOMMON_SUPPORT=y
> CONFIG_SPL_LIBGENERIC_SUPPORT=y
> -CONFIG_SYS_MALLOC_F_LEN=0x2000
Unrelated change?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/2] ARM: imx6q_logic: Enable DM_SERIAL
2019-08-07 16:40 ` Fabio Estevam
@ 2019-08-07 16:42 ` Adam Ford
0 siblings, 0 replies; 5+ messages in thread
From: Adam Ford @ 2019-08-07 16:42 UTC (permalink / raw)
To: u-boot
On Wed, Aug 7, 2019 at 11:39 AM Fabio Estevam <festevam@gmail.com> wrote:
>
> On Wed, Aug 7, 2019 at 1:36 PM Adam Ford <aford173@gmail.com> wrote:
> >
> > With spl_early_init() now enabled in board_init_f, the
> > preloader_console_init() function can correctly initialize the
> > serial port based on the device tree during SPL.
> > This patch enables DM_SERIAL in both U-Boot and SPL.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
> > index b95c9783a4..2c77b9c218 100644
> > --- a/configs/imx6q_logic_defconfig
> > +++ b/configs/imx6q_logic_defconfig
> > @@ -4,7 +4,6 @@ CONFIG_SYS_TEXT_BASE=0x17800000
> > CONFIG_SPL_GPIO_SUPPORT=y
> > CONFIG_SPL_LIBCOMMON_SUPPORT=y
> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
> > -CONFIG_SYS_MALLOC_F_LEN=0x2000
>
> Unrelated change?
It appears to be an artifact of the make savedefconfig. Newer updates
make CONFIG_SYS_MALLOC_F_LEN=0x2000 by default, so savedefconfig just
removed it.
I will do a V2 patch serial splitting the first patch into two
separate parts, then I'll remove this artifact from the 2nd patch.
adam
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-08-07 16:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-07 16:35 [U-Boot] [PATCH 1/2] ARM: imx6qlogic: Cleanup board_init_f and enable spl_early_init Adam Ford
2019-08-07 16:35 ` [U-Boot] [PATCH 2/2] ARM: imx6q_logic: Enable DM_SERIAL Adam Ford
2019-08-07 16:40 ` Fabio Estevam
2019-08-07 16:42 ` Adam Ford
2019-08-07 16:39 ` [U-Boot] [PATCH 1/2] ARM: imx6qlogic: Cleanup board_init_f and enable spl_early_init Fabio Estevam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.