[PATCH v8 0/3] RTC support for QEMU RISC-V virt machine

Anup Patel posted 3 patches 4 years, 5 months ago
Failed in applying to current master (apply log)
MAINTAINERS                   |   8 +
hw/riscv/Kconfig              |   1 +
hw/riscv/virt.c               |  16 ++
hw/rtc/Kconfig                |   3 +
hw/rtc/Makefile.objs          |   1 +
hw/rtc/goldfish_rtc.c         | 285 ++++++++++++++++++++++++++++++++++
hw/rtc/trace-events           |   4 +
include/hw/riscv/virt.h       |   2 +
include/hw/rtc/goldfish_rtc.h |  46 ++++++
9 files changed, 366 insertions(+)
create mode 100644 hw/rtc/goldfish_rtc.c
create mode 100644 include/hw/rtc/goldfish_rtc.h
[PATCH v8 0/3] RTC support for QEMU RISC-V virt machine
Posted by Anup Patel 4 years, 5 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.4-rc4 plus defconfig changes
available in 'goldfish_rtc_v2' branch of:
https://github.com/avpatel/linux.git

Changes since v7:
 - Fix broken "stdout-path" in "/chosen" DT node of virt machine

Changes since v6:
 - Rebased on latest QEMU master
 - Addressed all nit comments from Philippe Mathieu-Daude

Changes since v5:
 - Rebased on latest QEMU master
 - Added maintainer entry for Goldfish RTC

Changes since v4:
 - Fixed typo in trace event usage
 - Moved goldfish_rtc.h to correct location

Changes since v3:
 - Address all nit comments from Alistair

Changes since v2:
 - Rebased on RTC code refactoring

Changes since v1:
 - Implemented VMState save/restore callbacks

Anup Patel (3):
  hw: rtc: Add Goldfish RTC device
  riscv: virt: Use Goldfish RTC device
  MAINTAINERS: Add maintainer entry for Goldfish RTC

 MAINTAINERS                   |   8 +
 hw/riscv/Kconfig              |   1 +
 hw/riscv/virt.c               |  16 ++
 hw/rtc/Kconfig                |   3 +
 hw/rtc/Makefile.objs          |   1 +
 hw/rtc/goldfish_rtc.c         | 285 ++++++++++++++++++++++++++++++++++
 hw/rtc/trace-events           |   4 +
 include/hw/riscv/virt.h       |   2 +
 include/hw/rtc/goldfish_rtc.h |  46 ++++++
 9 files changed, 366 insertions(+)
 create mode 100644 hw/rtc/goldfish_rtc.c
 create mode 100644 include/hw/rtc/goldfish_rtc.h

--
2.17.1

Re: [PATCH v8 0/3] RTC support for QEMU RISC-V virt machine
Posted by Palmer Dabbelt 4 years, 5 months ago
On Wed, 06 Nov 2019 03:56:29 PST (-0800), 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.4-rc4 plus defconfig changes
> available in 'goldfish_rtc_v2' branch of:
> https://github.com/avpatel/linux.git
>
> Changes since v7:
>  - Fix broken "stdout-path" in "/chosen" DT node of virt machine
>
> Changes since v6:
>  - Rebased on latest QEMU master
>  - Addressed all nit comments from Philippe Mathieu-Daude
>
> Changes since v5:
>  - Rebased on latest QEMU master
>  - Added maintainer entry for Goldfish RTC
>
> Changes since v4:
>  - Fixed typo in trace event usage
>  - Moved goldfish_rtc.h to correct location
>
> Changes since v3:
>  - Address all nit comments from Alistair
>
> Changes since v2:
>  - Rebased on RTC code refactoring
>
> Changes since v1:
>  - Implemented VMState save/restore callbacks
>
> Anup Patel (3):
>   hw: rtc: Add Goldfish RTC device
>   riscv: virt: Use Goldfish RTC device
>   MAINTAINERS: Add maintainer entry for Goldfish RTC
>
>  MAINTAINERS                   |   8 +
>  hw/riscv/Kconfig              |   1 +
>  hw/riscv/virt.c               |  16 ++
>  hw/rtc/Kconfig                |   3 +
>  hw/rtc/Makefile.objs          |   1 +
>  hw/rtc/goldfish_rtc.c         | 285 ++++++++++++++++++++++++++++++++++
>  hw/rtc/trace-events           |   4 +
>  include/hw/riscv/virt.h       |   2 +
>  include/hw/rtc/goldfish_rtc.h |  46 ++++++
>  9 files changed, 366 insertions(+)
>  create mode 100644 hw/rtc/goldfish_rtc.c
>  create mode 100644 include/hw/rtc/goldfish_rtc.h

Thanks.  I've updated the patches on my queue, LMK if there are any more 
changes!

Re: [PATCH v8 0/3] RTC support for QEMU RISC-V virt machine
Posted by Anup Patel 4 years, 3 months ago
On Thu, Nov 7, 2019 at 10:22 PM Palmer Dabbelt <palmer@dabbelt.com> wrote:
>
> On Wed, 06 Nov 2019 03:56:29 PST (-0800), 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.4-rc4 plus defconfig changes
> > available in 'goldfish_rtc_v2' branch of:
> > https://github.com/avpatel/linux.git
> >
> > Changes since v7:
> >  - Fix broken "stdout-path" in "/chosen" DT node of virt machine
> >
> > Changes since v6:
> >  - Rebased on latest QEMU master
> >  - Addressed all nit comments from Philippe Mathieu-Daude
> >
> > Changes since v5:
> >  - Rebased on latest QEMU master
> >  - Added maintainer entry for Goldfish RTC
> >
> > Changes since v4:
> >  - Fixed typo in trace event usage
> >  - Moved goldfish_rtc.h to correct location
> >
> > Changes since v3:
> >  - Address all nit comments from Alistair
> >
> > Changes since v2:
> >  - Rebased on RTC code refactoring
> >
> > Changes since v1:
> >  - Implemented VMState save/restore callbacks
> >
> > Anup Patel (3):
> >   hw: rtc: Add Goldfish RTC device
> >   riscv: virt: Use Goldfish RTC device
> >   MAINTAINERS: Add maintainer entry for Goldfish RTC
> >
> >  MAINTAINERS                   |   8 +
> >  hw/riscv/Kconfig              |   1 +
> >  hw/riscv/virt.c               |  16 ++
> >  hw/rtc/Kconfig                |   3 +
> >  hw/rtc/Makefile.objs          |   1 +
> >  hw/rtc/goldfish_rtc.c         | 285 ++++++++++++++++++++++++++++++++++
> >  hw/rtc/trace-events           |   4 +
> >  include/hw/riscv/virt.h       |   2 +
> >  include/hw/rtc/goldfish_rtc.h |  46 ++++++
> >  9 files changed, 366 insertions(+)
> >  create mode 100644 hw/rtc/goldfish_rtc.c
> >  create mode 100644 include/hw/rtc/goldfish_rtc.h
>
> Thanks.  I've updated the patches on my queue, LMK if there are any more
> changes!

Can this series be taken for QEMU 5.0 ?

It's already 2 months since it was reviewed.

Regards,
Anup

Re: [PATCH v8 0/3] RTC support for QEMU RISC-V virt machine
Posted by Philippe Mathieu-Daudé 4 years, 5 months ago
On 11/7/19 5:52 PM, Palmer Dabbelt wrote:
> On Wed, 06 Nov 2019 03:56:29 PST (-0800), 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.4-rc4 plus defconfig changes
>> available in 'goldfish_rtc_v2' branch of:
>> https://github.com/avpatel/linux.git
>>
>> Changes since v7:
>>  - Fix broken "stdout-path" in "/chosen" DT node of virt machine
>>
>> Changes since v6:
>>  - Rebased on latest QEMU master
>>  - Addressed all nit comments from Philippe Mathieu-Daude
>>
>> Changes since v5:
>>  - Rebased on latest QEMU master
>>  - Added maintainer entry for Goldfish RTC
>>
>> Changes since v4:
>>  - Fixed typo in trace event usage
>>  - Moved goldfish_rtc.h to correct location
>>
>> Changes since v3:
>>  - Address all nit comments from Alistair
>>
>> Changes since v2:
>>  - Rebased on RTC code refactoring
>>
>> Changes since v1:
>>  - Implemented VMState save/restore callbacks
>>
>> Anup Patel (3):
>>   hw: rtc: Add Goldfish RTC device
>>   riscv: virt: Use Goldfish RTC device
>>   MAINTAINERS: Add maintainer entry for Goldfish RTC
>>
>>  MAINTAINERS                   |   8 +
>>  hw/riscv/Kconfig              |   1 +
>>  hw/riscv/virt.c               |  16 ++
>>  hw/rtc/Kconfig                |   3 +
>>  hw/rtc/Makefile.objs          |   1 +
>>  hw/rtc/goldfish_rtc.c         | 285 ++++++++++++++++++++++++++++++++++
>>  hw/rtc/trace-events           |   4 +
>>  include/hw/riscv/virt.h       |   2 +
>>  include/hw/rtc/goldfish_rtc.h |  46 ++++++
>>  9 files changed, 366 insertions(+)
>>  create mode 100644 hw/rtc/goldfish_rtc.c
>>  create mode 100644 include/hw/rtc/goldfish_rtc.h
> 
> Thanks.  I've updated the patches on my queue, LMK if there are any more 
> changes!

I'm happy with the series, thanks Anup for addressing all the comments.

Regards,

Phil.