diff mbox series

[1/2] rtc: goldfish: Remove GOLDFISH dependency

Message ID 20201114130921.651882-2-jiaxun.yang@flygoat.com
State Accepted
Headers show
Series Preserve goldfish rtc | expand

Commit Message

Jiaxun Yang Nov. 14, 2020, 1:09 p.m. UTC
Goldfish platform is covered with dust.
However the goldfish-rtc had been used as virtualized RTC
in QEMU for RISC-V virt hw and MIPS loongson3-virt hw, thus
we can drop other parts of goldfish but leave goldfish-rtc here.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 drivers/rtc/Kconfig | 1 -
 1 file changed, 1 deletion(-)

Comments

Geert Uytterhoeven Jan. 4, 2021, 1:28 p.m. UTC | #1
Hi Jiaxun,

On Sat, Nov 14, 2020 at 2:20 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
> Goldfish platform is covered with dust.
> However the goldfish-rtc had been used as virtualized RTC
> in QEMU for RISC-V virt hw and MIPS loongson3-virt hw, thus
> we can drop other parts of goldfish but leave goldfish-rtc here.
>
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>

Thanks for your patch!

> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -1935,7 +1935,6 @@ config RTC_DRV_HID_SENSOR_TIME
>  config RTC_DRV_GOLDFISH
>         tristate "Goldfish Real Time Clock"
>         depends on OF && HAS_IOMEM
> -       depends on GOLDFISH || COMPILE_TEST
>         help
>           Say yes to enable RTC driver for the Goldfish based virtual platform.

I was just looking to see if someone had already sent a patch to add
"depends on GOLDFISH || COMPILE_TEST", before sending one myself, when I
noticed your patch had removed it...

What about

    depends on CPU_LOONGSON64 || GOLDFISH || RISCV || COMPILE_TEST

instead?

Gr{oetje,eeting}s,

                        Geert
Alexandre Belloni Jan. 4, 2021, 2:48 p.m. UTC | #2
Hi Geert,

On 04/01/2021 14:28:26+0100, Geert Uytterhoeven wrote:
> Hi Jiaxun,
> 
> On Sat, Nov 14, 2020 at 2:20 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
> > Goldfish platform is covered with dust.
> > However the goldfish-rtc had been used as virtualized RTC
> > in QEMU for RISC-V virt hw and MIPS loongson3-virt hw, thus
> > we can drop other parts of goldfish but leave goldfish-rtc here.
> >
> > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> 
> Thanks for your patch!
> 
> > --- a/drivers/rtc/Kconfig
> > +++ b/drivers/rtc/Kconfig
> > @@ -1935,7 +1935,6 @@ config RTC_DRV_HID_SENSOR_TIME
> >  config RTC_DRV_GOLDFISH
> >         tristate "Goldfish Real Time Clock"
> >         depends on OF && HAS_IOMEM
> > -       depends on GOLDFISH || COMPILE_TEST
> >         help
> >           Say yes to enable RTC driver for the Goldfish based virtual platform.
> 
> I was just looking to see if someone had already sent a patch to add
> "depends on GOLDFISH || COMPILE_TEST", before sending one myself, when I
> noticed your patch had removed it...
> 
> What about
> 
>     depends on CPU_LOONGSON64 || GOLDFISH || RISCV || COMPILE_TEST
> 
> instead?
> 

But this driver also works on ARM, is it really important to restrict to
a few architectures ?
Geert Uytterhoeven Jan. 4, 2021, 3:21 p.m. UTC | #3
Hi Alexandre,

On Mon, Jan 4, 2021 at 3:48 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> On 04/01/2021 14:28:26+0100, Geert Uytterhoeven wrote:
> > On Sat, Nov 14, 2020 at 2:20 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
> > > Goldfish platform is covered with dust.
> > > However the goldfish-rtc had been used as virtualized RTC
> > > in QEMU for RISC-V virt hw and MIPS loongson3-virt hw, thus
> > > we can drop other parts of goldfish but leave goldfish-rtc here.
> > >
> > > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> >
> > Thanks for your patch!
> >
> > > --- a/drivers/rtc/Kconfig
> > > +++ b/drivers/rtc/Kconfig
> > > @@ -1935,7 +1935,6 @@ config RTC_DRV_HID_SENSOR_TIME
> > >  config RTC_DRV_GOLDFISH
> > >         tristate "Goldfish Real Time Clock"
> > >         depends on OF && HAS_IOMEM
> > > -       depends on GOLDFISH || COMPILE_TEST
> > >         help
> > >           Say yes to enable RTC driver for the Goldfish based virtual platform.
> >
> > I was just looking to see if someone had already sent a patch to add
> > "depends on GOLDFISH || COMPILE_TEST", before sending one myself, when I
> > noticed your patch had removed it...
> >
> > What about
> >
> >     depends on CPU_LOONGSON64 || GOLDFISH || RISCV || COMPILE_TEST
> >
> > instead?
> >
>
> But this driver also works on ARM, is it really important to restrict to
> a few architectures ?

Is it used on ARM platforms?
qemu:hw/riscv/Kconfig selects GOLDFISH_RTC, but that's it?

Gr{oetje,eeting}s,

                        Geert
Alexandre Belloni Jan. 4, 2021, 3:43 p.m. UTC | #4
On 04/01/2021 16:21:31+0100, Geert Uytterhoeven wrote:
> Hi Alexandre,
> 
> On Mon, Jan 4, 2021 at 3:48 PM Alexandre Belloni
> <alexandre.belloni@bootlin.com> wrote:
> > On 04/01/2021 14:28:26+0100, Geert Uytterhoeven wrote:
> > > On Sat, Nov 14, 2020 at 2:20 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
> > > > Goldfish platform is covered with dust.
> > > > However the goldfish-rtc had been used as virtualized RTC
> > > > in QEMU for RISC-V virt hw and MIPS loongson3-virt hw, thus
> > > > we can drop other parts of goldfish but leave goldfish-rtc here.
> > > >
> > > > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> > >
> > > Thanks for your patch!
> > >
> > > > --- a/drivers/rtc/Kconfig
> > > > +++ b/drivers/rtc/Kconfig
> > > > @@ -1935,7 +1935,6 @@ config RTC_DRV_HID_SENSOR_TIME
> > > >  config RTC_DRV_GOLDFISH
> > > >         tristate "Goldfish Real Time Clock"
> > > >         depends on OF && HAS_IOMEM
> > > > -       depends on GOLDFISH || COMPILE_TEST
> > > >         help
> > > >           Say yes to enable RTC driver for the Goldfish based virtual platform.
> > >
> > > I was just looking to see if someone had already sent a patch to add
> > > "depends on GOLDFISH || COMPILE_TEST", before sending one myself, when I
> > > noticed your patch had removed it...
> > >
> > > What about
> > >
> > >     depends on CPU_LOONGSON64 || GOLDFISH || RISCV || COMPILE_TEST
> > >
> > > instead?
> > >
> >
> > But this driver also works on ARM, is it really important to restrict to
> > a few architectures ?
> 
> Is it used on ARM platforms?
> qemu:hw/riscv/Kconfig selects GOLDFISH_RTC, but that's it?
> 

My understanding is that this was used on the original ARM based goldfish
android emulator but I don't think this was ever upstreamed.
Geert Uytterhoeven Jan. 4, 2021, 3:51 p.m. UTC | #5
Hi Alexandre,

On Mon, Jan 4, 2021 at 4:43 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
> On 04/01/2021 16:21:31+0100, Geert Uytterhoeven wrote:
> > On Mon, Jan 4, 2021 at 3:48 PM Alexandre Belloni
> > <alexandre.belloni@bootlin.com> wrote:
> > > On 04/01/2021 14:28:26+0100, Geert Uytterhoeven wrote:
> > > > On Sat, Nov 14, 2020 at 2:20 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
> > > > > Goldfish platform is covered with dust.
> > > > > However the goldfish-rtc had been used as virtualized RTC
> > > > > in QEMU for RISC-V virt hw and MIPS loongson3-virt hw, thus
> > > > > we can drop other parts of goldfish but leave goldfish-rtc here.
> > > > >
> > > > > Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> > > >
> > > > Thanks for your patch!
> > > >
> > > > > --- a/drivers/rtc/Kconfig
> > > > > +++ b/drivers/rtc/Kconfig
> > > > > @@ -1935,7 +1935,6 @@ config RTC_DRV_HID_SENSOR_TIME
> > > > >  config RTC_DRV_GOLDFISH
> > > > >         tristate "Goldfish Real Time Clock"
> > > > >         depends on OF && HAS_IOMEM
> > > > > -       depends on GOLDFISH || COMPILE_TEST
> > > > >         help
> > > > >           Say yes to enable RTC driver for the Goldfish based virtual platform.
> > > >
> > > > I was just looking to see if someone had already sent a patch to add
> > > > "depends on GOLDFISH || COMPILE_TEST", before sending one myself, when I
> > > > noticed your patch had removed it...
> > > >
> > > > What about
> > > >
> > > >     depends on CPU_LOONGSON64 || GOLDFISH || RISCV || COMPILE_TEST
> > > >
> > > > instead?
> > > >
> > >
> > > But this driver also works on ARM, is it really important to restrict to
> > > a few architectures ?
> >
> > Is it used on ARM platforms?
> > qemu:hw/riscv/Kconfig selects GOLDFISH_RTC, but that's it?
>
> My understanding is that this was used on the original ARM based goldfish
> android emulator but I don't think this was ever upstreamed.

Upstream indeed only has GOLDFISH support in arch/x86/Kconfig.
Still, that would be handled by the dependency on GOLDFISH.

Or do you mean upstream QEMU Goldfish support?

Gr{oetje,eeting}s,

                        Geert
Alexandre Belloni Jan. 6, 2021, 1:27 p.m. UTC | #6
On 04/01/2021 16:51:40+0100, Geert Uytterhoeven wrote:
> > > Is it used on ARM platforms?
> > > qemu:hw/riscv/Kconfig selects GOLDFISH_RTC, but that's it?
> >
> > My understanding is that this was used on the original ARM based goldfish
> > android emulator but I don't think this was ever upstreamed.
> 
> Upstream indeed only has GOLDFISH support in arch/x86/Kconfig.
> Still, that would be handled by the dependency on GOLDFISH.
> 
> Or do you mean upstream QEMU Goldfish support?
> 

Yes, I meant upstream in QEMU. If I refer to the doc from google:

'goldfish' is the name of a family of similar virtual hardware platforms, that
mostly differ in the virtual CPU they support. 'goldfish' started as an
ARM-specific platform, but has now been ported to x86 and MIPS virtual CPUs.

Goldfish was based on QEMU 0.8.2, they then moved to ranchu, this time
on a more upstream QEMU but I don't think this is upstream either.
diff mbox series

Patch

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 65ad9d0b47ab..f784b52381b1 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1935,7 +1935,6 @@  config RTC_DRV_HID_SENSOR_TIME
 config RTC_DRV_GOLDFISH
 	tristate "Goldfish Real Time Clock"
 	depends on OF && HAS_IOMEM
-	depends on GOLDFISH || COMPILE_TEST
 	help
 	  Say yes to enable RTC driver for the Goldfish based virtual platform.