2019-12-03 03:50:46

by Anup Patel

[permalink] [raw]
Subject: [PATCH v2 4/4] RISC-V: Select Goldfish RTC driver for QEMU virt machine

We select Goldfish RTC driver using QEMU virt machine kconfig option
to access RTC device on QEMU virt machine.

Signed-off-by: Anup Patel <[email protected]>
Reviewed-by: Atish Patra <[email protected]>
Reviewed-by: Palmer Dabbelt <[email protected]>
---
arch/riscv/Kconfig.socs | 2 ++
arch/riscv/configs/defconfig | 1 +
arch/riscv/configs/rv32_defconfig | 1 +
3 files changed, 4 insertions(+)

diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index bae4907b4880..65cf39867c60 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -28,6 +28,8 @@ config SOC_VIRT
select VIRTIO_INPUT
select POWER_RESET_SYSCON
select POWER_RESET_SYSCON_POWEROFF
+ select GOLDFISH
+ select RTC_DRV_GOLDFISH
select SIFIVE_PLIC
help
This enables support for QEMU Virt Machine.
diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig
index bf33bd40ee07..c5e04384ec3d 100644
--- a/arch/riscv/configs/defconfig
+++ b/arch/riscv/configs/defconfig
@@ -73,6 +73,7 @@ CONFIG_USB_STORAGE=y
CONFIG_USB_UAS=y
CONFIG_MMC=y
CONFIG_MMC_SPI=y
+CONFIG_RTC_CLASS=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_AUTOFS4_FS=y
diff --git a/arch/riscv/configs/rv32_defconfig b/arch/riscv/configs/rv32_defconfig
index 234213b4ea74..7972b1d321c1 100644
--- a/arch/riscv/configs/rv32_defconfig
+++ b/arch/riscv/configs/rv32_defconfig
@@ -69,6 +69,7 @@ CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_PLATFORM=y
CONFIG_USB_STORAGE=y
CONFIG_USB_UAS=y
+CONFIG_RTC_CLASS=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_AUTOFS4_FS=y
--
2.17.1


2019-12-03 19:37:18

by Alistair Francis

[permalink] [raw]
Subject: Re: [PATCH v2 4/4] RISC-V: Select Goldfish RTC driver for QEMU virt machine

On Tue, 2019-12-03 at 03:49 +0000, Anup Patel wrote:
> We select Goldfish RTC driver using QEMU virt machine kconfig option
> to access RTC device on QEMU virt machine.
>
> Signed-off-by: Anup Patel <[email protected]>
> Reviewed-by: Atish Patra <[email protected]>
> Reviewed-by: Palmer Dabbelt <[email protected]>

Reviewed-by: Alistair Francis <[email protected]>

Alistair

> ---
> arch/riscv/Kconfig.socs | 2 ++
> arch/riscv/configs/defconfig | 1 +
> arch/riscv/configs/rv32_defconfig | 1 +
> 3 files changed, 4 insertions(+)
>
> diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
> index bae4907b4880..65cf39867c60 100644
> --- a/arch/riscv/Kconfig.socs
> +++ b/arch/riscv/Kconfig.socs
> @@ -28,6 +28,8 @@ config SOC_VIRT
> select VIRTIO_INPUT
> select POWER_RESET_SYSCON
> select POWER_RESET_SYSCON_POWEROFF
> + select GOLDFISH
> + select RTC_DRV_GOLDFISH
> select SIFIVE_PLIC
> help
> This enables support for QEMU Virt Machine.
> diff --git a/arch/riscv/configs/defconfig
> b/arch/riscv/configs/defconfig
> index bf33bd40ee07..c5e04384ec3d 100644
> --- a/arch/riscv/configs/defconfig
> +++ b/arch/riscv/configs/defconfig
> @@ -73,6 +73,7 @@ CONFIG_USB_STORAGE=y
> CONFIG_USB_UAS=y
> CONFIG_MMC=y
> CONFIG_MMC_SPI=y
> +CONFIG_RTC_CLASS=y
> CONFIG_EXT4_FS=y
> CONFIG_EXT4_FS_POSIX_ACL=y
> CONFIG_AUTOFS4_FS=y
> diff --git a/arch/riscv/configs/rv32_defconfig
> b/arch/riscv/configs/rv32_defconfig
> index 234213b4ea74..7972b1d321c1 100644
> --- a/arch/riscv/configs/rv32_defconfig
> +++ b/arch/riscv/configs/rv32_defconfig
> @@ -69,6 +69,7 @@ CONFIG_USB_OHCI_HCD=y
> CONFIG_USB_OHCI_HCD_PLATFORM=y
> CONFIG_USB_STORAGE=y
> CONFIG_USB_UAS=y
> +CONFIG_RTC_CLASS=y
> CONFIG_EXT4_FS=y
> CONFIG_EXT4_FS_POSIX_ACL=y
> CONFIG_AUTOFS4_FS=y

2020-01-22 19:52:28

by Paul Walmsley

[permalink] [raw]
Subject: Re: [PATCH v2 4/4] RISC-V: Select Goldfish RTC driver for QEMU virt machine

On Tue, 3 Dec 2019, Anup Patel wrote:

> We select Goldfish RTC driver using QEMU virt machine kconfig option
> to access RTC device on QEMU virt machine.
>
> Signed-off-by: Anup Patel <[email protected]>
> Reviewed-by: Atish Patra <[email protected]>
> Reviewed-by: Palmer Dabbelt <[email protected]>

I just grepped for Goldfish through the QEMU git tree, and it didn't come
up with anything. Per our discussion last year: as a general matter of
policy, until QEMU merges support for a simulated hardware device into
their master branch, we shouldn't speculatively enable support for it.
So, NAK from me on this one until that happens.


- Paul

2020-01-30 15:42:49

by Palmer Dabbelt

[permalink] [raw]
Subject: Re: [PATCH v2 4/4] RISC-V: Select Goldfish RTC driver for QEMU virt machine

On Wed, 22 Jan 2020 19:49:54 GMT (+0000), Paul Walmsley wrote:
> On Tue, 3 Dec 2019, Anup Patel wrote:
>
>> We select Goldfish RTC driver using QEMU virt machine kconfig option
>> to access RTC device on QEMU virt machine.
>>
>> Signed-off-by: Anup Patel <[email protected]>
>> Reviewed-by: Atish Patra <[email protected]>
>> Reviewed-by: Palmer Dabbelt <[email protected]>
>
> I just grepped for Goldfish through the QEMU git tree, and it didn't come
> up with anything. Per our discussion last year: as a general matter of
> policy, until QEMU merges support for a simulated hardware device into
> their master branch, we shouldn't speculatively enable support for it.
> So, NAK from me on this one until that happens.

Thanks, I thought they were going in through a hw/rtc tree and forgot about
them. I've queued them up for QEMU via the RISC-V tree, there's still some
other patches I'd like to batch up but I'll send them up soon. I don't see any
reason why the Linux patches can't go in via an early-ish RC, so we shoul be
fine.