From mboxrd@z Thu Jan 1 00:00:00 1970 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 33E8BC433F5 for ; Sat, 9 Apr 2022 16:56:26 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2494E83D30; Sat, 9 Apr 2022 18:55:52 +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="c8cI4C08"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8095683BF6; Sat, 9 Apr 2022 18:55:32 +0200 (CEST) Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) (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 41F3783931 for ; Sat, 9 Apr 2022 18:55:28 +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-x62a.google.com with SMTP id lc2so2406489ejb.12 for ; Sat, 09 Apr 2022 09:55:28 -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=SFvleJhVUrRHdY8uo6seBG3SYro0hSFFv+uPWOi3EHY=; b=c8cI4C08Ivim2SibSYXGb+TtJ3ZyxmElBk3XmIZNWrY6Nx3YU0rYnn90LODrtYtsnq DSs0BinEAK6hMlkj8i95kDcvR+J/tzybM/EDUkeK1TslRb3pIlogAP89pbZy9O6tOJax 7QBVD8PJwQ4T69mDmiKFh6aQhWC8ijUVDJknMNjilWqKhngpir9pETNK0usLmcDnSwtu ng42GgVI1CfJZE8HVHNCtvOs/xSJtdhsDekb0xM5DR7FAcWawKBWqP0mZJYwD5vfEVsX 5tOhPMh6WfF+muTxetFMLPxxiGNGtzi6ksiPAuZTm+Y8yo3zJiFl98AgeY8dPJ7eTKA6 1Glw== 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=SFvleJhVUrRHdY8uo6seBG3SYro0hSFFv+uPWOi3EHY=; b=SByD5e1qJiGgOXX06P51IzFC1oDwcVC4oz4KNia6v6a4Ju4vRHBzlDxxuoramgEjKi xmZq4fuxvpYnHdXHxcSGoUbVo2KKfRmxEqRAzkbHJHRyzt8Yb6KHmg8lCK1MlltBcvRu jblhTvneLZAhXC6/mp6GO1ZId1Yr5avmsLFbrCcFqie6QwoqDIzpr/zoOtOVCiR1mA/L rLCOQC8PTx3mLoL8dL4tSvXpwTZFDEH2vl4pgGWOaxKpAue7Vp+dIytta30TbQxogwlI OLA0b6p8lRWKpdNnLOZuRxQXiz+jPcfbmKb0nBgdYJ5W6b/+sBq78HoxFBzf0w6TYxOv UkYg== X-Gm-Message-State: AOAM5325PrlgFGShm4jWYhsQeF0F78FtnYGbCFZCY7eDcFmnusZKIEVB mGHoLgtK2K9ZDid3IDmY/04= X-Google-Smtp-Source: ABdhPJxtIDPt9/BNGy5k9Exbc8mh+hRspJBYPFs33NOB7L7idrQz+BxyTAbj+0toGgXkN6ngHcpdpA== X-Received: by 2002:a17:907:980b:b0:6e0:71d9:c87e with SMTP id ji11-20020a170907980b00b006e071d9c87emr22538372ejc.510.1649523327879; Sat, 09 Apr 2022 09:55:27 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id t14-20020a170906608e00b006d1455acc62sm10004538ejj.74.2022.04.09.09.55.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Apr 2022 09:55:27 -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 v5 03/13] rockchip: tpl: change call condition rockchip_stimer_init() Date: Sat, 9 Apr 2022 18:55:04 +0200 Message-Id: <20220409165514.19220-4-jbx6244@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220409165514.19220-1-jbx6244@gmail.com> References: <20220409165514.19220-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 The Rockchip SoCs rk3066/rk3188 have no CONFIG_ROCKCHIP_STIMER_BASE defined. Currently there's no exception in TPL. Make this more generic and compile the code inside the function rockchip_stimer_init() only when CONFIG_ROCKCHIP_STIMER_BASE is available. Signed-off-by: Johan Jonker --- Changed V5: reword remove IS_ENABLED remove include kconfig.h Changed V3: use CONFIG_ROCKCHIP_STIMER Changed V2: use IS_ENABLED add include kconfig.h move define location so that rockchip_stimer_init() is always visible to the compiler --- arch/arm/mach-rockchip/tpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-rockchip/tpl.c b/arch/arm/mach-rockchip/tpl.c index 3c007bb450..7f43f58406 100644 --- a/arch/arm/mach-rockchip/tpl.c +++ b/arch/arm/mach-rockchip/tpl.c @@ -29,6 +29,7 @@ __weak void rockchip_stimer_init(void) { +#if defined(CONFIG_ROCKCHIP_STIMER_BASE) /* If Timer already enabled, don't re-init it */ u32 reg = readl(CONFIG_ROCKCHIP_STIMER_BASE + TIMER_CONTROL_REG); @@ -45,6 +46,7 @@ __weak void rockchip_stimer_init(void) writel(0xffffffff, CONFIG_ROCKCHIP_STIMER_BASE + 4); writel(TIMER_EN | TIMER_FMODE, CONFIG_ROCKCHIP_STIMER_BASE + TIMER_CONTROL_REG); +#endif } void board_init_f(ulong dummy) -- 2.20.1