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 7579AC433F5 for ; Sun, 3 Apr 2022 23:08:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CC22483C07; Mon, 4 Apr 2022 01:08:04 +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="f+S0FpSh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 909F583BC1; Mon, 4 Apr 2022 01:07:17 +0200 (CEST) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (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 67E0183BDB for ; Mon, 4 Apr 2022 01:07:09 +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-ed1-x532.google.com with SMTP id u9so3941686edd.11 for ; Sun, 03 Apr 2022 16:07:09 -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=T3j1T46u3gFofvLglCjhPPxpE+82DW15NIzlKRwLWLQ=; b=f+S0FpShm6wIfqA29vrvYPsxsGrYqt+1hDTyuwhfRMgnnoEdZGzKcp6gQlH2jhIOYR mrO4w+7jq1g8UbEque7qbfHeATaEpd/kO/nq8ZrK87SnemwixLuEtYI3x5oWGoRNtKM4 Qst42Ptbl+kJoRUoimUM1dX1DClk5tl5pxg5SzAELY775j1iLPSlJ1hs8oN6Vfdkr1gx k2A1KGruIOC3oUL4Cc1Pl5C5jYBAgZY3R7s5SxfxA6LcfU3NdWRnWHV/8HZvq+3pXTsy 9kD6fpIvmbe+XsM3igtkpmDVQr3vDNkFA3FCBuUf27wTcNnsqrynP6hIOHXH+q2mIl4N j7Tw== 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=T3j1T46u3gFofvLglCjhPPxpE+82DW15NIzlKRwLWLQ=; b=1r88ryU8ikw3RSmoQ34TiCIcCagqoJQNkUFdNcLEMoA50cGv8YFSeokPV6HfufgMUB /1Yx5222FAGXsEDKsSokaZET+d5kp8AyNaVupLJ9ErFm3yCTtIpiT3jq1NU+Xo2ebkAB G37rjwVUAeEcKGQlBeVUaCKw6jWIBss2xVk2xZT5qV2TYeysWWOqfWWYU8nXQLelLBqo U59/t43MYqMZLCjYWC1yhj0/OEiKPMvUrdnKAUC8pQTiPvnDOQxch/JKvkCFjvuCpfGB NmrTSXgNx6i45aqYXgXwt73NeCRoInClSL1Cr4iJQapM4DZTmGQ/c/LJ65vi9GLr3khK kwFg== X-Gm-Message-State: AOAM530R+8sBDOe217YUJfE956e/2eyINIrXs9T22mp1fxeiZn7QPyaj 8f/AKKlxuoqjcYaN3/flNBE= X-Google-Smtp-Source: ABdhPJx6F+fDH3NrymshLhXFMSs8gVUEykUJes3whYrdTuwP8OPdvTqunpmmTMaVFSRCgfEsZyOfDg== X-Received: by 2002:a05:6402:1e90:b0:419:4cdc:8b05 with SMTP id f16-20020a0564021e9000b004194cdc8b05mr30531527edf.211.1649027229001; Sun, 03 Apr 2022 16:07:09 -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.08 (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 05/12] rockchip: tpl: use IS_ENABLED for timer_init() call condition Date: Mon, 4 Apr 2022 01:06:52 +0200 Message-Id: <20220403230659.12039-6-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. Use the call condition 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/tpl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index 2b561264a5..05deba3f84 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -80,8 +80,9 @@ void board_init_f(ulong dummy) if (IS_ENABLED(CONFIG_ROCKCHIP_STIMER)) rockchip_stimer_init(); - /* Init ARM arch timer in arch/arm/cpu/ */ - timer_init(); + /* Init ARM arch timer */ + if (IS_ENABLED(CONFIG_SYS_ARCH_TIMER)) + timer_init(); ret = uclass_get_device(UCLASS_RAM, 0, &dev); if (ret) { -- 2.20.1