[PATCH v3 17/38] common: Move initr_addr_map() to a bit earlier

Priyanka Jain (OSS) priyanka.jain at oss.nxp.com
Fri Feb 26 10:37:28 CET 2021


>-----Original Message-----
>From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Bin Meng
>Sent: Thursday, February 25, 2021 2:53 PM
>To: Simon Glass <sjg at chromium.org>; Alexander Graf <agraf at csgraf.de>;
>Priyanka Jain <priyanka.jain at nxp.com>
>Cc: U-Boot Mailing List <u-boot at lists.denx.de>; Tom Rini
><trini at konsulko.com>; Marek Szyprowski <m.szyprowski at samsung.com>;
>Matthias Brugger <mbrugger at suse.com>
>Subject: [PATCH v3 17/38] common: Move initr_addr_map() to a bit earlier
>
>At present initr_addr_map() is put at a late stage in the init_sequence_r[] calls.
>This won't work because lot of device driver initialization (e.g.: serial port)
>happens before it but is lack of the address translation support.
>
>This moves the call to a bit earlier, right after the DM initialization.
>
>Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
>Reviewed-by: Simon Glass <sjg at chromium.org>
>Reviewed-by: Priyanka Jain <priyanka.jain at nxp.com>
>---
>
>(no changes since v1)
>
> common/board_r.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
>diff --git a/common/board_r.c b/common/board_r.c index 9793439..c835ff8
>100644
>--- a/common/board_r.c
>+++ b/common/board_r.c
>@@ -626,6 +626,9 @@ static init_fnc_t init_sequence_r[] = {  #ifdef
>CONFIG_DM
> 	initr_dm,
> #endif
>+#ifdef CONFIG_ADDR_MAP
>+	initr_addr_map,
>+#endif
> #if defined(CONFIG_ARM) || defined(CONFIG_NDS32) ||
>defined(CONFIG_RISCV) || \
> 	defined(CONFIG_SANDBOX)
> 	board_init,	/* Setup chipselects */
>@@ -661,9 +664,6 @@ static init_fnc_t init_sequence_r[] = {
> 	initr_manual_reloc_cmdtable,
> #endif
> 	arch_initr_trap,
>-#ifdef CONFIG_ADDR_MAP
>-	initr_addr_map,
>-#endif
> #if defined(CONFIG_BOARD_EARLY_INIT_R)
> 	board_early_init_r,
> #endif
>--
>2.7.4

Kindly fix below if possible

WARNING: Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible
#29: FILE: common/board_r.c:629:
+#ifdef CONFIG_ADDR_MAP

total: 0 errors, 1 warnings, 0 checks, 18 lines checked

Regards
Priyanka



More information about the U-Boot mailing list