[PATCH v2 3/8] timer: orion-timer: Add timer_get_boot_us() for BOOTSTAGE support
Stefan Roese
sr at denx.de
Sat Sep 3 12:44:20 CEST 2022
Hi Tony,
On 03.09.22 11:44, Tony Dinh wrote:
> Hi Stefan,
>
> On Thu, Sep 1, 2022 at 11:25 PM Stefan Roese <sr at denx.de> wrote:
>>
>> Add timer_get_boot_us() to support boards, that have CONFIG_BOOTSTAGE
>> enabled, like pogo_v4.
>>
>> Signed-off-by: Stefan Roese <sr at denx.de>
>> ---
>> v2:
>> - Change timer_get_boot_us() to use the timer_early functions
>> - Remove #if CONFIG_IS_ENABLED(BOOTSTAGE)
>>
>> Simon, I'm currently looking into this timer_get_boot_us() to using
>> timer_early_get_count() etc consolidation.
>
> Indeed, as you've mentioned above, I think timer_early_get_count() and
> timer_early_get_rate() do need to take into consideration what the
> input_clock_type is for Kirkwood boards with CONFIG_BOOTSTAGE such as
> the Pogo V4.
>
> I'm seeing on the Pogo V4 test, the timer command reports time about 6
> times slower than it should. It does seem to jive with the fact that
> the Pogo V4 CONFIG_SYS_TCLK is 166Mhz, versus MVEBU 25MHz clock rate.
Ah, I've missing updating the early functions to also differentiate
between fixed clocks and TCLK timer.
Please give the attached patch a try - should be applied on top of this
latest patchset.
Thanks,
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: orion-timer-fix-early-init.patch
Type: text/x-patch
Size: 3230 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220903/95f6ecb5/attachment.bin>
More information about the U-Boot
mailing list