On Tue, May 9, 2023, at 10:51, Geert Uytterhoeven wrote: > On Tue, May 9, 2023 at 10:23 AM Arnd Bergmann <arnd@xxxxxxxx> wrote: >> On Tue, May 9, 2023, at 08:38, Geert Uytterhoeven wrote: >> If you ever want to revisit this, I suspect the harder part here >> is to detach arch/m68k/ from the RTC_DRV_GENERIC code first, pushing >> the device registration into the individual machine specific time.c >> code. It's probably not even worth trying to share the rtc-cmos >> driver, but it might be useful to share the library code like >> RTC_DRV_ALPHA does. > > Arch/m68k is not that entangled with RTC_DRV_GENERIC, as amiga_defconfig > does not enable it, but enables CONFIG_RTC_DRV_MSM6242 and > CONFIG_RTC_DRV_RP5C01 instead. Ah, I see now, I misremembered this part. The only bit that is shared on m68k is the mach_hwclk() function that is used for either read_persistent_clock64() or rtc_generic on platforms that have one. So any platform could indeed be converted from mach_hwclk() to a custom rtc driver without affecting the others. Arnd