[PATCH 09/10] bootstage: Migrate from timer_get_boot_us() to timer_get_us()

Simon Glass sjg at chromium.org
Wed Sep 28 12:20:40 CEST 2022


On Wed, 21 Sept 2022 at 08:06, Stefan Roese <sr at denx.de> wrote:
>
> This patch migrates the bootstage code from using the boot specific
> timer_get_boot_us() timer function to the common timer_get_us()
> function. This can only be done, also supporting the early boot phase,
> when CONFIG_TIMER_EARLY is enabled. This way, the common timer functions
> provide this functionality. Because of this, CONFIG_TIMER_EARLY is
> now selected via CONFIG_BOOTSTAGE.
>
> Additionally all 'uint32_t' timer occurances are changed to 'ulong', as
> this is the return value of timer_get_us(). Otherwise this might lead
> to 32bit vs 64bit conversion issues on 64bit platforms.
>
> Also the start time of the bootstage recording is now saved. Otherwise
> bigger timing offsets are seen on platforms where the timer does not
> start with 0.

Can you split this into three patches? You are changing three
different things at once. Also please add a comment for start offset

>
> Signed-off-by: Stefan Roese <sr at denx.de>
> ---
>  boot/Kconfig        |  1 +
>  common/bootstage.c  | 26 ++++++++++++++------------
>  include/bootstage.h | 17 +++++------------
>  3 files changed, 20 insertions(+), 24 deletions(-)

Regards,
Simon


More information about the U-Boot mailing list