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 E838AC433F5 for ; Thu, 30 Dec 2021 16:49:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7DC6583063; Thu, 30 Dec 2021 17:48:56 +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="M+3Lr4wP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5A29182FBC; Thu, 30 Dec 2021 17:48:42 +0100 (CET) Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) (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 A1A5682FAF 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-x52e.google.com with SMTP id f5so100179447edq.6 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=KtUkyrtZO1ukZGfc5QnMyc89G3cHhDLEz0uizC+ZdLk=; b=M+3Lr4wPbt7IqjDLRxMtiZJV/dTf49q+B0BZaq30qSpv9q3IfHQTa1cTveH6nqOgZG OepXemIhh9kyNSkZgIxTw7sW0YSVRjdMoUiNH9krWOVxcRnsMGKTlWjDZmKUIMVXYi4r kUPh4Hfj3OxhZpePuqCleN5s2t+X51jQEvYb5AnSdPdJQkHIEKS0k5DHJ3Mri1mrHdB1 mlFPSVDovfIykBDTYZda58m5EiIND4w2lxSszzz2G3uKH2g1x8454ncUcVQUqG65aeRo P/xW0SpSDxfw+K+41/EE2C0AkzF4OULvdz5rM41aR/0/u2PCgt0rLWZEtSVhLlv9QuDX nmGQ== 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=KtUkyrtZO1ukZGfc5QnMyc89G3cHhDLEz0uizC+ZdLk=; b=C8mRvFD1E98SGaSDkxLZRrCsPBuddX7ii0WKEpLObaPLviHg6w3eC9tXjxWFsm8lSV +K8sO9vnDtdse26hrI1O94Uqi+v64dcXm/LBIKWb10bICHlxODT/NnPZie9ePaLbk3GO hy5bxNnYzM+GzW7kHrrUv6HjW2dyXINJ4EYnndHwIpbXnwOWbHgG2h5QEGBkC6YcycgS 2B8yvSOixsKtD6c6KRiWIti8nAPekbr6qev539DZHolBC9emTTo2nif6HEqiew4431MH qn/M0jhbBj/HnqlUOhkQHZWJs6WzIqnaN8+au2XjHQEfbLsyzoUJ8g6LCF+SbdSo0Pw2 S0Lg== X-Gm-Message-State: AOAM532xRJQ9Sbe4WUUGY2H0KZat2rE5+SaFryx6MVRQvZ2K3lgGq01F DjSoVcEme7ES0hHJoGzLIcU= X-Google-Smtp-Source: ABdhPJyaCQYU8Hcj24pQnaf9uLHJ5Xcl55rJ3sUaGinGagw7DN7iVJeUKSXBM/1I6ye28Vxoz2RYfg== X-Received: by 2002:a17:906:7304:: with SMTP id di4mr25190168ejc.327.1640882917329; Thu, 30 Dec 2021 08:48:37 -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:37 -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 6/6] rockchip: tpl: use IS_ENABLED for timer_init() call condition Date: Thu, 30 Dec 2021 17:48:25 +0100 Message-Id: <20211230164825.6489-6-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. Use the call condition IS_ENABLED to increase build coverage and make the code easier to read. Signed-off-by: Johan Jonker --- 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 2b561264..05deba3f 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