summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKuan-Wei Chiu <visitorckw@gmail.com>2026-01-07 20:18:31 +0000
committerTom Rini <trini@konsulko.com>2026-02-02 14:24:40 -0600
commit909f717eaf299a97fb87307e8606f3fdc6cb0c14 (patch)
tree6221580c2b98631290f8df00f3c9f842a5cf31f9 /include
parentbf55b84736d6b220dae11e3b1e7a670918d9daee (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/goldfish_timer.h13
1 files changed, 13 insertions, 0 deletions
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 <visitorckw@gmail.com>
+ */
+
+#ifndef _GOLDFISH_TIMER_H_
+#define _GOLDFISH_TIMER_H_
+
+struct goldfish_timer_plat {
+ phys_addr_t reg;
+};
+
+#endif /* _GOLDFISH_TIMER_H_ */