[PATCH v5 3/7] rtc: goldfish: Support platform data for non-DT probing

Tom Rini trini at konsulko.com
Tue Jan 6 17:58:04 CET 2026


On Tue, Jan 06, 2026 at 09:22:01AM -0700, Simon Glass wrote:
> Hi Tom,
> 
> On Mon, 5 Jan 2026 at 16:47, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Mon, Jan 05, 2026 at 04:30:26PM -0700, Simon Glass wrote:
> > > Hi Kuan-Wei,
> > >
> > > On Mon, 5 Jan 2026 at 11:20, Kuan-Wei Chiu <visitorckw at gmail.com> wrote:
> > > >
> > > > 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. Update the
> > > > probe function to fall back to retrieving the base address from
> > > > struct goldfish_rtc_plat if the device tree address is unavailable.
> > > > Introduce a new header file include/goldfish_rtc.h to define the
> > > > platform data structure.
> > > >
> > > > Signed-off-by: Kuan-Wei Chiu <visitorckw at gmail.com>
> > > > Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> > > > ---
> > > > Changes in v5:
> > > > - Rebase on u-boot/next branch.
> > > >
> > > >  drivers/rtc/goldfish_rtc.c | 13 ++++++++++---
> > > >  include/goldfish_rtc.h     | 15 +++++++++++++++
> > > >  2 files changed, 25 insertions(+), 3 deletions(-)
> > > >  create mode 100644 include/goldfish_rtc.h
> > > >
> > >
> > > You can package your own devicetree in the U-Boot source, to handle
> > > what you need.
> >
> > That's not helpful feedback here, the correct path is to use the machine
> > as QEMU provides it and not start yet another pointless argument with
> > QEMU. And this probably applies to some of your other feedback as well,
> > thanks.
> 
> From what I understand, QEMU does not use DT for m68k. If it did, then
> we would not be using platdata. Am I missing something here?

Yes, we don't want to add something here in U-Boot that won't be
generally useful. Since it sounds like Daniel has a plan to move
forward, that's the direction to head.

> Regards,
> Simon
> 
> PS: The QEMU thing was certainly not pointless, even if the 'argument'
> resolved nothing. We still have this work-around in the docs, 4 years
> and counting:
> 
> https://docs.u-boot.org/en/latest/develop/devicetree/dt_qemu.html#merging-in-u-boot-nodes-properties

I've not un-documented your specific workaround for your use-case, that
is true. I also don't know of anyone else using that.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260106/1b3796b4/attachment.sig>


More information about the U-Boot mailing list