From: Peng Fan <peng....@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....@nxp.com>
---
 arch/arm/include/asm/mach-imx/sys_proto.h | 2 --
 arch/arm/mach-imx/Kconfig                 | 3 ++-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/mach-imx/sys_proto.h 
b/arch/arm/include/asm/mach-imx/sys_proto.h
index fdbbfb169cb..fc5e5c66aad 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_IMX8M) || defined(CONFIG_IMX8ULP)
 struct rom_api {
        u16 ver;
        u16 tag;
@@ -178,7 +177,6 @@ enum boot_dev_type_e {
 #define ROM_API_OKAY           0xF0
 
 extern struct rom_api *g_rom_api;
-#endif
 
 /* For i.MX ULP */
 #define BT0CFG_LPBOOT_MASK     0x1
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index ad0fb365023..5e9c4d9b355 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -166,7 +166,8 @@ config DDRMC_VF610_CALIBRATION
 
 config SPL_IMX_ROMAPI_LOADADDR
        hex "Default load address to load image through ROM API"
-       depends on IMX8MN || IMX8MP || IMX8ULP
+       depends on SPL_BOOTROM_SUPPORT
+       default 0
 
 config IMX_DCD_ADDR
        hex "DCD Blocks location on the image"
-- 
2.36.0

Reply via email to