arm: imx: imx8m: soc: fix the macro name
Subsystems (3)
PATCH v2 1/2 arm: imx: imx8m: soc: fix the macro name
From: Michael Trimarchi <[email protected]>
The function arch_spl_mmc_get_uboot_raw_sector() was never compiled, even when the option CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION was enabled. So rename the macro SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION to CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION.
---
Changes in v2:
- Add Reviewed-by tag of Quentin Schulz
arch/arm/mach-imx/imx8m/soc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-imx/imx8m/soc.c +2 -2
@@ -791,7 +791,7 @@ int boot_mode_getprisec(void)#endif #if defined(CONFIG_IMX8MN ) || defined(CONFIG_IMX8MP ) -#ifdef SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION #define IMG_CNTN_SET1_OFFSET GENMASK(22, 19)unsigned long arch_spl_mmc_get_uboot_raw_sector (struct mmc *mmc,unsigned long raw_sect)
@@ -826,7 +826,7 @@ unsigned long arch_spl_mmc_get_uboot_raw_sector(struct mmc *mmc,return raw_sect; } -#endif /* SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION */ +#endif /* CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION */ #endif bool is_usb_boot (void )
Signature · 4 lines
2.43.0 base-commit: 1b5e435102aa29a665119430196cb366ce36a01b branch: fix-SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
PATCH v2 2/2 arm: imx: imx8m: soc: replace ifdef by IS_ENABLED()
Standardize on using the IS_ENABLED macro.
---
(no changes since v1)
arch/arm/mach-imx/imx8m/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/imx8m/soc.c +1 -1
@@ -791,7 +791,7 @@ int boot_mode_getprisec(void)#endif #if defined(CONFIG_IMX8MN ) || defined(CONFIG_IMX8MP ) -#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION +#if IS_ENABLED (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION )#define IMG_CNTN_SET1_OFFSET GENMASK(22, 19)unsigned long arch_spl_mmc_get_uboot_raw_sector (struct mmc *mmc,unsigned long raw_sect)
Signature · 4 lines
2.43.0 base-commit: 1b5e435102aa29a665119430196cb366ce36a01b branch: fix-SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
Re: [PATCH v2 2/2] arm: imx: imx8m: soc: replace ifdef by IS_ENABLED()
Hi Dario,
Quoted 16 lines · Dario Binacchi
Standardize on using the
IS_ENABLEDmacro.Signed-off-by Dario Binacchi <[email protected]>---
(no changes since v1)
arch/arm/mach-imx/imx8m/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-imx/imx8m/soc.c +0
-0
arch/arm/mach-imx/imx8m/soc.c int boot_mode_getprisec(void) · line 793
Quoted 3 lines
arch/arm/mach-imx/imx8m/soc.c +0
-0@@ -791,7 +791,7 @@ int boot_mode_getprisec(void)#endif #if defined(CONFIG_IMX8MN ) || defined(CONFIG_IMX8MP )
You can even do those two as well :)
and all the others in this file :) I would recommend to only do for those that start with CONFIG_ which are Kconfig symbols. E.g. PHYS_SDRAM_2_SIZE isn't, so I don't think you can use IS_ENABLED.
The easiest way to check everything is fine is to compile before and after patching the file and checking that the output is bit to bit identical (you may need to change the SOURCE_DATE_EPOCH to guarantee that though?
Thanks!
Quentin
Re: [PATCH v2 2/2] arm: imx: imx8m: soc: replace ifdef by IS_ENABLED()
Quoted 24 lines · Quentin Schulz
Hi Dario,
Quoted 16 lines · Dario Binacchi
Standardize on using the
IS_ENABLEDmacro.Signed-off-by Dario Binacchi <[email protected]>---
(no changes since v1)
arch/arm/mach-imx/imx8m/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/mach-imx/imx8m/soc.c +0
-0arch/arm/mach-imx/imx8m/soc.c int boot_mode_getprisec(void) · line 792
Quoted 2 lines
arch/arm/mach-imx/imx8m/soc.c +0
-0@@ -791,7 +791,7 @@ int boot_mode_getprisec(void)#endif #if defined(CONFIG_IMX8MN ) || defined(CONFIG_IMX8MP )You can even do those two as well :)
Quoted 7 lines
and all the others in this file :) I would recommend to only do for those that start with
CONFIG_which areKconfigsymbols. E.g.PHYS_SDRAM_2_SIZEisn't, so I don't think you can useIS_ENABLED.The easiest way to check everything is fine is to compile before and after patching the file and checking that the output is bit to bit identical (you may need to change the
SOURCE_DATE_EPOCHto guarantee that though?
A change like that would just be code churn and I'd rather not see it. Especially since yes, you *can* get away with IS_ENABLED(FOO) and the kernel does it in a few places, but you shouldn't do that in U-Boot as it's more likely to be an error (you wanted IS_ENABLED(CONFIG_FOO)) than a helpful case of:
if (IS_ENABLED(FOO)) { ... }Signature · 1 line
Tom