Hi Johan, On Tue, 28 Dec 2021 at 02:19, Johan Jonker <[email protected]> wrote: > > 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.
OK, well you can add a Kconfig and then use moveconfig.py to migrate automatically. Re the warning, just make sure the header file is included. Regards, Simon > > 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 <[email protected]> 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 <[email protected]> > >> --- > >> arch/arm/mach-rockchip/tpl.c | 5 +++++ > >> 1 file changed, 5 insertions(+) > > > > Can you use if(IS_ENABLED(...)) instead of #if ? > > > > Regards, > > Simon > >

