Hi Marek, On 11/3/26 5:09 PM, Marek Vasut wrote: > On 10/27/26 10:15 AM, Clément Le Goffic wrote: > > Hello Clement, > >> Thanks for the review, >> >> On 10/26/26 11:18 PM, Marek Vasut wrote: >>> On 10/26/26 4:36 PM, Clément Le Goffic wrote: >>>> The generic counter shared by the Cortex-A720AE and Cortex-R52 cores is >>>> stopped at reset. With U-Boot as the first stage on the RSIP-M, nothing >>>> starts it before the Cortex-R52 cores are released, so their timers never >>>> advance and a timed wait such as a Zephyr k_sleep() blocks forever. >>>> >>>> Program the counter frequency and enable it before any other >>>> initialization, through the RSIP-M alias of the counter frame. >>> >>> Why is U-Boot on RSIP supposed to be doing this, why is Zephyr on the CR52 >>> not doing it when it needs that counter ? >> >> In the Renesas SDK it is the Gen5_IPL that start it. U-boot replaces that >> stage. >> From the manual "Set bit 0 in CNTCR to 1 to start the Generic Counter when >> the CPU is placed in the secure mode." >> By default R52 is in secure mode but this can change by changing AxPROT[1]. >> This mean a zephyr running on a R52 not in secure mode can't start it. > > U-Boot on RSIP is not using the timer, so shouldn't SCP start the timer, > since it also starts all of its users ? That way the timer is only started > when it is really needed. > > [...]
The SCP isn't using it either. The timer is needed by the AP and the RT cores and is always needed whichever SW component start on the system. TFA on Ironhide even start it here (I consider to remove it once this land): https://github.com/ARM-software/arm-trusted-firmware/blob/v2.15.0/plat/renesas/rcar_gen5/bl31_plat_setup.c#L161-L171 SCP doesn't start by itself all of its user, it is U-boot on RSIPM that sends the "start" request. SCP is the SCMI server it just react to SCMI requests. A "start generic counter" SCMI requests doesn't exist. Hence do it here. The generic counter is the platform counter, U-boot on RSIPM should start all what is needed for the platform to work as a bootloader would do. Best regards, Clément
