[PATCH v5 2/7] timer: Add Goldfish timer driver

Simon Glass sjg at chromium.org
Tue Jan 6 00:30:25 CET 2026


On Mon, 5 Jan 2026 at 11:20, Kuan-Wei Chiu <visitorckw at gmail.com> wrote:
>
> Add support for the Goldfish timer driver. This driver utilizes the
> Goldfish RTC hardware to provide a nanosecond-resolution timer. This
> virtual device is commonly found in QEMU virtual machines (such as the
> m68k virt machine) and Android emulators.
>
> The driver implements the standard U-Boot timer UCLASS interface,
> exposing a 64-bit monotonically increasing counter with a 1GHz clock
> rate derived from the RTC registers.
>
> Signed-off-by: Kuan-Wei Chiu <visitorckw at gmail.com>
> Tested-by: Daniel Palmer <daniel at 0x0f.com>
> Reviewed-by: Yao Zi <me at ziyao.cc>
> ---
> Changes in v5:
> - Rebase on u-boot/next branch.
>
>  MAINTAINERS                    |  6 +++
>  drivers/timer/Kconfig          |  8 ++++
>  drivers/timer/Makefile         |  1 +
>  drivers/timer/goldfish_timer.c | 81 ++++++++++++++++++++++++++++++++++
>  include/goldfish_timer.h       | 13 ++++++
>  5 files changed, 109 insertions(+)
>  create mode 100644 drivers/timer/goldfish_timer.c
>  create mode 100644 include/goldfish_timer.h

Reviewed-by: Simon Glass <simon.glass at canonical.com>

You can also implement timer_get_boot_us() if you want to use bootstage.


More information about the U-Boot mailing list