123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- From 4c82eeab9840983693791117aa75f7bd7fbc805b Mon Sep 17 00:00:00 2001
- From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
- Date: Thu, 15 May 2025 17:09:52 +0200
- Subject: [PATCH] arm: imx: imx8m: soc: replace ifdef by IS_ENABLED()
- Standardize on using the IS_ENABLED macro.
- Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
- Reviewed-by: Peng Fan <peng.fan@nxp.com>
- Upstream: https://source.denx.de/u-boot/u-boot/-/commit/4c82eeab9840983693791117aa75f7bd7fbc805b
- ---
- arch/arm/mach-imx/imx8m/soc.c | 40 +++++++++++++++++------------------
- 1 file changed, 20 insertions(+), 20 deletions(-)
- diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
- index 806adcf145fa..3cdb71a25284 100644
- --- a/arch/arm/mach-imx/imx8m/soc.c
- +++ b/arch/arm/mach-imx/imx8m/soc.c
- @@ -38,7 +38,7 @@
-
- DECLARE_GLOBAL_DATA_PTR;
-
- -#if defined(CONFIG_IMX_HAB)
- +#if IS_ENABLED(CONFIG_IMX_HAB)
- struct imx_fuse const imx_sec_config_fuse = {
- .bank = 1,
- .word = 3,
- @@ -52,7 +52,7 @@ struct imx_fuse const imx_field_return_fuse = {
-
- int timer_init(void)
- {
- -#ifdef CONFIG_XPL_BUILD
- +#if IS_ENABLED(CONFIG_XPL_BUILD)
- struct sctr_regs *sctr = (struct sctr_regs *)SYSCNT_CTRL_BASE_ADDR;
- unsigned long freq = readl(&sctr->cntfid0);
-
- @@ -110,7 +110,7 @@ void set_wdog_reset(struct wdog_regs *wdog)
- setbits_le16(&wdog->wcr, WDOG_WDT_MASK | WDOG_WDZST_MASK);
- }
-
- -#ifdef CONFIG_ARMV8_PSCI
- +#if IS_ENABLED(CONFIG_ARMV8_PSCI)
- #define PTE_MAP_NS PTE_BLOCK_NS
- #else
- #define PTE_MAP_NS 0
- @@ -700,11 +700,11 @@ int arch_cpu_init(void)
- return 0;
- }
-
- -#if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP)
- +#if IS_ENABLED(CONFIG_IMX8MN) || IS_ENABLED(CONFIG_IMX8MP)
- struct rom_api *g_rom_api = (struct rom_api *)0x980;
- #endif
-
- -#if defined(CONFIG_IMX8M)
- +#if IS_ENABLED(CONFIG_IMX8M)
- #include <spl.h>
- int imx8m_detect_secondary_image_boot(void)
- {
- @@ -790,8 +790,8 @@ 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_IMX8MN) || IS_ENABLED(CONFIG_IMX8MP)
- +#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)
- @@ -834,7 +834,7 @@ bool is_usb_boot(void)
- return get_boot_device() == USB_BOOT;
- }
-
- -#ifdef CONFIG_OF_SYSTEM_SETUP
- +#if IS_ENABLED(CONFIG_OF_SYSTEM_SETUP)
- bool check_fdt_new_path(void *blob)
- {
- const char *soc_path = "/soc@0";
- @@ -880,7 +880,7 @@ add_status:
- return 0;
- }
-
- -#ifdef CONFIG_IMX8MQ
- +#if IS_ENABLED(CONFIG_IMX8MQ)
- bool check_dcss_fused(void)
- {
- struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
- @@ -1026,7 +1026,7 @@ int disable_vpu_nodes(void *blob)
- return -EPERM;
- }
-
- -#ifdef CONFIG_IMX8MN_LOW_DRIVE_MODE
- +#if IS_ENABLED(CONFIG_IMX8MN_LOW_DRIVE_MODE)
- static int low_drive_gpu_freq(void *blob)
- {
- static const char *nodes_path_8mn[] = {
- @@ -1311,7 +1311,7 @@ int ft_system_setup(void *blob, struct bd_info *bd)
- "/cpus/cpu@3",
- };
-
- -#ifdef CONFIG_IMX8MQ
- +#if IS_ENABLED(CONFIG_IMX8MQ)
- int i = 0;
- int rc;
- int nodeoff;
- @@ -1387,7 +1387,7 @@ usb_modify_speed:
- if (is_imx8md())
- disable_cpu_nodes(blob, nodes_path, 2, 4);
-
- -#elif defined(CONFIG_IMX8MM)
- +#elif IS_ENABLED(CONFIG_IMX8MM)
- if (is_imx8mml() || is_imx8mmdl() || is_imx8mmsl())
- disable_vpu_nodes(blob);
-
- @@ -1396,10 +1396,10 @@ usb_modify_speed:
- else if (is_imx8mms() || is_imx8mmsl())
- disable_cpu_nodes(blob, nodes_path, 3, 4);
-
- -#elif defined(CONFIG_IMX8MN)
- +#elif IS_ENABLED(CONFIG_IMX8MN)
- if (is_imx8mnl() || is_imx8mndl() || is_imx8mnsl())
- disable_gpu_nodes(blob);
- -#ifdef CONFIG_IMX8MN_LOW_DRIVE_MODE
- +#if IS_ENABLED(CONFIG_IMX8MN_LOW_DRIVE_MODE)
- else {
- int ldm_gpu = low_drive_gpu_freq(blob);
-
- @@ -1415,7 +1415,7 @@ usb_modify_speed:
- else if (is_imx8mns() || is_imx8mnsl() || is_imx8mnus())
- disable_cpu_nodes(blob, nodes_path, 3, 4);
-
- -#elif defined(CONFIG_IMX8MP)
- +#elif IS_ENABLED(CONFIG_IMX8MP)
- if (is_imx8mpul()) {
- /* Disable GPU */
- disable_gpu_nodes(blob);
- @@ -1471,7 +1471,7 @@ void reset_cpu(void)
- }
- #endif
-
- -#if defined(CONFIG_ARCH_MISC_INIT)
- +#if IS_ENABLED(CONFIG_ARCH_MISC_INIT)
- int arch_misc_init(void)
- {
- if (IS_ENABLED(CONFIG_FSL_CAAM)) {
- @@ -1487,8 +1487,8 @@ int arch_misc_init(void)
- }
- #endif
-
- -#if defined(CONFIG_XPL_BUILD)
- -#if defined(CONFIG_IMX8MQ) || defined(CONFIG_IMX8MM) || defined(CONFIG_IMX8MN)
- +#if IS_ENABLED(CONFIG_XPL_BUILD)
- +#if IS_ENABLED(CONFIG_IMX8MQ) || IS_ENABLED(CONFIG_IMX8MM) || IS_ENABLED(CONFIG_IMX8MN)
- bool serror_need_skip = true;
-
- void do_error(struct pt_regs *pt_regs)
- @@ -1523,7 +1523,7 @@ void do_error(struct pt_regs *pt_regs)
- #endif
- #endif
-
- -#if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP)
- +#if IS_ENABLED(CONFIG_IMX8MN) || IS_ENABLED(CONFIG_IMX8MP)
- enum env_location arch_env_get_location(enum env_operation op, int prio)
- {
- enum boot_device dev = get_boot_device();
- @@ -1571,7 +1571,7 @@ enum env_location arch_env_get_location(enum env_operation op, int prio)
-
- #endif
-
- -#ifdef CONFIG_IMX_BOOTAUX
- +#if IS_ENABLED(CONFIG_IMX_BOOTAUX)
- const struct rproc_att hostmap[] = {
- /* aux core , host core, size */
- { 0x00000000, 0x007e0000, 0x00020000 },
- --
- 2.43.0
|