diff mbox series

[V2,05/53] imx: simplify dependency with SPL_BOOTROM_SUPPORT

Message ID 20220726084123.2508-6-peng.fan@oss.nxp.com
State Accepted
Commit 793b760fb0462c0b576862f6a0401f22ccd1dd36
Delegated to: Stefano Babic
Headers show
Series NXP-IMX pending patches | expand

Commit Message

Peng Fan (OSS) July 26, 2022, 8:40 a.m. UTC
From: Peng Fan <peng.fan@nxp.com>

For SoCs support ROM API, CONFIG_SPL_BOOTROM_SUPPORT is needed,
so use this macro to guard the code to avoid extend the list.

And drop the guard with structure definition, there is no need.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/include/asm/mach-imx/sys_proto.h | 3 ---
 arch/arm/mach-imx/Kconfig                 | 3 ++-
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

Stefano Babic July 26, 2022, 1:52 p.m. UTC | #1
> From: Peng Fan <peng.fan@nxp.com>
> For SoCs support ROM API, CONFIG_SPL_BOOTROM_SUPPORT is needed,
> so use this macro to guard the code to avoid extend the list.
> And drop the guard with structure definition, there is no need.
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h b/arch/arm/include/asm/mach-imx/sys_proto.h
index fadb67d04a2..3095214f116 100644
--- a/arch/arm/include/asm/mach-imx/sys_proto.h
+++ b/arch/arm/include/asm/mach-imx/sys_proto.h
@@ -146,7 +146,6 @@  struct rproc_att {
 	u32 size; /* size of reg range */
 };
 
-#if defined(CONFIG_IMX8_ROMAPI)
 struct rom_api {
 	u16 ver;
 	u16 tag;
@@ -182,8 +181,6 @@  extern struct rom_api *g_rom_api;
 u32 rom_api_download_image(u8 *dest, u32 offset, u32 size);
 u32 rom_api_query_boot_infor(u32 info_type, u32 *info);
 
-#endif
-
 /* For i.MX ULP */
 #define BT0CFG_LPBOOT_MASK	0x1
 #define BT0CFG_DUALBOOT_MASK	0x2
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 50f4c08ea31..6b597520a24 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -170,7 +170,8 @@  config IMX8_ROMAPI
 
 config SPL_IMX_ROMAPI_LOADADDR
 	hex "Default load address to load image through ROM API"
-	depends on IMX8_ROMAPI
+	depends on IMX8_ROMAPI || SPL_BOOTROM_SUPPORT
+	default 0
 
 config IMX_DCD_ADDR
 	hex "DCD Blocks location on the image"