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 5CEF4C433F5 for ; Wed, 29 Dec 2021 18:50:38 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 87B2D830A0; Wed, 29 Dec 2021 19:50:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="R+IvQL4R"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D53E811D2; Wed, 29 Dec 2021 17:59:07 +0100 (CET) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E5DBF82F7E for ; Wed, 29 Dec 2021 17:59:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jbx6244@gmail.com Received: by mail-ed1-x531.google.com with SMTP id j6so88375578edw.12 for ; Wed, 29 Dec 2021 08:59:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IMW2pluSIvW/bmU62u1Rp/olGiKLW9d8QyK17rzDQps=; b=R+IvQL4RLldU+W28V9mZrRp4JJjGGOQy6SC4gbTZx5kZKqaK+VGty9HmsQd0SwkChz Ja17v9H/adtdclv1TglC2Bn40A44OFjJIDnpi2zps+Xp1fZRRxRCU+h2XI6Z0b7j4naJ B2rmf4pxNfhkvWWrjcuWg8gbkDILTUwrhVTAPWz7gcQDwK6y33tvb4yg2JBq6oxyOmS0 TCG+7852kyAClyeyaO4DfZLpo8RpKqa/K9inW5V7QBkQwDDpjGWfEJozjD7WXxqq7mzx H8uux+bMOA4CQ6HudXj2PLwrRVsVmq9NADWzlowXcCBXT0/piQ1Dsuzclkd5kTfMyxSi OBMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IMW2pluSIvW/bmU62u1Rp/olGiKLW9d8QyK17rzDQps=; b=IOOiJ3KYaxzwPoSV8eIidDutzUbC1fBfHhPXIVZBUXSOvFdk/So3cH7/zEpM9Bmgy1 043aG2fUNbCDkW+zhPYptLHltq5msOMistzMqDmNpGb0OObf3cSatE3lEFLYYy2/wImy ppLbimA8oBYA6N3Mqfn7S080dZnSv7sVOwGmH4ytI3bVwSZXDY6pkQ8REBSONckgNdPV Pm66LHrnHye0pJPDLjaqX06G9TV5fA9nxGgMS3GfA+mWFIH7O6rG+GRxxV9Mdff4ZHNt bq3+QnGZARc4Wxgr1VU5UGziaDgq2wjjWYFns1q+6wVugOZRin55X4KG9NVAy82ETN5H suoA== X-Gm-Message-State: AOAM533QO009KwlApaNFwrPYLLnm7SQybHirmPQ3kwJ9N3jwwYsBYd/6 DpCHVRIjHwekoeTI7vYAuLQ= X-Google-Smtp-Source: ABdhPJwmkMCMMvB2QTOBPAeo46/KF7/S17nRtmQZIBvXz6qZmRwicIfQxFQuOuJiAOaD4i9pU289Ug== X-Received: by 2002:a17:907:7f05:: with SMTP id qf5mr21529022ejc.597.1640797140551; Wed, 29 Dec 2021 08:59:00 -0800 (PST) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id g19sm8695051edr.6.2021.12.29.08.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Dec 2021 08:59:00 -0800 (PST) From: Johan Jonker To: kever.yang@rock-chips.com Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, u-boot@lists.denx.de Subject: [PATCH v2 3/4] rockchip: spl: replace ifdef by IS_ENABLED for timer_init() call condition Date: Wed, 29 Dec 2021 17:58:49 +0100 Message-Id: <20211229165850.6911-3-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211229165850.6911-1-jbx6244@gmail.com> References: <20211229165850.6911-1-jbx6244@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Wed, 29 Dec 2021 19:50:14 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean Not all Rockchip SoC models use the ARM arch timer. Call the function timer_init() only when CONFIG_SYS_ARCH_TIMER is available. Replace the ifdef call condition by IS_ENABLED to increase build coverage and make the code easier to read. Signed-off-by: Johan Jonker --- arch/arm/mach-rockchip/spl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 31558415..c1df6ce2 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -138,10 +138,10 @@ void board_init_f(ulong dummy) if (IS_ENABLED(CONFIG_ROCKCHIP_STIMER_BASE)) rockchip_stimer_init(); -#ifdef CONFIG_SYS_ARCH_TIMER - /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */ - timer_init(); -#endif + /* Init ARM arch timer */ + if (IS_ENABLED(CONFIG_SYS_ARCH_TIMER)) + timer_init(); + #if !defined(CONFIG_TPL) || defined(CONFIG_SPL_RAM) debug("\nspl:init dram\n"); ret = dram_init(); -- 2.20.1