From 909f717eaf299a97fb87307e8606f3fdc6cb0c14 Mon Sep 17 00:00:00 2001 From: Kuan-Wei Chiu Date: Wed, 7 Jan 2026 20:18:31 +0000 Subject: 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 Tested-by: Daniel Palmer Reviewed-by: Yao Zi Reviewed-by: Simon Glass Reviewed-by: Angelo Dureghello --- include/goldfish_timer.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 include/goldfish_timer.h (limited to 'include') diff --git a/include/goldfish_timer.h b/include/goldfish_timer.h new file mode 100644 index 00000000000..acd3e460c5a --- /dev/null +++ b/include/goldfish_timer.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2025, Kuan-Wei Chiu + */ + +#ifndef _GOLDFISH_TIMER_H_ +#define _GOLDFISH_TIMER_H_ + +struct goldfish_timer_plat { + phys_addr_t reg; +}; + +#endif /* _GOLDFISH_TIMER_H_ */ -- cgit v1.3.1