Re: [PATCH v2 2/2] RISC-V: defconfig: Enable Goldfish RTC driver
From: Anup Patel
Date: Wed Oct 23 2019 - 02:12:49 EST
On Wed, Oct 23, 2019 at 11:30 AM Paul Walmsley <paul.walmsley@xxxxxxxxxx> wrote:
>
> On Wed, 23 Oct 2019, Anup Patel wrote:
>
> > On Wed, Oct 23, 2019 at 6:37 AM Paul Walmsley <paul.walmsley@xxxxxxxxxx> wrote:
> >
> > > Incidentally, just looking at drivers/platform/goldfish, that driver seems
> > > to be some sort of Google-specific RPC driver. Are you all really sure
> >
> > Nopes, it's not RPC driver. In fact, all Goldfish virtual platform
> > devices are MMIO devices.
>
> Is drivers/platform/goldfish/goldfish_pipe.c required for the Goldfish RTC
> driver or not?
No, it's not required.
>
> If not, then the first patch that was sent isn't the right fix. It would
> be better to remove the Kbuild dependency between the code in
> drivers/platform/goldfish and the Goldfish RTC.
The common GOLDFISH kconfig option is there to specify the
common expectations of all GOLDFISH drivers from Linux ARCH
support.
Currently, all GOLDFISH drivers require HAS_IOMEM and
HAS_DMA support from underlying arch.
If you still think that common GOLDFISH kconfig option is not
required then please go ahead and send patch.
>
> If it is required, then surely there must be a simpler RTC implementation
> available.
GOLDFISH pipe is not required so GOLDFISH RTC is certainly
a simple RTC implementation.
>
> > The problem is VirtIO spec does not define any RTC device so instead of
> > inventing our own virtual RTC device we re-use RTC device defined in
> > Goldfish virtual platform for QEMU virt machine. This way we can re-use
> > the Linux Goldfish RTC driver.
>
> With 160+ RTC drivers in the kernel tree already, we certainly agree that
> it doesn't make sense to invent a new RTC.
>
>
> - Paul
Regards,
Anup