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 6B700C433F5 for ; Sun, 3 Apr 2022 23:08:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 832FC83B44; Mon, 4 Apr 2022 01:07:47 +0200 (CEST) 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="EqBc3qPb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0CA1583BDB; Mon, 4 Apr 2022 01:07:18 +0200 (CEST) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 ABAA783B74 for ; Mon, 4 Apr 2022 01:07:08 +0200 (CEST) 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-ej1-x62c.google.com with SMTP id bg10so16510516ejb.4 for ; Sun, 03 Apr 2022 16:07:08 -0700 (PDT) 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=1vgPn1jNWHPUrF6fq4qKAX9NJ06ZeKpIiegg3cOTBVw=; b=EqBc3qPb9CMykff7LRiZD/XaEucCgmlS9wMc3HnUr+Jer48R3uTMuwUAzWbcZ2HuZd RMUtX9sy0Lqzk8rg+seDyFF09gGtFcwusl/wtL7R6NkQ8MmQpewZx6ycQymxrXu35rv4 x/9pyGrcYHvrsbyQj3TLxsy5wrPrx/bOqIDbP6IvpH+J7RO2caom1FxPKt2UxbrEPeG8 Nqo/i8ZTLiN4LPKcWTacf5HpOduWtsZI0p7LKhMIEXqWj+oG8fNHt7GWVVvkIXEoTo1+ z+8MTNAYXL5eMgdzI1IdFiAdWVV+pCW5r2Lwq1zg+izf7pzV28t7GWqMzUVVWpmxO6ch Xw4A== 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=1vgPn1jNWHPUrF6fq4qKAX9NJ06ZeKpIiegg3cOTBVw=; b=esfh7GMwd/IcpJ2I43L2Q2t2/rnu1u1mdm18LX+m2S9L6t9uTCUX79Tzh2yCXNjhIu M8DJZ5q/BDoxjLjd264DL7PDlyRPbotR8nhQ5TaZOZhgyUBWntWRKjsvOT9/TpqxubjB gmyuQui3Mp7Sr7hF5f5ah9yA02ozcpEAjrEhyWXKGsZrPBaxpQxJcwQv5GvARzsqajuZ 5Drsr4YHhHkunxxCc17WCNSO29DgIMuDgRtIPZU6UReJABsHHrlGiD0uMjflpu72PBKu PCbFG/2DI4r+VzAIPpRjFAVFQJlghwYdpeLj14XmmdgUZoSzEnytsstNDl1Y/ihZnh6B 3PHw== X-Gm-Message-State: AOAM532MR3hnwF68Rp1rpPFFfUg3irISXV2/rodluKwI7f8gq4ljAxj1 xdULQsb/Amqr7Rs/zXRGKWI= X-Google-Smtp-Source: ABdhPJxygDqAqYvM92CR+hTKm/Rl8aLwglovcww68jSGp7ZC0sTqgSQQRyi5QFYK5A3O6eyXrGdXOg== X-Received: by 2002:a17:907:971c:b0:6e0:dd95:9fc6 with SMTP id jg28-20020a170907971c00b006e0dd959fc6mr8649520ejc.256.1649027228334; Sun, 03 Apr 2022 16:07:08 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id c14-20020a170906340e00b006ce98f2581asm3645597ejb.205.2022.04.03.16.07.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Apr 2022 16:07:08 -0700 (PDT) From: Johan Jonker To: kever.yang@rock-chips.com Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, heiko@sntech.de, peng.fan@nxp.com, jh80.chung@samsung.com, u-boot@lists.denx.de Subject: [PATCH v4 04/12] rockchip: spl: replace ifdef by IS_ENABLED for timer_init() call condition Date: Mon, 4 Apr 2022 01:06:51 +0200 Message-Id: <20220403230659.12039-5-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220403230659.12039-1-jbx6244@gmail.com> References: <20220403230659.12039-1-jbx6244@gmail.com> 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.5 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 Reviewed-by: Simon Glass --- 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 0017ca71b0..9c83b038a6 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -139,10 +139,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