[PATCH v2 0/2] RTC support for QEMU RISC-V virt machine

Anup Patel posted 2 patches 4 years, 6 months ago
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test docker-clang@ubuntu passed
Test asan passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190924131131.118155-1-anup.patel@wdc.com
Maintainers: Palmer Dabbelt <palmer@sifive.com>, Alistair Francis <Alistair.Francis@wdc.com>, Bastian Koppelmann <kbastian@mail.uni-paderborn.de>, Sagar Karandikar <sagark@eecs.berkeley.edu>
There is a newer version of this series
hw/riscv/Kconfig                |   1 +
hw/riscv/virt.c                 |  15 ++
hw/timer/Kconfig                |   3 +
hw/timer/Makefile.objs          |   1 +
hw/timer/goldfish_rtc.c         | 278 ++++++++++++++++++++++++++++++++
include/hw/riscv/virt.h         |   2 +
include/hw/timer/goldfish_rtc.h |  46 ++++++
7 files changed, 346 insertions(+)
create mode 100644 hw/timer/goldfish_rtc.c
create mode 100644 include/hw/timer/goldfish_rtc.h
[PATCH v2 0/2] RTC support for QEMU RISC-V virt machine
Posted by Anup Patel 4 years, 6 months ago
This series adds RTC device to QEMU RISC-V virt machine. We have
selected Goldfish RTC device model for this. It's a pretty simple
synthetic device with few MMIO registers and no dependency external
clock. The driver for Goldfish RTC is already available in Linux so
we just need to enable it in Kconfig for RISCV and also update Linux
defconfigs.

We have tested this series with Linux-5.3 plus defconfig changes
available in 'goldfish_rtc_v1' branch of:
https://github.com/avpatel/linux.git

Changes since v1:
 - Removed redundant object properties from Goldfish RTC emulation
 - Added vmstate for Goldfish RTC

Anup Patel (2):
  hw: timer: Add Goldfish RTC device
  riscv: virt: Use Goldfish RTC device

 hw/riscv/Kconfig                |   1 +
 hw/riscv/virt.c                 |  15 ++
 hw/timer/Kconfig                |   3 +
 hw/timer/Makefile.objs          |   1 +
 hw/timer/goldfish_rtc.c         | 278 ++++++++++++++++++++++++++++++++
 include/hw/riscv/virt.h         |   2 +
 include/hw/timer/goldfish_rtc.h |  46 ++++++
 7 files changed, 346 insertions(+)
 create mode 100644 hw/timer/goldfish_rtc.c
 create mode 100644 include/hw/timer/goldfish_rtc.h

--
2.17.1

Re: [PATCH v2 0/2] RTC support for QEMU RISC-V virt machine
Posted by Philippe Mathieu-Daudé 4 years, 6 months ago
Hi Anup,

On 9/24/19 3:11 PM, Anup Patel wrote:
> This series adds RTC device to QEMU RISC-V virt machine. We have
> selected Goldfish RTC device model for this. It's a pretty simple
> synthetic device with few MMIO registers and no dependency external
> clock. The driver for Goldfish RTC is already available in Linux so
> we just need to enable it in Kconfig for RISCV and also update Linux
> defconfigs.
> 
> We have tested this series with Linux-5.3 plus defconfig changes
> available in 'goldfish_rtc_v1' branch of:
> https://github.com/avpatel/linux.git
> 
> Changes since v1:
>  - Removed redundant object properties from Goldfish RTC emulation
>  - Added vmstate for Goldfish RTC
> 
> Anup Patel (2):
>   hw: timer: Add Goldfish RTC device
>   riscv: virt: Use Goldfish RTC device
> 
>  hw/riscv/Kconfig                |   1 +
>  hw/riscv/virt.c                 |  15 ++
>  hw/timer/Kconfig                |   3 +
>  hw/timer/Makefile.objs          |   1 +
>  hw/timer/goldfish_rtc.c         | 278 ++++++++++++++++++++++++++++++++
>  include/hw/riscv/virt.h         |   2 +
>  include/hw/timer/goldfish_rtc.h |  46 ++++++

Minor comment, if my ongoing series "Split RTC devices from hw/timer/ to
hw/rtc/" is accepted, you'd have to rebase this in hw/rtc/goldfish_rtc:
https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
(no logical change involved).

Regards,

Phil.


RE: [PATCH v2 0/2] RTC support for QEMU RISC-V virt machine
Posted by Anup Patel 4 years, 6 months ago

> -----Original Message-----
> From: Philippe Mathieu-Daudé <philmd@redhat.com>
> Sent: Tuesday, September 24, 2019 7:35 PM
> To: Anup Patel <Anup.Patel@wdc.com>; Peter Maydell
> <peter.maydell@linaro.org>; Palmer Dabbelt <palmer@sifive.com>; Alistair
> Francis <Alistair.Francis@wdc.com>; Sagar Karandikar
> <sagark@eecs.berkeley.edu>; Bastian Koppelmann <kbastian@mail.uni-
> paderborn.de>
> Cc: Atish Patra <Atish.Patra@wdc.com>; qemu-riscv@nongnu.org; qemu-
> devel@nongnu.org; Anup Patel <anup@brainfault.org>
> Subject: Re: [PATCH v2 0/2] RTC support for QEMU RISC-V virt machine
> 
> Hi Anup,
> 
> On 9/24/19 3:11 PM, Anup Patel wrote:
> > This series adds RTC device to QEMU RISC-V virt machine. We have
> > selected Goldfish RTC device model for this. It's a pretty simple
> > synthetic device with few MMIO registers and no dependency external
> > clock. The driver for Goldfish RTC is already available in Linux so we
> > just need to enable it in Kconfig for RISCV and also update Linux
> > defconfigs.
> >
> > We have tested this series with Linux-5.3 plus defconfig changes
> > available in 'goldfish_rtc_v1' branch of:
> > https://github.com/avpatel/linux.git
> >
> > Changes since v1:
> >  - Removed redundant object properties from Goldfish RTC emulation
> >  - Added vmstate for Goldfish RTC
> >
> > Anup Patel (2):
> >   hw: timer: Add Goldfish RTC device
> >   riscv: virt: Use Goldfish RTC device
> >
> >  hw/riscv/Kconfig                |   1 +
> >  hw/riscv/virt.c                 |  15 ++
> >  hw/timer/Kconfig                |   3 +
> >  hw/timer/Makefile.objs          |   1 +
> >  hw/timer/goldfish_rtc.c         | 278
> ++++++++++++++++++++++++++++++++
> >  include/hw/riscv/virt.h         |   2 +
> >  include/hw/timer/goldfish_rtc.h |  46 ++++++
> 
> Minor comment, if my ongoing series "Split RTC devices from hw/timer/ to
> hw/rtc/" is accepted, you'd have to rebase this in hw/rtc/goldfish_rtc:
> https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
> (no logical change involved).

No problem, I will rebase these patches once your series after it is
accepted.

Regards,
Anup