[U-Boot] [PATCH v6 1/2] x86: Add TSC-specific timer functions

Bin Meng bmeng.cn at gmail.com
Mon Apr 23 07:53:05 UTC 2018


Hi Ivan,

On Mon, Apr 23, 2018 at 3:38 PM, Bin Meng <bmeng.cn at gmail.com> wrote:
> Hi Ivan,
>
> On Fri, Apr 13, 2018 at 6:12 AM, Ivan Gorinov <ivan.gorinov at intel.com> wrote:
>> Coreboot timestamp functions and Quark memory reference code use
>> get_tbclk() to get TSC frequency. This will not work if another
>> early timer is selected.
>>
>
> Thanks for working on this. But get_tbclk() is one API provided by the
> timer library. The get_tbclk_mhz() is something that is implemented by
> the TSC timer driver, so can we get rid of the get_tbclk_mhz() and use
> the get_tbclk() instead in coreboot/timestamp.c and quark/mrc_util.c?
>

Further request on TSC timer driver clean up, in order to make HPET
work with either TSC or HPET being the U-Boot (early) timer, we
should:

- Remove get_tbclk_mhz() in tsc_timer.c
- Remove get_timer() in tsc_timer.c
- Remove timer_get_us() in tsc_timer.c
- Remove timer_get_boot_us() in tsc_timer.c
- Move __udelay() implementation in tsc_timer.c to
arch/x86/cpu/qemu/qemu.c, as this is the QEMU specific support. For
other platforms, use the default one provided in lib/time.c

Regards,
Bin


More information about the U-Boot mailing list