]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
rockchip: rk3399: fix incorrect ifdef check on SPL_DM_REGULATOR
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>
Fri, 22 Jul 2022 09:30:13 +0000 (11:30 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Wed, 19 Oct 2022 11:30:48 +0000 (19:30 +0800)
The check to perform is on CONFIG_SPL_DM_REGULATOR and not
SPL_DM_REGULATOR. Also switch to in-code check instead of ifdefs.

Fixes: 07586ee4322a ("rockchip: rk3399: Support common spl_board_init")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com> # Rock960
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/mach-rockchip/rk3399/rk3399.c

index 21db03b961c63243fd0c9957843043b4456e516c..572c843632e46d8e896da6cca87735503351a5b2 100644 (file)
@@ -275,13 +275,14 @@ void spl_board_init(void)
                rk3399_force_power_on_reset();
 #endif
 
-#if defined(SPL_DM_REGULATOR)
-       /*
-        * Turning the eMMC and SPI back on (if disabled via the Qseven
-        * BIOS_ENABLE) signal is done through a always-on regulator).
-        */
-       if (regulators_enable_boot_on(false))
-               debug("%s: Cannot enable boot on regulator\n", __func__);
-#endif
+       if (IS_ENABLED(CONFIG_SPL_DM_REGULATOR)) {
+               /*
+                * Turning the eMMC and SPI back on (if disabled via the Qseven
+                * BIOS_ENABLE) signal is done through a always-on regulator).
+                */
+               if (regulators_enable_boot_on(false))
+                       debug("%s: Cannot enable boot on regulator\n",
+                             __func__);
+       }
 }
 #endif