From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B836DC43334 for ; Fri, 15 Jul 2022 15:10:16 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D9D37810EA; Fri, 15 Jul 2022 17:10:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 6A96A810E9; Fri, 15 Jul 2022 17:10:12 +0200 (CEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D164380584 for ; Fri, 15 Jul 2022 17:10:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=0leil.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=foss+uboot@0leil.net Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id 73A5E60008; Fri, 15 Jul 2022 15:10:06 +0000 (UTC) From: Quentin Schulz To: Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, kever.yang@rock-chips.com, alpernebiyasak@gmail.com, email2tema@gmail.com, jagan@amarulasolutions.com, u-boot@lists.denx.de, Quentin Schulz , Quentin Schulz Subject: [PATCH v2 1/2] rockchip: rk3399: fix incorrect ifdef check on SPL_DM_REGULATOR Date: Fri, 15 Jul 2022 17:09:48 +0200 Message-Id: <20220715150949.952853-1-foss+uboot@0leil.net> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Quentin Schulz 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 Signed-off-by: Quentin Schulz --- 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