[PATCH v1 2/2] rockchip: tpl: change call condition rockchip_stimer_init()
Johan Jonker
jbx6244 at gmail.com
Tue Dec 28 10:18:59 CET 2021
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 <jbx6244 at gmail.com> 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 <jbx6244 at gmail.com>
>> ---
>> arch/arm/mach-rockchip/tpl.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>
> Can you use if(IS_ENABLED(...)) instead of #if ?
>
> Regards,
> Simon
>
More information about the U-Boot
mailing list