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 7DF58C433EF for ; Thu, 30 Dec 2021 16:49:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0046F83092; Thu, 30 Dec 2021 17:48:59 +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="B654Df/8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2065E81277; Thu, 30 Dec 2021 17:48:43 +0100 (CET) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (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 1BF5C82C6D for ; Thu, 30 Dec 2021 17:48:37 +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-x52b.google.com with SMTP id y22so100274907edq.2 for ; Thu, 30 Dec 2021 08:48:37 -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=qhBAtC/Xv2BoeQDXdcAIQyF7GtzAd3VrGfXI52Gr3SQ=; b=B654Df/8jQ4bkx09RHmCHYpCnQcjchVipOS+UkRZxQjCiRl0DnOGW6hWcA/lZITyyA SdDfQ1qL/r0qAwE3YL3ZzUen3Ca0QO1979d5JQZb5yzkCEfwFKFuSK+rQXxVkCwbcBlB apE/fFodEiXpFxuPY1R6y9pNTTQgKcWIUxQ3hb/jzr/h1zCQn56VuCjhpTGDLjLtJpcd /FiIwPv7LYXnbNApjQtymTf+DVdf8zpzHYjdgGoW1uE2Z2/g/XtV26k70UoCVWboX/B1 UIuyeHoPq2g7w/zXh4CTrJEWCSRTuOUUkWbB95XLhq1Yiu7kbGPvEJIzT6aHmiF9c4Pw yrEQ== 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=qhBAtC/Xv2BoeQDXdcAIQyF7GtzAd3VrGfXI52Gr3SQ=; b=g5VZfxXzRh+r99yKpI3e1IT8kFFtGt9yQTCijnFOWsQTK1l2MtG/JPmw6Smqbt8GMv +ufFS/C2wVsEtWhEETuLeKX+aPWsRKBdkKD1PhYO7o5+wv9woZTsn9WyEmAsGQ/2bm3d +H0RzImjycFRxJEQamSDovqtskfpo8vec1vIvkci/ETPa0zWTom4O5a29or8uja9vQCK z86uWx99rwBkgnqtG3hy1rrkLwyyOzW8bJubdbl15xJPSRcpkq4SXzZ5/hxksGKV4+fS RGnSXFTkHTu592foGZR09ym2N/VBV/EhhxwiOozg1yjWYTttexAHXsEW+BMJ6w1k1dLq BQmA== X-Gm-Message-State: AOAM5323elPRnA4+vzbWfdXiW6Nxp9T71oadAi/9psWR2v4ijlyVJueb nlQLswye6RrwJcSCbvvcBnY= X-Google-Smtp-Source: ABdhPJyfzUXApqwQ0iU/o6Xaz9/+PDi11HMNGL71VJL/WGRue6g0oYNIHgVc+YY8Rm1bjwy/m/VgBA== X-Received: by 2002:aa7:d299:: with SMTP id w25mr31566709edq.269.1640882916771; Thu, 30 Dec 2021 08:48:36 -0800 (PST) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id f27sm7804046ejc.137.2021.12.30.08.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Dec 2021 08:48:36 -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 v3 5/6] rockchip: spl: replace ifdef by IS_ENABLED for timer_init() call condition Date: Thu, 30 Dec 2021 17:48:24 +0100 Message-Id: <20211230164825.6489-5-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211230164825.6489-1-jbx6244@gmail.com> References: <20211230164825.6489-1-jbx6244@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 1dac3805..95db7557 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)) 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