public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 1/2] rockchip: rk3399: fix incorrect ifdef check on SPL_DM_REGULATOR
@ 2022-07-15 15:09 Quentin Schulz
  2022-07-15 15:09 ` [PATCH v2 2/2] rockchip: rk3399: fix incorrect ifdef check on SPL_GPIO Quentin Schulz
  2022-07-18 20:05 ` [SPAM] [PATCH v2 1/2] rockchip: rk3399: fix incorrect ifdef check on SPL_DM_REGULATOR Xavier Drudis Ferran
  0 siblings, 2 replies; 5+ messages in thread
From: Quentin Schulz @ 2022-07-15 15:09 UTC (permalink / raw)
  Cc: sjg, philipp.tomsich, kever.yang, alpernebiyasak, email2tema,
	jagan, u-boot, Quentin Schulz, Quentin Schulz

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

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>
---

v2:
 - use IS_ENABLED checks,

 arch/arm/mach-rockchip/rk3399/rk3399.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-rockchip/rk3399/rk3399.c b/arch/arm/mach-rockchip/rk3399/rk3399.c
index de11a3fa30..920da22307 100644
--- a/arch/arm/mach-rockchip/rk3399/rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/rk3399.c
@@ -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
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-18 20:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-15 15:09 [PATCH v2 1/2] rockchip: rk3399: fix incorrect ifdef check on SPL_DM_REGULATOR Quentin Schulz
2022-07-15 15:09 ` [PATCH v2 2/2] rockchip: rk3399: fix incorrect ifdef check on SPL_GPIO Quentin Schulz
2022-07-18  9:53   ` [SPAM] " Xavier Drudis Ferran
2022-07-18 20:02   ` Xavier Drudis Ferran
2022-07-18 20:05 ` [SPAM] [PATCH v2 1/2] rockchip: rk3399: fix incorrect ifdef check on SPL_DM_REGULATOR Xavier Drudis Ferran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox