Re: [PATCH v2 2/2] RISC-V: defconfig: Enable Goldfish RTC driver

From: Paul Walmsley
Date: Wed Oct 23 2019 - 02:05:57 EST


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?

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.

If it is required, then surely there must be a simpler RTC implementation
available.

> 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