mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-02-27 11:01:03 +01:00
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 <visitorckw@gmail.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
16 lines
272 B
C
16 lines
272 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2025, Kuan-Wei Chiu <visitorckw@gmail.com>
|
|
*/
|
|
|
|
#ifndef _GOLDFISH_RTC_H_
|
|
#define _GOLDFISH_RTC_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct goldfish_rtc_plat {
|
|
phys_addr_t reg;
|
|
};
|
|
|
|
#endif /* _GOLDFISH_RTC_H_ */
|