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 61AADC433EF for ; Sat, 25 Dec 2021 12:35:02 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C983183041; Sat, 25 Dec 2021 13:34:49 +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="PwpQop6J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B6B3811B2; Sat, 25 Dec 2021 13:11:44 +0100 (CET) Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) (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 2988E8302D for ; Sat, 25 Dec 2021 13:11:41 +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-x530.google.com with SMTP id j21so42351472edt.9 for ; Sat, 25 Dec 2021 04:11:41 -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=OWCLigas238tf3xFvfrbFN0X2s84JYKCdy+okZs8q1o=; b=PwpQop6J//+e9Vc5WOTgvWt6n/nGTVgpNbuJLjMIl0t/AAjE2QJZ38m5yypA2bNhrv rcg9wJRSBO3MByu9MNw3JJYcMMvXE0RbTvhrRsK10KFalhkbKojVuywWnMrYWhyJTaXp Sy0W+f5EnLlvRhlPjyU4YaG+GLUDMBe6gSSqKvHuPuJOHeGocJ+zm3/6BhfuEk74A8rg 9DNa6iHDpftEekM6IHaFgg1mfKlro24SQyELrAfq0lKO8B4MzPiivxTY6xm44nPyrWAT ZaKNst4qYukpQdAXqVBqbfMzEnUQKPW+CvpTPWS30ybmn5BZBnHo4Gw+EmzsUO2vud0n tTXg== 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=OWCLigas238tf3xFvfrbFN0X2s84JYKCdy+okZs8q1o=; b=716fwErAHs3f3wOtwVnZ/Smeo2TRj5TSz/mTPaPKTh5tWmdz8wER4v40YRbEnAi3T6 mNM0Ek0EgKRemLLvJbuvOAQU4ZPkJhFwKaBeIXcaYe5uBogsjh0HvEGaGaoyONgQaR73 VwytLJjR0hVJdzs3oB1TW2K7HO5qxPmJ8DzYNhD+zHH+wlS2saFq1dIWR3AAMVnDVJxH Xpnvdj998+iBJGn87vBFtxBrCp0voyXrVCVOpIr2Zsv/CHy/qVT3G+IouD0JAbUZIHkA NWLaKEhhwJsRxoCPIXBeL2O5N8jW5mTMmOFtu0EOon3F154EPSkAklGv3P2N25Ix3Pyw NYLA== X-Gm-Message-State: AOAM533lCCrxIP1IOmtUzj1QeK/X+uMjY2F8KG9HpuVooJBtHx2c9XJO EPx6MJkyYnaDs+YDOnV5l6A= X-Google-Smtp-Source: ABdhPJw/bvq1pKpEC535N96wvuIiar00cvnNoYAKz4WgoQND5P/w8vsgUNXjhTcybbS1t0s0TtCL7Q== X-Received: by 2002:a05:6402:2787:: with SMTP id b7mr2875291ede.362.1640434299715; Sat, 25 Dec 2021 04:11:39 -0800 (PST) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id f26sm3407247ejf.131.2021.12.25.04.11.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Dec 2021 04:11:39 -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 v1 2/2] rockchip: tpl: change call condition rockchip_stimer_init() Date: Sat, 25 Dec 2021 13:11:31 +0100 Message-Id: <20211225121131.17892-2-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211225121131.17892-1-jbx6244@gmail.com> References: <20211225121131.17892-1-jbx6244@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sat, 25 Dec 2021 13:34:43 +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 The Rockchip SoCs rk3066/rk3188 have no CONFIG_ROCKCHIP_STIMER_BASE defined. Currently only rk3188 has an exception. Make this more generic and call the function rockchip_stimer_init() only when CONFIG_ROCKCHIP_STIMER_BASE is available. Signed-off-by: Johan Jonker --- arch/arm/mach-rockchip/tpl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index 3c007bb4..2c5ce969 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -20,6 +20,7 @@ #include #endif +#if defined(CONFIG_ROCKCHIP_STIMER_BASE) #define TIMER_LOAD_COUNT_L 0x00 #define TIMER_LOAD_COUNT_H 0x04 #define TIMER_CONTROL_REG 0x10 @@ -46,6 +47,7 @@ __weak void rockchip_stimer_init(void) writel(TIMER_EN | TIMER_FMODE, CONFIG_ROCKCHIP_STIMER_BASE + TIMER_CONTROL_REG); } +#endif void board_init_f(ulong dummy) { @@ -73,8 +75,11 @@ void board_init_f(ulong dummy) hang(); } +#if defined(CONFIG_ROCKCHIP_STIMER_BASE) /* Init secure timer */ rockchip_stimer_init(); +#endif + /* Init ARM arch timer in arch/arm/cpu/ */ timer_init(); -- 2.20.1