u-boot/include/goldfish_timer.h
Kuan-Wei Chiu 909f717eaf timer: Add Goldfish timer driver
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@gmail.com>
Tested-by: Daniel Palmer <daniel@0x0f.com>
Reviewed-by: Yao Zi <me@ziyao.cc>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
Reviewed-by: Angelo Dureghello <angelo@kernel-space.org>
2026-02-02 14:24:40 -06:00

14 lines
254 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>
*/
#ifndef _GOLDFISH_TIMER_H_
#define _GOLDFISH_TIMER_H_
struct goldfish_timer_plat {
phys_addr_t reg;
};
#endif /* _GOLDFISH_TIMER_H_ */