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 B7F2EC433EF for ; Tue, 28 Dec 2021 11:58:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D1AF083870; Tue, 28 Dec 2021 12:57:50 +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="m0yjcJpO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F024883865; Tue, 28 Dec 2021 10:19:04 +0100 (CET) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 175A783852 for ; Tue, 28 Dec 2021 10:19:01 +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-x52d.google.com with SMTP id bm14so71408725edb.5 for ; Tue, 28 Dec 2021 01:19:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XeNY2AdNi+WZFoVZ5XnEr2rpqSXwD0J6Py/XFGH14d4=; b=m0yjcJpOFy0ly4/WRJVhQhVB6z8un/PvAgxXAY2OrO86K8N+HspfHMk3qdRRvuInYk 1xITHkIlvkzk2Hxiee0Bo1GA4PoWCOQAca/7xozY8TDUtW/O7dzwhlMmL/I1SvEUC7/P ArTiteQeMMkbdj1uCVJc5Arydddodk8HJDedItcAI4P09wqdBbJObsvNcP19yZT0bBgp lCDxN+amvPsMlaRdAAlMIUWAk1G0G3k52JlU5mlCyNkRUIRohQKNlhCIiwwHvZusTo06 0L9yD22/f4YGgD3NM/CYRV9DXdzqzOAasL/N7S0Q4SeZxj1hehonZhv5tAK5gkEp7yxh BWgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XeNY2AdNi+WZFoVZ5XnEr2rpqSXwD0J6Py/XFGH14d4=; b=YnP+tzPhtVFNhUJmw4A+jkMkrX1gxMclw3GpDa0CgjNZ1Hd59f7RZ8HlyfdtBRrMEj ++WzoZ5Nt7DmjLG5yfJ1GjHv6g+cNV44jua3DgIfPp19++1RZGPpxeYROW8UdZIYuuUi BL22f1aKylWkh2qeqFBhgGGTZxkRceWA46dkWxc/EJ8HixuaBnvqG5kKdNU6iIGZnYFe DZTxRbcf7WH+6vSc/E3u0mMUkzHgEu5geee6xa8rXv1a8ttAdfRdCpkWtDUPISrqKWnt aplV/BNhvVzhROxqx34cqQPmMam9cR71002mBgGgUhURTV3y4In6Av/TCJ9rSIJ7K+jt vJ/g== X-Gm-Message-State: AOAM532uWpENmyZ70QODDUsGP4a7k4c4IFfm+K9aq1pD6gM7HbG+Vetb e6mN+ndZ74Qv3I62NC6Vc3TT5bXZovh1xA== X-Google-Smtp-Source: ABdhPJz+O02s37U7FTEpultSPNAOI5/CdW82eVbgjV6oW6aP8jKndn5LVPRvESjkAmEy0qpnuCvz4g== X-Received: by 2002:aa7:d411:: with SMTP id z17mr19387482edq.214.1640683140668; Tue, 28 Dec 2021 01:19:00 -0800 (PST) Received: from [192.168.2.1] (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id v16sm7200883edc.4.2021.12.28.01.19.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Dec 2021 01:19:00 -0800 (PST) Subject: Re: [PATCH v1 2/2] rockchip: tpl: change call condition rockchip_stimer_init() To: Simon Glass Cc: Kever Yang , Philipp Tomsich , U-Boot Mailing List References: <20211225121131.17892-1-jbx6244@gmail.com> <20211225121131.17892-2-jbx6244@gmail.com> From: Johan Jonker Message-ID: Date: Tue, 28 Dec 2021 10:18:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 28 Dec 2021 12:57:32 +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 Hi Simon, ROCKCHIP_STIMER_BASE are defined in include/configs/ px*/rk*_common.h and not in Kconfig. The use of: if(IS_ENABLED(CONFIG_ROCKCHIP_STIMER_BASE)) { //#if defined(CONFIG_ROCKCHIP_STIMER_BASE) /* Init secure timer */ rockchip_stimer_init(); //#endif } ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make mk808_defconfig ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make all Leeds to this warning: arch/arm/mach-rockchip/spl.c: In function ‘board_init_f’: arch/arm/mach-rockchip/spl.c:139:2: warning: implicit declaration of function ‘rockchip_stimer_init’; did you mean ‘timer_init’? [-Wimplicit-function-declaration] rockchip_stimer_init(); ^~~~~~~~~~~~~~~~~~~~ timer_init Somehow IS_ENABLED() doesn't seem to work here. Could you try it your self. Please advise for other possibilities. Kind regards, Johan Jonker On 12/28/21 9:34 AM, Simon Glass wrote: > Hi Johan, > > On Sat, 25 Dec 2021 at 05:11, Johan Jonker wrote: >> >> 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(+) > > Can you use if(IS_ENABLED(...)) instead of #if ? > > Regards, > Simon >