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 293E1C433F5 for ; Sat, 25 Dec 2021 12:34:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EE4B982F70; Sat, 25 Dec 2021 13:34:44 +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="CxXSz/m/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9D4C683041; Sat, 25 Dec 2021 13:11:43 +0100 (CET) Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 BD40B811B2 for ; Sat, 25 Dec 2021 13:11:40 +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-x529.google.com with SMTP id j6so42264849edw.12 for ; Sat, 25 Dec 2021 04:11:40 -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:mime-version :content-transfer-encoding; bh=PpkYdLhJN2aMzYJpX2CdAWxbKSCwrmsWB58vIdvCi1I=; b=CxXSz/m/qM7nabzpUVtpuSuQVhfWIs+vVn6LN7wKrWoXEKeBX5rM2Itp0JpcBz2u2L kseoUGowvwMG8KcEdKHtCyyc2mG29vWUrDpOt6QYUeSuqO0GMB5AiYHiTeDqrMEHDseK upqAKpjF6AnZVd0O+Z8SAKvM2DUZsGc61GG/EkRPYlKIB3ub+MzpIL/V0xIOoc1ktxFN pSILJe53bhA39g48xOiavWwO3PT3Iawp4MDBARR9eNIIdfRUuK3PWbj/FKvnOccuZjTT KJgI0UnmUE4jvN5P5RxOyYX8F58lN3cuSlvjCKjeY+C+3crLBj/Scj9G/4lvG1tAadVQ PSRA== 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:mime-version :content-transfer-encoding; bh=PpkYdLhJN2aMzYJpX2CdAWxbKSCwrmsWB58vIdvCi1I=; b=ujN0uwlioYSPPH6AW/BYgx5wVmGqcOFAKLEFM7yvNS+6JpWk+BQQ5oNtPvq9hO2Eud TJSoB59uSuSVVVLoef1JVI/tJkCupPMp4QsxHnf/zhOjacVIN0qSQIbHw7rHjs9ZEkpl w+Ugoxocni78Lrf3iwZpsQCIgproB5IA3GM2gbf+t1UCXE6pkNH45FdHd8GRAdmFqeOS PIurAF2fvc3o7iVcvJ5Q6Ak0GHGOkUJoRw54+HS6Ikct3nVvydUXwBrNUQVMBGXL7Axz FynR7ODW1V3sbqLlo++n1uAZK2JxorO/t2LSC6iSJhV7YxuANW4Lnm2Jxu9AD7ANbOeE TEmw== X-Gm-Message-State: AOAM532qw9+HGQOltWurC1sITXzN76iwEnyC/FGxBoN/uqqjxY6LELPj O1RljYRVb+eL2fdEXTasQMw= X-Google-Smtp-Source: ABdhPJyt/rLsNP28P7+XS6UcA9yDkkfeuArVhbuXSyuGcDjkm2VihTBbYY1EFg/wLg9gbyIDhxQGyg== X-Received: by 2002:a05:6402:4312:: with SMTP id m18mr3603929edc.354.1640434299213; 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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Dec 2021 04:11:38 -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 1/2] rockchip: spl: change call condition rockchip_stimer_init() Date: Sat, 25 Dec 2021 13:11:30 +0100 Message-Id: <20211225121131.17892-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 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/spl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rockchip/spl.c b/arch/arm/mach-rockchip/spl.c index 02c40fb3..4b8b0b39 100644 --- a/arch/arm/mach-rockchip/spl.c +++ b/arch/arm/mach-rockchip/spl.c @@ -70,7 +70,7 @@ u32 spl_mmc_boot_mode(const u32 boot_device) return MMCSD_MODE_RAW; } -#if !defined(CONFIG_ROCKCHIP_RK3188) +#if defined(CONFIG_ROCKCHIP_STIMER_BASE) #define TIMER_LOAD_COUNT_L 0x00 #define TIMER_LOAD_COUNT_H 0x04 #define TIMER_CONTROL_REG 0x10 @@ -132,9 +132,12 @@ void board_init_f(ulong dummy) hang(); } arch_cpu_init(); -#if !defined(CONFIG_ROCKCHIP_RK3188) + +#if defined(CONFIG_ROCKCHIP_STIMER_BASE) + /* Init secure timer */ rockchip_stimer_init(); #endif + #ifdef CONFIG_SYS_ARCH_TIMER /* Init ARM arch timer in arch/arm/cpu/armv7/arch_timer.c */ timer_init(); -- 2.20.1