qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] RTC support for QEMU RISC-V virt machine
@ 2019-10-15  8:35 Anup Patel
  2019-10-15  8:35 ` [PATCH v3 1/2] hw: timer: Add Goldfish RTC device Anup Patel
  2019-10-15  8:35 ` [PATCH v3 2/2] riscv: virt: Use " Anup Patel
  0 siblings, 2 replies; 11+ messages in thread
From: Anup Patel @ 2019-10-15  8:35 UTC (permalink / raw)
  To: Peter Maydell, Palmer Dabbelt, Alistair Francis, Sagar Karandikar,
	Bastian Koppelmann
  Cc: Atish Patra, Anup Patel, qemu-riscv@nongnu.org,
	qemu-devel@nongnu.org, Anup Patel

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-rc1 plus defconfig changes
available in 'goldfish_rtc_v2' branch of:
https://github.com/avpatel/linux.git

Changes since v2:
 - Rebased patches on recent RTC refactoring by Philippe Mathieu-Daud??
   (Refer, https://patchew.org/QEMU/20191003230404.19384-1-philmd@redhat.com/)

Changes since v1:
 - Implemented VMState save/restore 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/rtc/Kconfig                  |   3 +
 hw/rtc/Makefile.objs            |   1 +
 hw/rtc/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/rtc/goldfish_rtc.c
 create mode 100644 include/hw/timer/goldfish_rtc.h

--
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-10-19  6:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-15  8:35 [PATCH v3 0/2] RTC support for QEMU RISC-V virt machine Anup Patel
2019-10-15  8:35 ` [PATCH v3 1/2] hw: timer: Add Goldfish RTC device Anup Patel
2019-10-18 18:52   ` Palmer Dabbelt
2019-10-18 20:59   ` Alistair Francis
2019-10-19  4:21     ` Anup Patel
2019-10-18 21:15   ` Aleksandar Markovic
2019-10-19  4:33     ` Anup Patel
2019-10-19  6:21       ` Aleksandar Markovic
2019-10-15  8:35 ` [PATCH v3 2/2] riscv: virt: Use " Anup Patel
2019-10-18 18:52   ` Palmer Dabbelt
2019-10-18 21:00   ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).