summaryrefslogtreecommitdiff
path: root/include/goldfish_rtc.h
diff options
context:
space:
mode:
authorKuan-Wei Chiu <[email protected]>2026-01-07 20:18:32 +0000
committerTom Rini <[email protected]>2026-02-02 14:24:40 -0600
commitb41c54488f6f8263c8b38a6cf97d106c3f9a65bb (patch)
treef22f03f4d4cfd65d1d350a65089df1ffdf96d7e7 /include/goldfish_rtc.h
parent909f717eaf299a97fb87307e8606f3fdc6cb0c14 (diff)
rtc: goldfish: Support platform data for non-DT probing
Currently, the Goldfish RTC driver exclusively relies on device tree to retrieve the base address, failing immediately if dev_read_addr() returns FDT_ADDR_T_NONE. This restriction prevents the driver from being used on platforms that instantiate devices via U_BOOT_DRVINFO() instead of device tree, such as the QEMU m68k virt machine. Add support for platform data to address this limitation. Introduce a new .of_to_plat hook to handle device tree parsing and populate the platform data. Update the probe function to rely exclusively on this platform data, enabling support for both Device Tree and manual instantiation. Introduce a new header file include/goldfish_rtc.h to define the platform data structure. Signed-off-by: Kuan-Wei Chiu <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'include/goldfish_rtc.h')
-rw-r--r--include/goldfish_rtc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/goldfish_rtc.h b/include/goldfish_rtc.h
new file mode 100644
index 00000000000..f0e6ba3d543
--- /dev/null
+++ b/include/goldfish_rtc.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2025, Kuan-Wei Chiu <[email protected]>
+ */
+
+#ifndef _GOLDFISH_RTC_H_
+#define _GOLDFISH_RTC_H_
+
+#include <linux/types.h>
+
+struct goldfish_rtc_plat {
+ phys_addr_t reg;
+};
+
+#endif /* _GOLDFISH_RTC_H_ */