hw: Split RTC devices from hw/timer/ to hw/rtc/
v2 cover hw: Split RTC devices from hw/timer/ to hw/rtc/
Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
- addressed review comments (described in patches 3 and 4)
- added R-b/A-b tags
Whole series now reviewed.
v1 blurb:
When working on timers, I found it confuse to have RTC devices mixed in the hw/timer/ directory.
We can see the models use slighly different APIs:
$ git grep '#include' hw/timer/|cut -d: -f3-|sort|uniq -c|egrep -v '^ 1 '|sort -rn
33 #include "qemu/osdep.h"
29 #include "hw/irq.h"
28 #include "qemu/module.h"
23 #include "migration/vmstate.h"
21 #include "hw/sysbus.h"
20 #include "qemu/timer.h"
20 #include "qemu/main-loop.h"
17 #include "qemu/log.h"
14 #include "hw/qdev-properties.h"
14 #include "hw/ptimer.h"
9 #include "trace.h"
7 #include "qapi/error.h"
5 #include "hw/hw.h"
3 #include "sysemu/runstate.h"
3 #include "qemu/error-report.h"
3 #include "hw/timer/i8254.h"
2 #include "qemu/bitops.h"
2 #include "hw/timer/i8254_internal.h"
2 #include "hw/registerfields.h"
2 #include "hw/core/cpu.h"
2 #include "hw/arm/omap.h"
2 #include "hw/arm/exynos4210.h" $ git grep '#include' hw/rtc/|cut -d: -f3-|sort|uniq -c|egrep -v '^ 1 '|sort -rn
11 #include "qemu/osdep.h"
10 #include "qemu/module.h"
9 #include "qemu-common.h"
8 #include "qemu/timer.h"
8 #include "migration/vmstate.h"
6 #include "qemu/bcd.h"
6 #include "hw/irq.h"
5 #include "sysemu/sysemu.h"
5 #include "qemu/log.h"
5 #include "hw/sysbus.h"
4 #include "trace.h"
4 #include "hw/qdev-properties.h"
3 #include "qemu/cutils.h"
3 #include "hw/i2c/i2c.h"
2 #include "sysemu/runstate.h"
2 #include "m48t59-internal.h"
2 #include "hw/rtc/m48t59.h"
2 #include "exec/address-spaces.h"Split the RTC-related files in the new hw/rtc/ directory.
Philippe Mathieu-Daudé (14):
hw/timer: Compile devices not target-dependent as common object
hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory hw/rtc/mc146818: Include mc146818rtc_regs.h a bit less hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include hw/rtc/aspeed_rtc: Remove unused includes
MAINTAINERS | 20 +++----
Makefile.objs | 1 +
hw/Kconfig | 1 +
hw/Makefile.objs | 1 +
hw/alpha/dp264.c | 2 +-
hw/arm/musca.c | 2 +-
hw/hppa/machine.c | 2 +-
hw/i386/acpi-build.c | 2 +-
hw/i386/pc.c | 2 +-
hw/i386/pc_q35.c | 2 +-
hw/mips/mips_fulong2e.c | 2 +-
hw/mips/mips_jazz.c | 2 +-
hw/mips/mips_malta.c | 2 +-
hw/mips/mips_r4k.c | 2 +-
hw/ppc/pnv.c | 2 +-
hw/ppc/ppc405_boards.c | 2 +-
hw/ppc/prep.c | 4 +-
hw/rtc/Kconfig | 23 ++++++++
hw/rtc/Makefile.objs | 13 +++++
hw/{timer => rtc}/aspeed_rtc.c | 2 +-
hw/{timer => rtc}/ds1338.c | 0
hw/{timer => rtc}/exynos4210_rtc.c | 0
hw/{timer => rtc}/m41t80.c | 0
hw/{timer => rtc}/m48t59-internal.h | 0
hw/{timer => rtc}/m48t59-isa.c | 4 +-
hw/{timer => rtc}/m48t59.c | 2 +-
hw/{timer => rtc}/mc146818rtc.c | 3 +-
hw/{timer => rtc}/pl031.c | 2 +-
hw/{timer => rtc}/sun4v-rtc.c | 2 +-
hw/rtc/trace-events | 19 +++++++
hw/{timer => rtc}/twl92230.c | 0
hw/{timer => rtc}/xlnx-zynqmp-rtc.c | 3 +-
hw/sparc/sun4m.c | 2 +-
hw/sparc64/niagara.c | 2 +-
hw/sparc64/sun4u.c | 2 +-
hw/timer/Kconfig | 24 ---------
hw/timer/Makefile.objs | 35 ++++--------
hw/timer/hpet.c | 3 +-
hw/timer/trace-events | 18 -------
include/hw/arm/aspeed_soc.h | 2 +-
include/hw/arm/xlnx-zynqmp.h | 2 +-
include/hw/{timer => rtc}/aspeed_rtc.h | 9 ++--
include/hw/rtc/m48t59.h | 57 ++++++++++++++++++++
include/hw/{timer => rtc}/mc146818rtc.h | 13 +++--
include/hw/{timer => rtc}/mc146818rtc_regs.h | 5 +-
include/hw/{timer => rtc}/pl031.h | 5 +-
include/hw/rtc/sun4v-rtc.h | 19 +++++++
include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h | 6 +--
include/hw/timer/m48t59.h | 32 -----------
include/hw/timer/sun4v-rtc.h | 1 -
tests/rtc-test.c | 2 +-
51 files changed, 208 insertions(+), 155 deletions(-)
create mode 100644 hw/rtc/Kconfig
create mode 100644 hw/rtc/Makefile.objs
rename hw/{timer => rtc}/aspeed_rtc.c (99%)
rename hw/{timer => rtc}/ds1338.c (100%)
rename hw/{timer => rtc}/exynos4210_rtc.c (100%)
rename hw/{timer => rtc}/m41t80.c (100%)
rename hw/{timer => rtc}/m48t59-internal.h (100%)
rename hw/{timer => rtc}/m48t59-isa.c (98%)
rename hw/{timer => rtc}/m48t59.c (99%)
rename hw/{timer => rtc}/mc146818rtc.c (99%)
rename hw/{timer => rtc}/pl031.c (99%)
rename hw/{timer => rtc}/sun4v-rtc.c (98%)
create mode 100644 hw/rtc/trace-events
rename hw/{timer => rtc}/twl92230.c (100%)
rename hw/{timer => rtc}/xlnx-zynqmp-rtc.c (99%)
rename include/hw/{timer => rtc}/aspeed_rtc.h (80%)
create mode 100644 include/hw/rtc/m48t59.h
rename include/hw/{timer => rtc}/mc146818rtc.h (63%)
rename include/hw/{timer => rtc}/mc146818rtc_regs.h (96%)
rename include/hw/{timer => rtc}/pl031.h (93%)
create mode 100644 include/hw/rtc/sun4v-rtc.h
rename include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h (95%)
delete mode 100644 include/hw/timer/m48t59.h
delete mode 100644 include/hw/timer/sun4v-rtc.hSignature · 1 line
2.20.1
PATCH v2 1/14 hw/timer: Compile devices not target-dependent as common object
All these devices do not contain any target-specific. While most of them are arch-specific, they are shared between different targets of the same arch family (ARM and AArch64, MIPS32/MIPS64, endianess, ...).
Put them into common-obj-y to compile them once for all targets.
--- hw/timer/Makefile.objs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
hw/timer/Makefile.objs +11 -11
@@ -25,20 +25,20 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o -obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o -obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o -obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o -obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o -obj-$(CONFIG_OMAP) += omap_gptimer.o -obj-$(CONFIG_OMAP) += omap_synctimer.o -obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o -obj-$(CONFIG_SH4) += sh_timer.o -obj-$(CONFIG_DIGIC) += digic-timer.o -obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o +common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o +common-obj-$(CONFIG_OMAP) += omap_gptimer.o +common-obj-$(CONFIG_OMAP) += omap_synctimer.o +common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o +common-obj-$(CONFIG_SH4) += sh_timer.o +common-obj-$(CONFIG_DIGIC) += digic-timer.o +common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o -obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o +common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o aspeed_rtc.o
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 01/14] hw/timer: Compile devices not target-dependent as common object
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 40 lines
All these devices do not contain any target-specific. While most of them are arch-specific, they are shared between different targets of the same arch family (ARM and AArch64, MIPS32/MIPS64, endianess, ...).
Put them into common-obj-y to compile them once for all targets.Reviewed-by Alistair Francis <[email protected]>Reviewed-by Thomas Huth <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/timer/Makefile.objs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)hw/timer/Makefile.objs +8
-10@@ -25,20 +25,20 @@ common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o -obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o -obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o -obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o -obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o -obj-$(CONFIG_OMAP) += omap_gptimer.o -obj-$(CONFIG_OMAP) += omap_synctimer.o -obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o -obj-$(CONFIG_SH4) += sh_timer.o -obj-$(CONFIG_DIGIC) += digic-timer.o -obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o +common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o +common-obj-$(CONFIG_OMAP) += omap_gptimer.o +common-obj-$(CONFIG_OMAP) += omap_synctimer.o +common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o +common-obj-$(CONFIG_SH4) += sh_timer.o
hw/timer/Makefile.objs common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o · line 44
Quoted 10 lines
hw/timer/Makefile.objs +3
-1+common-obj-$(CONFIG_DIGIC) += digic-timer.o +common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o -obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o +common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o aspeed_rtc.o
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 2/14 hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéThe PL031 is a Real Time Clock, not a timer. Move it under the hw/rtc/ subdirectory.
---
MAINTAINERS | 4 ++--
Makefile.objs | 1 +
hw/Kconfig | 1 +
hw/Makefile.objs | 1 +
hw/arm/musca.c | 2 +-
hw/rtc/Kconfig | 2 ++
hw/rtc/Makefile.objs | 1 +
hw/{timer => rtc}/pl031.c | 2 +-
hw/rtc/trace-events | 8 ++++++++
hw/timer/Kconfig | 3 ---
hw/timer/Makefile.objs | 1 -
hw/timer/trace-events | 7 -------
include/hw/{timer => rtc}/pl031.h | 5 +++--
13 files changed, 21 insertions(+), 17 deletions(-)
create mode 100644 hw/rtc/Kconfig
create mode 100644 hw/rtc/Makefile.objs
rename hw/{timer => rtc}/pl031.c (99%)
create mode 100644 hw/rtc/trace-events
rename include/hw/{timer => rtc}/pl031.h (93%)MAINTAINERS +2 -2
@@ -495,8 +495,8 @@ F: hw/intc/pl190.c F: hw/sd/pl181.c F: hw/ssi/pl022.c F: include/hw/ssi/pl022.h -F: hw/timer/pl031.c -F: include/hw/timer/pl031.h +F: hw/rtc/pl031.c +F: include/hw/rtc/pl031.h F: include/hw/arm/primecell.h F: hw/timer/cmsdk-apb-timer.c F: include/hw/timer/cmsdk-apb-timer.h
Makefile.objs +1 -0
@@ -173,6 +173,7 @@ trace-events-subdirs += hw/pci-host trace-events-subdirs += hw/ppc trace-events-subdirs += hw/rdma trace-events-subdirs += hw/rdma/vmw +trace-events-subdirs += hw/rtc trace-events-subdirs += hw/s390x trace-events-subdirs += hw/scsi trace-events-subdirs += hw/sd
hw/Kconfig +1 -0
@@ -27,6 +27,7 @@ source pci-host/Kconfig source pcmcia/Kconfig source pci/Kconfig source rdma/Kconfig +source rtc/Kconfig source scsi/Kconfig source sd/Kconfig source semihosting/Kconfig
hw/Makefile.objs +1 -0
@@ -26,6 +26,7 @@ devices-dirs-y += nvram/ devices-dirs-y += pci/ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ devices-dirs-y += pcmcia/ +devices-dirs-y += rtc/ devices-dirs-$(CONFIG_SCSI) += scsi/ devices-dirs-y += sd/ devices-dirs-y += ssi/
hw/arm/musca.c +1 -1
@@ -32,7 +32,7 @@#include "hw/misc/tz-mpc.h" #include "hw/misc/tz-ppc.h" #include "hw/misc/unimp.h" -#include "hw/timer/pl031.h" +#include "hw/rtc/pl031.h" #define MUSCA_NUMIRQ_MAX 96#define MUSCA_PPC_MAX 3
hw/rtc/Kconfig new file +2 -0
@@ -0,0 +1,2 @@ +config PL031 + bool
hw/rtc/Makefile.objs new file +1 -0
@@ -0,0 +1 @@ +common-obj-$(CONFIG_PL031) += pl031.o
hw/rtc/pl031.c renamed from hw/timer/pl031.c +1 -1
@@ -13,7 +13,7 @@#include "qemu/osdep.h" #include "qemu-common.h" -#include "hw/timer/pl031.h" +#include "hw/rtc/pl031.h" #include "migration/vmstate.h" #include "hw/irq.h" #include "hw/qdev-properties.h"
hw/rtc/trace-events new file +8 -0
@@ -0,0 +1,8 @@ +# See docs/devel/tracing.txt for syntax documentation. + +# pl031.c +pl031_irq_state(int level) "irq state %d" +pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" +pl031_write(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" +pl031_alarm_raised(void) "alarm raised" +pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks"
hw/timer/Kconfig +0 -3
@@ -27,9 +27,6 @@ config M41T80 config M48T59 bool -config PL031 - bool - config TWL92230 bool depends on I2C
hw/timer/Makefile.objs +0 -1
@@ -11,7 +11,6 @@ common-obj-$(CONFIG_M48T59) += m48t59.o ifeq ($(CONFIG_ISA_BUS),y) common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif -common-obj-$(CONFIG_PL031) += pl031.o common-obj-$(CONFIG_PUV3) += puv3_ost.o common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XILINX) += xilinx_timer.o
hw/timer/trace-events +0 -7
@@ -80,10 +80,3 @@ xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec # nrf51_timer.c nrf51_timer_read(uint64_t addr, uint32_t value, unsigned size) "read addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" nrf51_timer_write(uint64_t addr, uint32_t value, unsigned size) "write addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" - -# pl031.c -pl031_irq_state(int level) "irq state %d" -pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" -pl031_write(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" -pl031_alarm_raised(void) "alarm raised" -pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks"
include/hw/rtc/pl031.h renamed from include/hw/timer/pl031.h +3 -2
@@ -11,10 +11,11 @@* GNU GPL, version 2 or (at your option) any later version. */ -#ifndef HW_TIMER_PL031_H -#define HW_TIMER_PL031_H +#ifndef HW_RTC_PL031_H +#define HW_RTC_PL031_H #include "hw/sysbus.h" +#include "qemu/timer.h" #define TYPE_PL031 "pl031"#define PL031 (obj) OBJECT_CHECK(PL031State, (obj), TYPE_PL031)
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 02/14] hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 188 lines
The PL031 is a Real Time Clock, not a timer. Move it under the hw/rtc/ subdirectory.
Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 4 ++-- Makefile.objs | 1 + hw/Kconfig | 1 + hw/Makefile.objs | 1 + hw/arm/musca.c | 2 +- hw/rtc/Kconfig | 2 ++ hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/pl031.c | 2 +- hw/rtc/trace-events | 8 ++++++++ hw/timer/Kconfig | 3 --- hw/timer/Makefile.objs | 1 - hw/timer/trace-events | 7 ------- include/hw/{timer => rtc}/pl031.h | 5 +++-- 13 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 hw/rtc/Kconfig create mode 100644 hw/rtc/Makefile.objs rename hw/{timer => rtc}/pl031.c (99%) create mode 100644 hw/rtc/trace-events rename include/hw/{timer => rtc}/pl031.h (93%)MAINTAINERS +2
-2@@ -495,8 +495,8 @@ F: hw/intc/pl190.c F: hw/sd/pl181.c F: hw/ssi/pl022.c F: include/hw/ssi/pl022.h -F: hw/timer/pl031.c -F: include/hw/timer/pl031.h +F: hw/rtc/pl031.c +F: include/hw/rtc/pl031.h F: include/hw/arm/primecell.h F: hw/timer/cmsdk-apb-timer.c F: include/hw/timer/cmsdk-apb-timer.hMakefile.objs +1
-0@@ -173,6 +173,7 @@ trace-events-subdirs += hw/pci-host trace-events-subdirs += hw/ppc trace-events-subdirs += hw/rdma trace-events-subdirs += hw/rdma/vmw +trace-events-subdirs += hw/rtc trace-events-subdirs += hw/s390x trace-events-subdirs += hw/scsi trace-events-subdirs += hw/sdhw/Kconfig +1
-0@@ -27,6 +27,7 @@ source pci-host/Kconfig source pcmcia/Kconfig source pci/Kconfig source rdma/Kconfig +source rtc/Kconfig source scsi/Kconfig source sd/Kconfig source semihosting/Kconfighw/Makefile.objs +1
-0@@ -26,6 +26,7 @@ devices-dirs-y += nvram/ devices-dirs-y += pci/ devices-dirs-$(CONFIG_PCI) += pci-bridge/ pci-host/ devices-dirs-y += pcmcia/ +devices-dirs-y += rtc/ devices-dirs-$(CONFIG_SCSI) += scsi/ devices-dirs-y += sd/ devices-dirs-y += ssi/hw/arm/musca.c +1
-1@@ -32,7 +32,7 @@#include "hw/misc/tz-mpc.h" #include "hw/misc/tz-ppc.h" #include "hw/misc/unimp.h" -#include "hw/timer/pl031.h" +#include "hw/rtc/pl031.h" #define MUSCA_NUMIRQ_MAX 96#define MUSCA_PPC_MAX 3hw/rtc/Kconfig new file +2
-0@@ -0,0 +1,2 @@ +config PL031 + boolhw/rtc/Makefile.objs new file +1
-0@@ -0,0 +1 @@ +common-obj-$(CONFIG_PL031) += pl031.ohw/rtc/pl031.c renamed from hw/timer/pl031.c +1
-1@@ -13,7 +13,7 @@#include "qemu/osdep.h" #include "qemu-common.h" -#include "hw/timer/pl031.h" +#include "hw/rtc/pl031.h" #include "migration/vmstate.h" #include "hw/irq.h" #include "hw/qdev-properties.h" hw/rtc/trace-events new file +8
-0@@ -0,0 +1,8 @@ +# See docs/devel/tracing.txt for syntax documentation. + +# pl031.c +pl031_irq_state(int level) "irq state %d" +pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" +pl031_write(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" +pl031_alarm_raised(void) "alarm raised" +pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks"hw/timer/Kconfig +0
-3@@ -27,9 +27,6 @@ config M41T80 config M48T59 bool -config PL031 - bool - config TWL92230 bool depends on I2Chw/timer/Makefile.objs +0
-1@@ -11,7 +11,6 @@ common-obj-$(CONFIG_M48T59) += m48t59.o ifeq ($(CONFIG_ISA_BUS),y) common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif -common-obj-$(CONFIG_PL031) += pl031.o common-obj-$(CONFIG_PUV3) += puv3_ost.o common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XILINX) += xilinx_timer.ohw/timer/trace-events +0
-7@@ -80,10 +80,3 @@ xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec # nrf51_timer.c nrf51_timer_read(uint64_t addr, uint32_t value, unsigned size) "read addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" nrf51_timer_write(uint64_t addr, uint32_t value, unsigned size) "write addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" - -# pl031.c -pl031_irq_state(int level) "irq state %d" -pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" -pl031_write(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" -pl031_alarm_raised(void) "alarm raised" -pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks"include/hw/rtc/pl031.h renamed from include/hw/timer/pl031.h +0
-0@@ -11,10 +11,11 @@* GNU GPL, version 2 or (at your option) any later version. */
include/hw/rtc/pl031.h line 21
Quoted 10 lines
include/hw/rtc/pl031.h renamed from include/hw/timer/pl031.h +3
-2-#ifndef HW_TIMER_PL031_H -#define HW_TIMER_PL031_H +#ifndef HW_RTC_PL031_H +#define HW_RTC_PL031_H #include "hw/sysbus.h" +#include "qemu/timer.h" #define TYPE_PL031 "pl031"#define PL031 (obj) OBJECT_CHECK(PL031State, (obj), TYPE_PL031)
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 3/14 hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéThe MC146818 is a Real Time Clock, not a timer. Move it under the hw/rtc/ subdirectory.
Use copyright statement from 80cabfad163 for "hw/rtc/mc146818rtc.h".
---
v2: Use SPDX identifier (thuth)
---
MAINTAINERS | 4 ++--
hw/alpha/dp264.c | 2 +-
hw/hppa/machine.c | 2 +-
hw/i386/acpi-build.c | 2 +-
hw/i386/pc.c | 2 +-
hw/i386/pc_q35.c | 2 +-
hw/mips/mips_fulong2e.c | 2 +-
hw/mips/mips_jazz.c | 2 +-
hw/mips/mips_malta.c | 2 +-
hw/mips/mips_r4k.c | 2 +-
hw/ppc/pnv.c | 2 +-
hw/ppc/prep.c | 2 +-
hw/rtc/Kconfig | 3 +++
hw/rtc/Makefile.objs | 1 +
hw/{timer => rtc}/mc146818rtc.c | 2 +-
hw/timer/Kconfig | 3 ---
hw/timer/Makefile.objs | 2 --
hw/timer/hpet.c | 2 +-
include/hw/{timer => rtc}/mc146818rtc.h | 14 +++++++++++---
include/hw/{timer => rtc}/mc146818rtc_regs.h | 5 +++--
tests/rtc-test.c | 2 +-
21 files changed, 34 insertions(+), 26 deletions(-)
rename hw/{timer => rtc}/mc146818rtc.c (99%)
rename include/hw/{timer => rtc}/mc146818rtc.h (58%)
rename include/hw/{timer => rtc}/mc146818rtc_regs.h (96%)MAINTAINERS +2 -2
@@ -1263,7 +1263,7 @@ F: hw/misc/debugexit.c F: hw/misc/pc-testdev.c F: hw/timer/hpet* F: hw/timer/i8254* -F: hw/timer/mc146818rtc* +F: hw/rtc/mc146818rtc* F: hw/watchdog/wdt_ib700.c F: hw/watchdog/wdt_i6300esb.c F: include/hw/display/vga.h
@@ -1275,7 +1275,7 @@ F: include/hw/isa/i8259_internal.h F: include/hw/isa/superio.h F: include/hw/timer/hpet.h F: include/hw/timer/i8254* -F: include/hw/timer/mc146818rtc* +F: include/hw/rtc/mc146818rtc* Machine core M: Eduardo Habkost <[email protected]>
hw/alpha/dp264.c +1 -1
@@ -14,7 +14,7 @@#include "alpha_sys.h" #include "qemu/error-report.h" #include "sysemu/sysemu.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/ide.h" #include "hw/timer/i8254.h" #include "hw/isa/superio.h"
hw/hppa/machine.c +1 -1
@@ -12,7 +12,7 @@#include "qemu/error-report.h" #include "sysemu/reset.h" #include "sysemu/sysemu.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/ide.h" #include "hw/timer/i8254.h" #include "hw/char/serial.h"
hw/i386/acpi-build.c +1 -1
@@ -45,7 +45,7 @@#include "hw/acpi/vmgenid.h" #include "hw/boards.h" #include "sysemu/tpm_backend.h" -#include "hw/timer/mc146818rtc_regs.h" +#include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "hw/mem/memory-device.h" #include "sysemu/numa.h"
hw/i386/pc.c +1 -1
@@ -42,7 +42,7 @@#include "elf.h" #include "migration/vmstate.h" #include "multiboot.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/dma/i8257.h" #include "hw/timer/i8254.h" #include "hw/input/i8042.h"
hw/i386/pc_q35.c +1 -1
@@ -33,7 +33,7 @@#include "hw/loader.h" #include "sysemu/arch_init.h" #include "hw/i2c/smbus_eeprom.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/xen/xen.h" #include "sysemu/kvm.h" #include "kvm_i386.h"
hw/mips/mips_fulong2e.c +1 -1
@@ -39,7 +39,7 @@#include "hw/ide.h" #include "elf.h" #include "hw/isa/vt82c686.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/timer/i8254.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h"
hw/mips/mips_jazz.c +1 -1
@@ -39,7 +39,7 @@#include "hw/scsi/esp.h" #include "hw/mips/bios.h" #include "hw/loader.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/timer/i8254.h" #include "hw/display/vga.h" #include "hw/audio/pcspk.h"
hw/mips/mips_malta.c +1 -1
@@ -45,7 +45,7 @@#include "hw/irq.h" #include "hw/loader.h" #include "elf.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/timer/i8254.h" #include "exec/address-spaces.h" #include "hw/sysbus.h" /* SysBusDevice */
hw/mips/mips_r4k.c +1 -1
@@ -28,7 +28,7 @@#include "hw/ide.h" #include "hw/loader.h" #include "elf.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/input/i8042.h" #include "hw/timer/i8254.h" #include "exec/address-spaces.h"
hw/ppc/pnv.c +1 -1
@@ -48,7 +48,7 @@#include "hw/isa/isa.h" #include "hw/boards.h" #include "hw/char/serial.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include <libfdt.h>
hw/ppc/prep.c +1 -1
@@ -40,7 +40,7 @@#include "hw/ide.h" #include "hw/irq.h" #include "hw/loader.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/isa/pc87312.h" #include "hw/net/ne2000-isa.h" #include "sysemu/arch_init.h"
hw/rtc/Kconfig +3 -0
@@ -1,2 +1,5 @@ config PL031 bool + +config MC146818RTC + bool
hw/rtc/Makefile.objs +1 -0
@@ -1 +1,2 @@ common-obj-$(CONFIG_PL031) += pl031.o +obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
hw/rtc/mc146818rtc.c renamed from hw/timer/mc146818rtc.c +1 -1
@@ -34,7 +34,7 @@#include "sysemu/replay.h" #include "sysemu/reset.h" #include "sysemu/runstate.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "migration/vmstate.h" #include "qapi/error.h" #include "qapi/qapi-commands-misc-target.h"
hw/timer/Kconfig +0 -3
@@ -35,9 +35,6 @@ config ALTERA_TIMER bool select PTIMER -config MC146818RTC - bool - config ALLWINNER_A10_PIT bool select PTIMER
hw/timer/Makefile.objs +0 -2
@@ -35,8 +35,6 @@ common-obj-$(CONFIG_SH4) += sh_timer.o common-obj-$(CONFIG_DIGIC) += digic-timer.o common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o -obj-$(CONFIG_MC146818RTC) += mc146818rtc.o - common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o
hw/timer/hpet.c +1 -1
@@ -33,7 +33,7 @@#include "qemu/timer.h" #include "hw/timer/hpet.h" #include "hw/sysbus.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "migration/vmstate.h" #include "hw/timer/i8254.h"
include/hw/rtc/mc146818rtc.h renamed from include/hw/timer/mc146818rtc.h +11 -3
@@ -1,8 +1,16 @@ -#ifndef MC146818RTC_H -#define MC146818RTC_H +/* +* QEMU MC146818 RTC emulation +* +* Copyright (c) 2003-2004 Fabrice Bellard +* +* SPDX-License-Identifier: MIT +*/ + +#ifndef HW_RTC_MC146818RTC_H +#define HW_RTC_MC146818RTC_H #include "hw/isa/isa.h" -#include "hw/timer/mc146818rtc_regs.h" +#include "hw/rtc/mc146818rtc_regs.h" #define TYPE_MC146818_RTC "mc146818rtc"
include/hw/rtc/mc146818rtc_regs.h renamed from include/hw/timer/mc146818rtc_regs.h +3 -2
@@ -22,10 +22,11 @@* THE SOFTWARE. */ -#ifndef MC146818RTC_REGS_H -#define MC146818RTC_REGS_H +#ifndef HW_RTC_MC146818RTC_REGS_H +#define HW_RTC_MC146818RTC_REGS_H #include "qemu/timer.h" +#include "qemu/host-utils.h" #define RTC_ISA_IRQ 8
tests/rtc-test.c +1 -1
@@ -15,7 +15,7 @@#include "libqtest-single.h" #include "qemu/timer.h" -#include "hw/timer/mc146818rtc_regs.h" +#include "hw/rtc/mc146818rtc_regs.h" #define UIP_HOLD_LENGTH (8 * NANOSECONDS_PER_SECOND / 32768)
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 03/14] hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 329 lines
The MC146818 is a Real Time Clock, not a timer. Move it under the hw/rtc/ subdirectory.
Use copyright statement from
80cabfad163for "hw/rtc/mc146818rtc.h".Reviewed-by Alistair Francis <[email protected]>Acked-by David Gibson <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: Use SPDX identifier (thuth)--- MAINTAINERS | 4 ++-- hw/alpha/dp264.c | 2 +- hw/hppa/machine.c | 2 +- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 2 +- hw/i386/pc_q35.c | 2 +- hw/mips/mips_fulong2e.c | 2 +- hw/mips/mips_jazz.c | 2 +- hw/mips/mips_malta.c | 2 +- hw/mips/mips_r4k.c | 2 +- hw/ppc/pnv.c | 2 +- hw/ppc/prep.c | 2 +- hw/rtc/Kconfig | 3 +++ hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/mc146818rtc.c | 2 +- hw/timer/Kconfig | 3 --- hw/timer/Makefile.objs | 2 -- hw/timer/hpet.c | 2 +- include/hw/{timer => rtc}/mc146818rtc.h | 14 +++++++++++--- include/hw/{timer => rtc}/mc146818rtc_regs.h | 5 +++-- tests/rtc-test.c | 2 +- 21 files changed, 34 insertions(+), 26 deletions(-) rename hw/{timer => rtc}/mc146818rtc.c (99%) rename include/hw/{timer => rtc}/mc146818rtc.h (58%) rename include/hw/{timer => rtc}/mc146818rtc_regs.h (96%)MAINTAINERS +2
-2@@ -1263,7 +1263,7 @@ F: hw/misc/debugexit.c F: hw/misc/pc-testdev.c F: hw/timer/hpet* F: hw/timer/i8254* -F: hw/timer/mc146818rtc* +F: hw/rtc/mc146818rtc* F: hw/watchdog/wdt_ib700.c F: hw/watchdog/wdt_i6300esb.c F: include/hw/display/vga.h@@ -1275,7 +1275,7 @@ F: include/hw/isa/i8259_internal.h F: include/hw/isa/superio.h F: include/hw/timer/hpet.h F: include/hw/timer/i8254* -F: include/hw/timer/mc146818rtc* +F: include/hw/rtc/mc146818rtc* Machine core M: Eduardo Habkost <[email protected]>hw/alpha/dp264.c +1
-1@@ -14,7 +14,7 @@#include "alpha_sys.h" #include "qemu/error-report.h" #include "sysemu/sysemu.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/ide.h" #include "hw/timer/i8254.h" #include "hw/isa/superio.h" hw/hppa/machine.c +1
-1@@ -12,7 +12,7 @@#include "qemu/error-report.h" #include "sysemu/reset.h" #include "sysemu/sysemu.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/ide.h" #include "hw/timer/i8254.h" #include "hw/char/serial.h" hw/i386/acpi-build.c +1
-1@@ -45,7 +45,7 @@#include "hw/acpi/vmgenid.h" #include "hw/boards.h" #include "sysemu/tpm_backend.h" -#include "hw/timer/mc146818rtc_regs.h" +#include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "hw/mem/memory-device.h" #include "sysemu/numa.h" hw/i386/pc.c +1
-1@@ -42,7 +42,7 @@#include "elf.h" #include "migration/vmstate.h" #include "multiboot.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/dma/i8257.h" #include "hw/timer/i8254.h" #include "hw/input/i8042.h" hw/i386/pc_q35.c +1
-1@@ -33,7 +33,7 @@#include "hw/loader.h" #include "sysemu/arch_init.h" #include "hw/i2c/smbus_eeprom.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/xen/xen.h" #include "sysemu/kvm.h" #include "kvm_i386.h" hw/mips/mips_fulong2e.c +1
-1@@ -39,7 +39,7 @@#include "hw/ide.h" #include "elf.h" #include "hw/isa/vt82c686.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/timer/i8254.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h" hw/mips/mips_jazz.c +1
-1@@ -39,7 +39,7 @@#include "hw/scsi/esp.h" #include "hw/mips/bios.h" #include "hw/loader.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/timer/i8254.h" #include "hw/display/vga.h" #include "hw/audio/pcspk.h" hw/mips/mips_malta.c +1
-1@@ -45,7 +45,7 @@#include "hw/irq.h" #include "hw/loader.h" #include "elf.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/timer/i8254.h" #include "exec/address-spaces.h" #include "hw/sysbus.h" /* SysBusDevice */ hw/mips/mips_r4k.c +1
-1@@ -28,7 +28,7 @@#include "hw/ide.h" #include "hw/loader.h" #include "elf.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/input/i8042.h" #include "hw/timer/i8254.h" #include "exec/address-spaces.h" hw/ppc/pnv.c +1
-1@@ -48,7 +48,7 @@#include "hw/isa/isa.h" #include "hw/boards.h" #include "hw/char/serial.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include <libfdt.h> hw/ppc/prep.c +1
-1@@ -40,7 +40,7 @@#include "hw/ide.h" #include "hw/irq.h" #include "hw/loader.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "hw/isa/pc87312.h" #include "hw/net/ne2000-isa.h" #include "sysemu/arch_init.h" hw/rtc/Kconfig +3
-0@@ -1,2 +1,5 @@ config PL031 bool + +config MC146818RTC + boolhw/rtc/Makefile.objs +1
-0@@ -1 +1,2 @@ common-obj-$(CONFIG_PL031) += pl031.o +obj-$(CONFIG_MC146818RTC) += mc146818rtc.ohw/rtc/mc146818rtc.c renamed from hw/timer/mc146818rtc.c +1
-1@@ -34,7 +34,7 @@#include "sysemu/replay.h" #include "sysemu/reset.h" #include "sysemu/runstate.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "migration/vmstate.h" #include "qapi/error.h" #include "qapi/qapi-commands-misc-target.h" hw/timer/Kconfig +0
-3@@ -35,9 +35,6 @@ config ALTERA_TIMER bool select PTIMER -config MC146818RTC - bool - config ALLWINNER_A10_PIT bool select PTIMERhw/timer/Makefile.objs +0
-2@@ -35,8 +35,6 @@ common-obj-$(CONFIG_SH4) += sh_timer.o common-obj-$(CONFIG_DIGIC) += digic-timer.o common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o -obj-$(CONFIG_MC146818RTC) += mc146818rtc.o - common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.ohw/timer/hpet.c +1
-1@@ -33,7 +33,7 @@#include "qemu/timer.h" #include "hw/timer/hpet.h" #include "hw/sysbus.h" -#include "hw/timer/mc146818rtc.h" +#include "hw/rtc/mc146818rtc.h" #include "migration/vmstate.h" #include "hw/timer/i8254.h" include/hw/rtc/mc146818rtc.h renamed from include/hw/timer/mc146818rtc.h +11
-3@@ -1,8 +1,16 @@ -#ifndef MC146818RTC_H -#define MC146818RTC_H +/* +* QEMU MC146818 RTC emulation +* +* Copyright (c) 2003-2004 Fabrice Bellard +* +* SPDX-License-Identifier: MIT +*/ + +#ifndef HW_RTC_MC146818RTC_H +#define HW_RTC_MC146818RTC_H #include "hw/isa/isa.h" -#include "hw/timer/mc146818rtc_regs.h" +#include "hw/rtc/mc146818rtc_regs.h" #define TYPE_MC146818_RTC "mc146818rtc"include/hw/rtc/mc146818rtc_regs.h renamed from include/hw/timer/mc146818rtc_regs.h +3
-2@@ -22,10 +22,11 @@* THE SOFTWARE. */ -#ifndef MC146818RTC_REGS_H -#define MC146818RTC_REGS_H +#ifndef HW_RTC_MC146818RTC_REGS_H +#define HW_RTC_MC146818RTC_REGS_H #include "qemu/timer.h" +#include "qemu/host-utils.h" #define RTC_ISA_IRQ 8tests/rtc-test.c +0
-0
tests/rtc-test.c line 21
Quoted 8 lines
tests/rtc-test.c +1
-1@@ -15,7 +15,7 @@#include "libqtest-single.h" #include "qemu/timer.h" -#include "hw/timer/mc146818rtc_regs.h" +#include "hw/rtc/mc146818rtc_regs.h" #define UIP_HOLD_LENGTH (8 * NANOSECONDS_PER_SECOND / 32768)
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 4/14 hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéThe M48T59 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
---
v2: delete include/hw/timer/m48t59.h (dgibson)
---
MAINTAINERS | 4 +-
hw/ppc/ppc405_boards.c | 2 +-
hw/ppc/prep.c | 2 +-
hw/rtc/Kconfig | 3 ++
hw/rtc/Makefile.objs | 4 ++
hw/{timer => rtc}/m48t59-internal.h | 0
hw/{timer => rtc}/m48t59-isa.c | 4 +-
hw/{timer => rtc}/m48t59.c | 2 +-
hw/sparc/sun4m.c | 2 +-
hw/sparc64/sun4u.c | 2 +-
hw/timer/Kconfig | 3 --
hw/timer/Makefile.objs | 4 --
include/hw/rtc/m48t59.h | 57 +++++++++++++++++++++++++++++
include/hw/timer/m48t59.h | 32 ----------------
14 files changed, 73 insertions(+), 48 deletions(-)
rename hw/{timer => rtc}/m48t59-internal.h (100%)
rename hw/{timer => rtc}/m48t59-isa.c (98%)
rename hw/{timer => rtc}/m48t59.c (99%)
create mode 100644 include/hw/rtc/m48t59.h
delete mode 100644 include/hw/timer/m48t59.hMAINTAINERS +2 -2
@@ -1064,9 +1064,9 @@ F: hw/pci-host/prep.[hc] F: hw/isa/i82378.c F: hw/isa/pc87312.c F: hw/dma/i82374.c -F: hw/timer/m48t59-isa.c +F: hw/rtc/m48t59-isa.c F: include/hw/isa/pc87312.h -F: include/hw/timer/m48t59.h +F: include/hw/rtc/m48t59.h F: pc-bios/ppc_rom.bin sPAPR
hw/ppc/ppc405_boards.c +1 -1
@@ -29,7 +29,7 @@#include "cpu.h" #include "hw/ppc/ppc.h" #include "ppc405.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "hw/block/flash.h" #include "sysemu/sysemu.h" #include "sysemu/qtest.h"
hw/ppc/prep.c +1 -1
@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "hw/char/serial.h" #include "hw/block/fdc.h" #include "net/net.h"
hw/rtc/Kconfig +3 -0
@@ -1,3 +1,6 @@ +config M48T59 + bool + config PL031 bool
hw/rtc/Makefile.objs +4 -0
@@ -1,2 +1,6 @@ +common-obj-$(CONFIG_M48T59) += m48t59.o +ifeq ($(CONFIG_ISA_BUS),y) +common-obj-$(CONFIG_M48T59) += m48t59-isa.o +endif common-obj-$(CONFIG_PL031) += pl031.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o
hw/rtc/m48t59-internal.h renamed from hw/timer/m48t59-internal.h +0 -0
hw/rtc/m48t59-isa.c renamed from hw/timer/m48t59-isa.c +2 -2
@@ -1,5 +1,5 @@/* -* QEMU M48T59 and M48T08 NVRAM emulation (ISA bus interface +* QEMU M48T59 and M48T08 NVRAM emulation (ISA bus interface) * * Copyright (c) 2003-2005, 2007 Jocelyn Mayer * Copyright (c) 2013 Hervé Poussineau
@@ -26,7 +26,7 @@#include "qemu/osdep.h" #include "hw/isa/isa.h" #include "hw/qdev-properties.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "m48t59-internal.h" #include "qemu/module.h"
hw/rtc/m48t59.c renamed from hw/timer/m48t59.c +1 -1
@@ -27,7 +27,7 @@#include "qemu-common.h" #include "hw/irq.h" #include "hw/qdev-properties.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "qemu/timer.h" #include "sysemu/runstate.h" #include "sysemu/sysemu.h"
hw/sparc/sun4m.c +1 -1
@@ -31,7 +31,7 @@#include "qemu/error-report.h" #include "qemu/timer.h" #include "hw/sparc/sun4m_iommu.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "migration/vmstate.h" #include "hw/sparc/sparc32_dma.h" #include "hw/block/fdc.h"
hw/sparc64/sun4u.c +1 -1
@@ -36,7 +36,7 @@#include "hw/pci-host/sabre.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "migration/vmstate.h" #include "hw/input/i8042.h" #include "hw/block/fdc.h"
hw/timer/Kconfig +0 -3
@@ -24,9 +24,6 @@ config M41T80 bool depends on I2C -config M48T59 - bool - config TWL92230 bool depends on I2C
hw/timer/Makefile.objs +0 -4
@@ -7,10 +7,6 @@ common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o common-obj-$(CONFIG_M41T80) += m41t80.o -common-obj-$(CONFIG_M48T59) += m48t59.o -ifeq ($(CONFIG_ISA_BUS),y) -common-obj-$(CONFIG_M48T59) += m48t59-isa.o -endif common-obj-$(CONFIG_PUV3) += puv3_ost.o common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XILINX) += xilinx_timer.o
include/hw/rtc/m48t59.h new file +57 -0
57 lines not on this page · raw message
include/hw/timer/m48t59.h deleted +0 -32
@@ -1,32 +0,0 @@ -#ifndef HW_M48T59_H -#define HW_M48T59_H - -#include "exec/hwaddr.h" -#include "qom/object.h" - -#define TYPE_NVRAM "nvram" - -#define NVRAM_CLASS (klass) \ - OBJECT_CLASS_CHECK(NvramClass, (klass), TYPE_NVRAM) -#define NVRAM_GET_CLASS (obj) \ - OBJECT_GET_CLASS(NvramClass, (obj), TYPE_NVRAM) -#define NVRAM (obj) \ - INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM) - -typedef struct Nvram Nvram ; - -typedef struct NvramClass { -InterfaceClass parent; - -uint32_t (*read)(Nvram *obj,uint32_t addr); -void (*write)(Nvram *obj,uint32_t addr,uint32_t val); -void (*toggle_lock)(Nvram *obj,int lock); -}NvramClass ; - -Nvram *m48t59_init_isa (ISABus *bus,uint32_t io_base,uint16_t size, -int base_year,int type); -Nvram *m48t59_init (qemu_irq IRQ ,hwaddr mem_base, -uint32_t io_base,uint16_t size,int base_year, -int type); - -#endif /* HW_M48T59_H */
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 04/14] hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 283 lines
The M48T59 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: deleteinclude/hw/timer/m48t59.h(dgibson)--- MAINTAINERS | 4 +- hw/ppc/ppc405_boards.c | 2 +- hw/ppc/prep.c | 2 +- hw/rtc/Kconfig | 3 ++ hw/rtc/Makefile.objs | 4 ++ hw/{timer => rtc}/m48t59-internal.h | 0 hw/{timer => rtc}/m48t59-isa.c | 4 +- hw/{timer => rtc}/m48t59.c | 2 +- hw/sparc/sun4m.c | 2 +- hw/sparc64/sun4u.c | 2 +- hw/timer/Kconfig | 3 -- hw/timer/Makefile.objs | 4 -- include/hw/rtc/m48t59.h | 57 +++++++++++++++++++++++++++++ include/hw/timer/m48t59.h | 32 ---------------- 14 files changed, 73 insertions(+), 48 deletions(-) rename hw/{timer => rtc}/m48t59-internal.h (100%) rename hw/{timer => rtc}/m48t59-isa.c (98%) rename hw/{timer => rtc}/m48t59.c (99%) create mode 100644 include/hw/rtc/m48t59.h delete mode 100644 include/hw/timer/m48t59.hMAINTAINERS +2
-2@@ -1064,9 +1064,9 @@ F: hw/pci-host/prep.[hc] F: hw/isa/i82378.c F: hw/isa/pc87312.c F: hw/dma/i82374.c -F: hw/timer/m48t59-isa.c +F: hw/rtc/m48t59-isa.c F: include/hw/isa/pc87312.h -F: include/hw/timer/m48t59.h +F: include/hw/rtc/m48t59.h F: pc-bios/ppc_rom.bin sPAPRhw/ppc/ppc405_boards.c +1
-1@@ -29,7 +29,7 @@#include "cpu.h" #include "hw/ppc/ppc.h" #include "ppc405.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "hw/block/flash.h" #include "sysemu/sysemu.h" #include "sysemu/qtest.h" hw/ppc/prep.c +1
-1@@ -25,7 +25,7 @@#include "qemu/osdep.h" #include "cpu.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "hw/char/serial.h" #include "hw/block/fdc.h" #include "net/net.h" hw/rtc/Kconfig +3
-0@@ -1,3 +1,6 @@ +config M48T59 + bool + config PL031 boolhw/rtc/Makefile.objs +4
-0@@ -1,2 +1,6 @@ +common-obj-$(CONFIG_M48T59) += m48t59.o +ifeq ($(CONFIG_ISA_BUS),y) +common-obj-$(CONFIG_M48T59) += m48t59-isa.o +endif common-obj-$(CONFIG_PL031) += pl031.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.ohw/rtc/m48t59-internal.h renamed from hw/timer/m48t59-internal.h +0
-0hw/rtc/m48t59-isa.c renamed from hw/timer/m48t59-isa.c +2
-2@@ -1,5 +1,5 @@/* -* QEMU M48T59 and M48T08 NVRAM emulation (ISA bus interface +* QEMU M48T59 and M48T08 NVRAM emulation (ISA bus interface) * * Copyright (c) 2003-2005, 2007 Jocelyn Mayer * Copyright (c) 2013 Hervé Poussineau @@ -26,7 +26,7 @@#include "qemu/osdep.h" #include "hw/isa/isa.h" #include "hw/qdev-properties.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "m48t59-internal.h" #include "qemu/module.h" hw/rtc/m48t59.c renamed from hw/timer/m48t59.c +1
-1@@ -27,7 +27,7 @@#include "qemu-common.h" #include "hw/irq.h" #include "hw/qdev-properties.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "qemu/timer.h" #include "sysemu/runstate.h" #include "sysemu/sysemu.h" hw/sparc/sun4m.c +1
-1@@ -31,7 +31,7 @@#include "qemu/error-report.h" #include "qemu/timer.h" #include "hw/sparc/sun4m_iommu.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "migration/vmstate.h" #include "hw/sparc/sparc32_dma.h" #include "hw/block/fdc.h" hw/sparc64/sun4u.c +1
-1@@ -36,7 +36,7 @@#include "hw/pci-host/sabre.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" -#include "hw/timer/m48t59.h" +#include "hw/rtc/m48t59.h" #include "migration/vmstate.h" #include "hw/input/i8042.h" #include "hw/block/fdc.h" hw/timer/Kconfig +0
-3@@ -24,9 +24,6 @@ config M41T80 bool depends on I2C -config M48T59 - bool - config TWL92230 bool depends on I2Chw/timer/Makefile.objs +0
-4@@ -7,10 +7,6 @@ common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o common-obj-$(CONFIG_M41T80) += m41t80.o -common-obj-$(CONFIG_M48T59) += m48t59.o -ifeq ($(CONFIG_ISA_BUS),y) -common-obj-$(CONFIG_M48T59) += m48t59-isa.o -endif common-obj-$(CONFIG_PUV3) += puv3_ost.o common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XILINX) += xilinx_timer.oinclude/hw/rtc/m48t59.h new file +57
-0@@ -0,0 +1,57 @@ +/* +* QEMU M48T59 and M48T08 NVRAM emulation +* +* Copyright (c) 2003-2005, 2007 Jocelyn Mayer +* Copyright (c) 2013 Hervé Poussineau +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and associated documentation files (the "Software"), to deal +* in the Software without restriction, including without limitation the rights +* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +* copies of the Software, and to permit persons to whom the Software is +* furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +* THE SOFTWARE. +*/ + +#ifndef HW_RTC_M48T59_H +#define HW_RTC_M48T59_H + +#include "exec/hwaddr.h" +#include "qom/object.h" + +#define TYPE_NVRAM "nvram" + +#define NVRAM_CLASS (klass) \ + OBJECT_CLASS_CHECK(NvramClass, (klass), TYPE_NVRAM) +#define NVRAM_GET_CLASS (obj) \ + OBJECT_GET_CLASS(NvramClass, (obj), TYPE_NVRAM) +#define NVRAM (obj) \ + INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM) + +typedef struct Nvram Nvram ; + +typedef struct NvramClass { +InterfaceClass parent; + +uint32_t (*read)(Nvram *obj,uint32_t addr); +void (*write)(Nvram *obj,uint32_t addr,uint32_t val); +void (*toggle_lock)(Nvram *obj,int lock); +}NvramClass ; + +Nvram *m48t59_init_isa (ISABus *bus,uint32_t io_base,uint16_t size, +int base_year,int type); +Nvram *m48t59_init (qemu_irq IRQ ,hwaddr mem_base, +uint32_t io_base,uint16_t size,int base_year, +int type); + +#endif /* HW_M48T59_H */ include/hw/timer/m48t59.h deleted +0
-22@@ -1,32 +0,0 @@ -#ifndef HW_M48T59_H -#define HW_M48T59_H - -#include "exec/hwaddr.h" -#include "qom/object.h" - -#define TYPE_NVRAM "nvram" - -#define NVRAM_CLASS(klass) \ - OBJECT_CLASS_CHECK(NvramClass, (klass), TYPE_NVRAM) -#define NVRAM_GET_CLASS(obj) \ - OBJECT_GET_CLASS(NvramClass, (obj), TYPE_NVRAM) -#define NVRAM(obj) \ - INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM) - -typedef struct Nvram Nvram; - -typedef struct NvramClass { - InterfaceClass parent; - - uint32_t (*read)(Nvram *obj, uint32_t addr); - void (*write)(Nvram *obj, uint32_t addr, uint32_t val);
include/hw/timer/m48t59.h line 32
Quoted 10 lines
include/hw/timer/m48t59.h deleted +0
-10- void (*toggle_lock)(Nvram *obj, int lock); -} NvramClass; - -Nvram *m48t59_init_isa (ISABus *bus,uint32_t io_base,uint16_t size, -int base_year,int type); -Nvram *m48t59_init (qemu_irq IRQ ,hwaddr mem_base, -uint32_t io_base,uint16_t size,int base_year, -int type); - -#endif /* HW_M48T59_H */
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 5/14 hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéThe M41T80 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
---
MAINTAINERS | 2 +-
hw/rtc/Kconfig | 4 ++++
hw/rtc/Makefile.objs | 1 +
hw/{timer => rtc}/m41t80.c | 0
hw/timer/Kconfig | 4 ----
hw/timer/Makefile.objs | 1 -
6 files changed, 6 insertions(+), 6 deletions(-)
rename hw/{timer => rtc}/m41t80.c (100%)MAINTAINERS +1 -1
@@ -1113,7 +1113,7 @@ F: hw/ppc/sam460ex.c F: hw/ppc/ppc440_pcix.c F: hw/display/sm501* F: hw/ide/sii3112.c -F: hw/timer/m41t80.c +F: hw/rtc/m41t80.c F: pc-bios/canyonlands.dt[sb] F: pc-bios/u-boot-sam460ex-20100605.bin F: roms/u-boot-sam460ex
hw/rtc/Kconfig +4 -0
@@ -1,3 +1,7 @@ +config M41T80 + bool + depends on I2C + config M48T59 bool
hw/rtc/Makefile.objs +1 -0
@@ -1,3 +1,4 @@ +common-obj-$(CONFIG_M41T80) += m41t80.o common-obj-$(CONFIG_M48T59) += m48t59.o ifeq ($(CONFIG_ISA_BUS),y) common-obj-$(CONFIG_M48T59) += m48t59-isa.o
hw/rtc/m41t80.c renamed from hw/timer/m41t80.c +0 -0
hw/timer/Kconfig +0 -4
@@ -20,10 +20,6 @@ config HPET config I8254 bool -config M41T80 - bool - depends on I2C - config TWL92230 bool depends on I2C
hw/timer/Makefile.objs +0 -1
@@ -6,7 +6,6 @@ common-obj-$(CONFIG_CADENCE) += cadence_ttc.o common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o -common-obj-$(CONFIG_M41T80) += m41t80.o common-obj-$(CONFIG_PUV3) += puv3_ost.o common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XILINX) += xilinx_timer.o
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 05/14] hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 74 lines
The M41T80 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 2 +- hw/rtc/Kconfig | 4 ++++ hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/m41t80.c | 0 hw/timer/Kconfig | 4 ---- hw/timer/Makefile.objs | 1 - 6 files changed, 6 insertions(+), 6 deletions(-) rename hw/{timer => rtc}/m41t80.c (100%)MAINTAINERS +1
-1@@ -1113,7 +1113,7 @@ F: hw/ppc/sam460ex.c F: hw/ppc/ppc440_pcix.c F: hw/display/sm501* F: hw/ide/sii3112.c -F: hw/timer/m41t80.c +F: hw/rtc/m41t80.c F: pc-bios/canyonlands.dt[sb] F: pc-bios/u-boot-sam460ex-20100605.bin F: roms/u-boot-sam460exhw/rtc/Kconfig +4
-0@@ -1,3 +1,7 @@ +config M41T80 + bool + depends on I2C + config M48T59 boolhw/rtc/Makefile.objs +1
-0@@ -1,3 +1,4 @@ +common-obj-$(CONFIG_M41T80) += m41t80.o common-obj-$(CONFIG_M48T59) += m48t59.o ifeq ($(CONFIG_ISA_BUS),y) common-obj-$(CONFIG_M48T59) += m48t59-isa.ohw/rtc/m41t80.c renamed from hw/timer/m41t80.c +0
-0hw/timer/Kconfig +0
-4@@ -20,10 +20,6 @@ config HPET config I8254 bool -config M41T80 - bool - depends on I2C - config TWL92230 bool depends on I2Chw/timer/Makefile.objs +0
-0
hw/timer/Makefile.objs common-obj-$(CONFIG_CADENCE) += cadence_ttc.o · line 11
Quoted 7 lines
hw/timer/Makefile.objs +0
-1@@ -6,7 +6,6 @@ common-obj-$(CONFIG_CADENCE) += cadence_ttc.o common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o -common-obj-$(CONFIG_M41T80) += m41t80.o common-obj-$(CONFIG_PUV3) += puv3_ost.o common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XILINX) += xilinx_timer.o
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 6/14 hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéMove RTC devices under the hw/rtc/ subdirectory.
---
MAINTAINERS | 4 ++--
hw/rtc/Kconfig | 3 +++
hw/rtc/Makefile.objs | 1 +
hw/{timer => rtc}/sun4v-rtc.c | 2 +-
hw/rtc/trace-events | 4 ++++
hw/sparc64/niagara.c | 2 +-
hw/timer/Kconfig | 3 ---
hw/timer/Makefile.objs | 1 -
hw/timer/trace-events | 4 ----
include/hw/rtc/sun4v-rtc.h | 19 +++++++++++++++++++
include/hw/timer/sun4v-rtc.h | 1 -
11 files changed, 31 insertions(+), 13 deletions(-)
rename hw/{timer => rtc}/sun4v-rtc.c (98%)
create mode 100644 include/hw/rtc/sun4v-rtc.h
delete mode 100644 include/hw/timer/sun4v-rtc.hMAINTAINERS +2 -2
@@ -1165,8 +1165,8 @@ Sun4v M: Artyom Tarasenko <[email protected]> S: Maintained F: hw/sparc64/niagara.c -F: hw/timer/sun4v-rtc.c -F: include/hw/timer/sun4v-rtc.h +F: hw/rtc/sun4v-rtc.c +F: include/hw/rtc/sun4v-rtc.h Leon3 M: Fabien Chouteau <[email protected]>
hw/rtc/Kconfig +3 -0
@@ -10,3 +10,6 @@ config PL031 config MC146818RTC bool + +config SUN4V_RTC + bool
hw/rtc/Makefile.objs +1 -0
@@ -5,3 +5,4 @@ common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif common-obj-$(CONFIG_PL031) += pl031.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o +common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o
hw/rtc/sun4v-rtc.c renamed from hw/timer/sun4v-rtc.c +1 -1
@@ -13,7 +13,7 @@#include "hw/sysbus.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/timer/sun4v-rtc.h" +#include "hw/rtc/sun4v-rtc.h" #include "trace.h"
hw/rtc/trace-events +4 -0
@@ -1,5 +1,9 @@ # See docs/devel/tracing.txt for syntax documentation. +# sun4v-rtc.c +sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 +sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 + # pl031.c pl031_irq_state(int level) "irq state %d" pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x"
hw/sparc64/niagara.c +1 -1
@@ -30,7 +30,7 @@#include "hw/misc/unimp.h" #include "hw/loader.h" #include "hw/sparc/sparc64.h" -#include "hw/timer/sun4v-rtc.h" +#include "hw/rtc/sun4v-rtc.h" #include "exec/address-spaces.h" #include "sysemu/block-backend.h" #include "qemu/error-report.h"
hw/timer/Kconfig +0 -3
@@ -35,9 +35,6 @@ config ALLWINNER_A10_PIT config STM32F2XX_TIMER bool -config SUN4V_RTC - bool - config CMSDK_APB_TIMER bool select PTIMER
hw/timer/Makefile.objs +0 -1
@@ -35,7 +35,6 @@ common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o aspeed_rtc.o -common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o common-obj-$(CONFIG_CMSDK_APB_TIMER) += cmsdk-apb-timer.o common-obj-$(CONFIG_CMSDK_APB_DUALTIMER) += cmsdk-apb-dualtimer.o common-obj-$(CONFIG_MSF2) += mss-timer.o
hw/timer/trace-events +0 -4
@@ -70,10 +70,6 @@ cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset" aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 -# sun4v-rtc.c -sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 -sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 - # xlnx-zynqmp-rtc.c xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d"
include/hw/rtc/sun4v-rtc.h new file +19 -0
@@ -0,0 +1,19 @@ +/* +* QEMU sun4v Real Time Clock device +* +* The sun4v_rtc device (sun4v tod clock) +* +* Copyright (c) 2016 Artyom Tarasenko +* +* This code is licensed under the GNU GPL v3 or (at your option) any later +* version. +*/ + +#ifndef HW_RTC_SUN4V +#define HW_RTC_SUN4V + +#include "exec/hwaddr.h" + +void sun4v_rtc_init (hwaddr addr); + +#endif
include/hw/timer/sun4v-rtc.h deleted +0 -1
@@ -1 +0,0 @@ -void sun4v_rtc_init (hwaddr addr);
Signature · 1 line
2.20.1
Re: [PATCH v2 06/14] hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
Hi Artyom,
Do you mind Acking this patch?
Quoted 173 lines · Philippe Mathieu-Daudé
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 4 ++-- hw/rtc/Kconfig | 3 +++ hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/sun4v-rtc.c | 2 +- hw/rtc/trace-events | 4 ++++ hw/sparc64/niagara.c | 2 +- hw/timer/Kconfig | 3 --- hw/timer/Makefile.objs | 1 - hw/timer/trace-events | 4 ---- include/hw/rtc/sun4v-rtc.h | 19 +++++++++++++++++++ include/hw/timer/sun4v-rtc.h | 1 - 11 files changed, 31 insertions(+), 13 deletions(-)rename hw/{timer =>
rtc}/sun4v-rtc.c(98%)
create mode 100644include/hw/rtc/sun4v-rtc.h
delete mode 100644include/hw/timer/sun4v-rtc.hMAINTAINERS +2
-2@@ -1165,8 +1165,8 @@ Sun4v M: Artyom Tarasenko <[email protected]> S: Maintained F: hw/sparc64/niagara.c -F: hw/timer/sun4v-rtc.c -F: include/hw/timer/sun4v-rtc.h +F: hw/rtc/sun4v-rtc.c +F: include/hw/rtc/sun4v-rtc.h Leon3 M: Fabien Chouteau <[email protected]>hw/rtc/Kconfig +3
-0@@ -10,3 +10,6 @@ config PL031 config MC146818RTC bool + +config SUN4V_RTC + boolhw/rtc/Makefile.objs +1
-0@@ -5,3 +5,4 @@ common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif common-obj-$(CONFIG_PL031) += pl031.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o +common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.ohw/rtc/sun4v-rtc.c renamed from hw/timer/sun4v-rtc.c +1
-1@@ -13,7 +13,7 @@#include "hw/sysbus.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/timer/sun4v-rtc.h" +#include "hw/rtc/sun4v-rtc.h" #include "trace.h" hw/rtc/trace-events +4
-0@@ -1,5 +1,9 @@ # See docs/devel/tracing.txt for syntax documentation. +# sun4v-rtc.c +sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 +sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 + # pl031.c pl031_irq_state(int level) "irq state %d" pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x"hw/sparc64/niagara.c +1
-1@@ -30,7 +30,7 @@#include "hw/misc/unimp.h" #include "hw/loader.h" #include "hw/sparc/sparc64.h" -#include "hw/timer/sun4v-rtc.h" +#include "hw/rtc/sun4v-rtc.h" #include "exec/address-spaces.h" #include "sysemu/block-backend.h" #include "qemu/error-report.h" hw/timer/Kconfig +0
-3@@ -35,9 +35,6 @@ config ALLWINNER_A10_PIT config STM32F2XX_TIMER bool -config SUN4V_RTC - bool - config CMSDK_APB_TIMER bool select PTIMERhw/timer/Makefile.objs +0
-1@@ -35,7 +35,6 @@ common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o aspeed_rtc.o -common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o common-obj-$(CONFIG_CMSDK_APB_TIMER) += cmsdk-apb-timer.o common-obj-$(CONFIG_CMSDK_APB_DUALTIMER) += cmsdk-apb-dualtimer.o common-obj-$(CONFIG_MSF2) += mss-timer.ohw/timer/trace-events +0
-4@@ -70,10 +70,6 @@ cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset" aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 -# sun4v-rtc.c -sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 -sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 - # xlnx-zynqmp-rtc.c xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d"include/hw/rtc/sun4v-rtc.h new file +19
-0@@ -0,0 +1,19 @@ +/* +* QEMU sun4v Real Time Clock device +* +* The sun4v_rtc device (sun4v tod clock) +* +* Copyright (c) 2016 Artyom Tarasenko +* +* This code is licensed under the GNU GPL v3 or (at your option) any later +* version. +*/ + +#ifndef HW_RTC_SUN4V +#define HW_RTC_SUN4V + +#include "exec/hwaddr.h" + +void sun4v_rtc_init (hwaddr addr); + +#endif include/hw/timer/sun4v-rtc.h deleted +0
-1@@ -1 +0,0 @@ -void sun4v_rtc_init (hwaddr addr);
Artyom Tarasenko
Reviewed-byRe: [PATCH v2 06/14] hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
Quoted 4 lines · Philippe Mathieu-Daudé
Hi Artyom,
Do you mind Acking this patch?
Sorry for the late reply:
Quoted 175 lines · Philippe Mathieu-Daudé
Quoted 173 lines
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 4 ++-- hw/rtc/Kconfig | 3 +++ hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/sun4v-rtc.c | 2 +- hw/rtc/trace-events | 4 ++++ hw/sparc64/niagara.c | 2 +- hw/timer/Kconfig | 3 --- hw/timer/Makefile.objs | 1 - hw/timer/trace-events | 4 ---- include/hw/rtc/sun4v-rtc.h | 19 +++++++++++++++++++ include/hw/timer/sun4v-rtc.h | 1 - 11 files changed, 31 insertions(+), 13 deletions(-)rename hw/{timer =>
rtc}/sun4v-rtc.c(98%)
create mode 100644include/hw/rtc/sun4v-rtc.h
delete mode 100644include/hw/timer/sun4v-rtc.hMAINTAINERS +2
-2@@ -1165,8 +1165,8 @@ Sun4v M: Artyom Tarasenko <[email protected]> S: Maintained F: hw/sparc64/niagara.c -F: hw/timer/sun4v-rtc.c -F: include/hw/timer/sun4v-rtc.h +F: hw/rtc/sun4v-rtc.c +F: include/hw/rtc/sun4v-rtc.h Leon3 M: Fabien Chouteau <[email protected]>hw/rtc/Kconfig +3
-0@@ -10,3 +10,6 @@ config PL031 config MC146818RTC bool + +config SUN4V_RTC + boolhw/rtc/Makefile.objs +1
-0@@ -5,3 +5,4 @@ common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif common-obj-$(CONFIG_PL031) += pl031.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o +common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.ohw/rtc/sun4v-rtc.c renamed from hw/timer/sun4v-rtc.c +1
-1@@ -13,7 +13,7 @@#include "hw/sysbus.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/timer/sun4v-rtc.h" +#include "hw/rtc/sun4v-rtc.h" #include "trace.h" hw/rtc/trace-events +4
-0@@ -1,5 +1,9 @@ # See docs/devel/tracing.txt for syntax documentation. +# sun4v-rtc.c +sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 +sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 + # pl031.c pl031_irq_state(int level) "irq state %d" pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x"hw/sparc64/niagara.c +1
-1@@ -30,7 +30,7 @@#include "hw/misc/unimp.h" #include "hw/loader.h" #include "hw/sparc/sparc64.h" -#include "hw/timer/sun4v-rtc.h" +#include "hw/rtc/sun4v-rtc.h" #include "exec/address-spaces.h" #include "sysemu/block-backend.h" #include "qemu/error-report.h" hw/timer/Kconfig +0
-3@@ -35,9 +35,6 @@ config ALLWINNER_A10_PIT config STM32F2XX_TIMER bool -config SUN4V_RTC - bool - config CMSDK_APB_TIMER bool select PTIMERhw/timer/Makefile.objs +0
-1@@ -35,7 +35,6 @@ common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o aspeed_rtc.o -common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o common-obj-$(CONFIG_CMSDK_APB_TIMER) += cmsdk-apb-timer.o common-obj-$(CONFIG_CMSDK_APB_DUALTIMER) += cmsdk-apb-dualtimer.o common-obj-$(CONFIG_MSF2) += mss-timer.ohw/timer/trace-events +0
-4@@ -70,10 +70,6 @@ cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset" aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 -# sun4v-rtc.c -sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 -sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 - # xlnx-zynqmp-rtc.c xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d"include/hw/rtc/sun4v-rtc.h new file +19
-0@@ -0,0 +1,19 @@ +/* +* QEMU sun4v Real Time Clock device +* +* The sun4v_rtc device (sun4v tod clock) +* +* Copyright (c) 2016 Artyom Tarasenko +* +* This code is licensed under the GNU GPL v3 or (at your option) any later +* version. +*/ + +#ifndef HW_RTC_SUN4V +#define HW_RTC_SUN4V + +#include "exec/hwaddr.h" + +void sun4v_rtc_init (hwaddr addr); + +#endif include/hw/timer/sun4v-rtc.h deleted +0
-1@@ -1 +0,0 @@ -void sun4v_rtc_init (hwaddr addr);
Signature · 4 lines
Regards, Artyom Tarasenko SPARC and PPC PReP under qemu blog: http://tyom.blogspot.com/search/label/qemu
Laurent Vivier
AppliedRe: [PATCH v2 06/14] hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéLe 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 172 lines
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 4 ++-- hw/rtc/Kconfig | 3 +++ hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/sun4v-rtc.c | 2 +- hw/rtc/trace-events | 4 ++++ hw/sparc64/niagara.c | 2 +- hw/timer/Kconfig | 3 --- hw/timer/Makefile.objs | 1 - hw/timer/trace-events | 4 ---- include/hw/rtc/sun4v-rtc.h | 19 +++++++++++++++++++ include/hw/timer/sun4v-rtc.h | 1 - 11 files changed, 31 insertions(+), 13 deletions(-) rename hw/{timer => rtc}/sun4v-rtc.c (98%) create mode 100644 include/hw/rtc/sun4v-rtc.h delete mode 100644 include/hw/timer/sun4v-rtc.hMAINTAINERS +2
-2@@ -1165,8 +1165,8 @@ Sun4v M: Artyom Tarasenko <[email protected]> S: Maintained F: hw/sparc64/niagara.c -F: hw/timer/sun4v-rtc.c -F: include/hw/timer/sun4v-rtc.h +F: hw/rtc/sun4v-rtc.c +F: include/hw/rtc/sun4v-rtc.h Leon3 M: Fabien Chouteau <[email protected]>hw/rtc/Kconfig +3
-0@@ -10,3 +10,6 @@ config PL031 config MC146818RTC bool + +config SUN4V_RTC + boolhw/rtc/Makefile.objs +1
-0@@ -5,3 +5,4 @@ common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif common-obj-$(CONFIG_PL031) += pl031.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o +common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.ohw/rtc/sun4v-rtc.c renamed from hw/timer/sun4v-rtc.c +1
-1@@ -13,7 +13,7 @@#include "hw/sysbus.h" #include "qemu/module.h" #include "qemu/timer.h" -#include "hw/timer/sun4v-rtc.h" +#include "hw/rtc/sun4v-rtc.h" #include "trace.h" hw/rtc/trace-events +4
-0@@ -1,5 +1,9 @@ # See docs/devel/tracing.txt for syntax documentation. +# sun4v-rtc.c +sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 +sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 + # pl031.c pl031_irq_state(int level) "irq state %d" pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x"hw/sparc64/niagara.c +1
-1@@ -30,7 +30,7 @@#include "hw/misc/unimp.h" #include "hw/loader.h" #include "hw/sparc/sparc64.h" -#include "hw/timer/sun4v-rtc.h" +#include "hw/rtc/sun4v-rtc.h" #include "exec/address-spaces.h" #include "sysemu/block-backend.h" #include "qemu/error-report.h" hw/timer/Kconfig +0
-3@@ -35,9 +35,6 @@ config ALLWINNER_A10_PIT config STM32F2XX_TIMER bool -config SUN4V_RTC - bool - config CMSDK_APB_TIMER bool select PTIMERhw/timer/Makefile.objs +0
-1@@ -35,7 +35,6 @@ common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o aspeed_rtc.o -common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o common-obj-$(CONFIG_CMSDK_APB_TIMER) += cmsdk-apb-timer.o common-obj-$(CONFIG_CMSDK_APB_DUALTIMER) += cmsdk-apb-dualtimer.o common-obj-$(CONFIG_MSF2) += mss-timer.ohw/timer/trace-events +0
-4@@ -70,10 +70,6 @@ cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset" aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 -# sun4v-rtc.c -sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 -sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 - # xlnx-zynqmp-rtc.c xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d"include/hw/rtc/sun4v-rtc.h new file +19
-0@@ -0,0 +1,19 @@ +/* +* QEMU sun4v Real Time Clock device +* +* The sun4v_rtc device (sun4v tod clock) +* +* Copyright (c) 2016 Artyom Tarasenko +* +* This code is licensed under the GNU GPL v3 or (at your option) any later +* version. +*/ + +#ifndef HW_RTC_SUN4V +#define HW_RTC_SUN4V + +#include "exec/hwaddr.h" + +void sun4v_rtc_init (hwaddr addr); + +#endif include/hw/timer/sun4v-rtc.h deleted +0
-0
include/hw/timer/sun4v-rtc.h line 1
Quoted 1 line
include/hw/timer/sun4v-rtc.h deleted +0
-1@@ -1 +0,0 @@ -void sun4v_rtc_init (hwaddr addr);
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 7/14 hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéThe TWL92230 is an "energy management device" companion with a RTC. Since we mostly model the RTC, move it under the hw/rtc/ subdirectory.
---
MAINTAINERS | 2 +-
hw/rtc/Kconfig | 4 ++++
hw/rtc/Makefile.objs | 1 +
hw/{timer => rtc}/twl92230.c | 0
hw/timer/Kconfig | 4 ----
hw/timer/Makefile.objs | 1 -
6 files changed, 6 insertions(+), 6 deletions(-)
rename hw/{timer => rtc}/twl92230.c (100%)MAINTAINERS +1 -1
@@ -663,7 +663,7 @@ F: hw/display/blizzard.c F: hw/input/lm832x.c F: hw/input/tsc2005.c F: hw/misc/cbus.c -F: hw/timer/twl92230.c +F: hw/rtc/twl92230.c F: include/hw/display/blizzard.h F: include/hw/input/tsc2xxx.h F: include/hw/misc/cbus.h
hw/rtc/Kconfig +4 -0
@@ -8,6 +8,10 @@ config M48T59 config PL031 bool +config TWL92230 + bool + depends on I2C + config MC146818RTC bool
hw/rtc/Makefile.objs +1 -0
@@ -4,5 +4,6 @@ ifeq ($(CONFIG_ISA_BUS),y) common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif common-obj-$(CONFIG_PL031) += pl031.o +common-obj-$(CONFIG_TWL92230) += twl92230.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o
hw/rtc/twl92230.c renamed from hw/timer/twl92230.c +0 -0
hw/timer/Kconfig +0 -4
@@ -20,10 +20,6 @@ config HPET config I8254 bool -config TWL92230 - bool - depends on I2C - config ALTERA_TIMER bool select PTIMER
hw/timer/Makefile.objs +0 -1
@@ -7,7 +7,6 @@ common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o common-obj-$(CONFIG_PUV3) += puv3_ost.o -common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XILINX) += xilinx_timer.o common-obj-$(CONFIG_SLAVIO) += slavio_timer.o common-obj-$(CONFIG_ETRAXFS) += etraxfs_timer.o
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 07/14] hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 80 lines
The TWL92230 is an "energy management device" companion with a RTC. Since we mostly model the RTC, move it under the hw/rtc/ subdirectory.
Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 2 +- hw/rtc/Kconfig | 4 ++++ hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/twl92230.c | 0 hw/timer/Kconfig | 4 ---- hw/timer/Makefile.objs | 1 - 6 files changed, 6 insertions(+), 6 deletions(-) rename hw/{timer => rtc}/twl92230.c (100%)MAINTAINERS +1
-1@@ -663,7 +663,7 @@ F: hw/display/blizzard.c F: hw/input/lm832x.c F: hw/input/tsc2005.c F: hw/misc/cbus.c -F: hw/timer/twl92230.c +F: hw/rtc/twl92230.c F: include/hw/display/blizzard.h F: include/hw/input/tsc2xxx.h F: include/hw/misc/cbus.hhw/rtc/Kconfig +4
-0@@ -8,6 +8,10 @@ config M48T59 config PL031 bool +config TWL92230 + bool + depends on I2C + config MC146818RTC boolhw/rtc/Makefile.objs +1
-0@@ -4,5 +4,6 @@ ifeq ($(CONFIG_ISA_BUS),y) common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif common-obj-$(CONFIG_PL031) += pl031.o +common-obj-$(CONFIG_TWL92230) += twl92230.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.ohw/rtc/twl92230.c renamed from hw/timer/twl92230.c +0
-0hw/timer/Kconfig +0
-4@@ -20,10 +20,6 @@ config HPET config I8254 bool -config TWL92230 - bool - depends on I2C - config ALTERA_TIMER bool select PTIMERhw/timer/Makefile.objs +0
-0
hw/timer/Makefile.objs common-obj-$(CONFIG_DS1338) += ds1338.o · line 12
Quoted 7 lines
hw/timer/Makefile.objs +0
-1@@ -7,7 +7,6 @@ common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o common-obj-$(CONFIG_PUV3) += puv3_ost.o -common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XILINX) += xilinx_timer.o common-obj-$(CONFIG_SLAVIO) += slavio_timer.o common-obj-$(CONFIG_ETRAXFS) += etraxfs_timer.o
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 8/14 hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéThe DS1338 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.
---
hw/rtc/Kconfig | 4 ++++
hw/rtc/Makefile.objs | 1 +
hw/{timer => rtc}/ds1338.c | 0
hw/timer/Kconfig | 4 ----
hw/timer/Makefile.objs | 1 -
5 files changed, 5 insertions(+), 5 deletions(-)
rename hw/{timer => rtc}/ds1338.c (100%)hw/rtc/Kconfig +4 -0
@@ -1,3 +1,7 @@ +config DS1338 + bool + depends on I2C + config M41T80 bool depends on I2C
hw/rtc/Makefile.objs +1 -0
@@ -1,3 +1,4 @@ +common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_M41T80) += m41t80.o common-obj-$(CONFIG_M48T59) += m48t59.o ifeq ($(CONFIG_ISA_BUS),y)
hw/rtc/ds1338.c renamed from hw/timer/ds1338.c +0 -0
hw/timer/Kconfig +0 -4
@@ -9,10 +9,6 @@ config ARM_MPTIMER config A9_GTIMER bool -config DS1338 - bool - depends on I2C - config HPET bool default y if PC
hw/timer/Makefile.objs +0 -1
@@ -3,7 +3,6 @@ common-obj-$(CONFIG_ARM_MPTIMER) += arm_mptimer.o common-obj-$(CONFIG_ARM_V7M) += armv7m_systick.o common-obj-$(CONFIG_A9_GTIMER) += a9gtimer.o common-obj-$(CONFIG_CADENCE) += cadence_ttc.o -common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o common-obj-$(CONFIG_PUV3) += puv3_ost.o
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 08/14] hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 60 lines
The DS1338 is a Real Time Clock, not a timer.
Move it under the hw/rtc/ subdirectory.Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/rtc/Kconfig | 4 ++++ hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/ds1338.c | 0 hw/timer/Kconfig | 4 ---- hw/timer/Makefile.objs | 1 - 5 files changed, 5 insertions(+), 5 deletions(-) rename hw/{timer => rtc}/ds1338.c (100%)hw/rtc/Kconfig +4
-0@@ -1,3 +1,7 @@ +config DS1338 + bool + depends on I2C + config M41T80 bool depends on I2Chw/rtc/Makefile.objs +1
-0@@ -1,3 +1,4 @@ +common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_M41T80) += m41t80.o common-obj-$(CONFIG_M48T59) += m48t59.o ifeq ($(CONFIG_ISA_BUS),y)hw/rtc/ds1338.c renamed from hw/timer/ds1338.c +0
-0hw/timer/Kconfig +0
-4@@ -9,10 +9,6 @@ config ARM_MPTIMER config A9_GTIMER bool -config DS1338 - bool - depends on I2C - config HPET bool default y if PChw/timer/Makefile.objs +0
-0
hw/timer/Makefile.objs common-obj-$(CONFIG_ARM_MPTIMER) += arm_mptimer.o · line 8
Quoted 7 lines
hw/timer/Makefile.objs +0
-1@@ -3,7 +3,6 @@ common-obj-$(CONFIG_ARM_MPTIMER) += arm_mptimer.o common-obj-$(CONFIG_ARM_V7M) += armv7m_systick.o common-obj-$(CONFIG_A9_GTIMER) += a9gtimer.o common-obj-$(CONFIG_CADENCE) += cadence_ttc.o -common-obj-$(CONFIG_DS1338) += ds1338.o common-obj-$(CONFIG_HPET) += hpet.o common-obj-$(CONFIG_I8254) += i8254_common.o i8254.o common-obj-$(CONFIG_PUV3) += puv3_ost.o
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 9/14 hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéMove RTC devices under the hw/rtc/ subdirectory.
Remove Alistair outdated email address (see commit c22e580c2ad).
---
hw/rtc/Makefile.objs | 1 +
hw/rtc/trace-events | 3 +++
hw/{timer => rtc}/xlnx-zynqmp-rtc.c | 2 +-
hw/timer/Makefile.objs | 1 -
hw/timer/trace-events | 3 ---
include/hw/arm/xlnx-zynqmp.h | 2 +-
include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h | 6 +++---
7 files changed, 9 insertions(+), 9 deletions(-)
rename hw/{timer => rtc}/xlnx-zynqmp-rtc.c (99%)
rename include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h (95%)hw/rtc/Makefile.objs +1 -0
@@ -6,5 +6,6 @@ common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif common-obj-$(CONFIG_PL031) += pl031.o common-obj-$(CONFIG_TWL92230) += twl92230.o +common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o
hw/rtc/trace-events +3 -0
@@ -4,6 +4,9 @@ sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 +# xlnx-zynqmp-rtc.c +xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d" + # pl031.c pl031_irq_state(int level) "irq state %d" pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x"
hw/rtc/xlnx-zynqmp-rtc.c renamed from hw/timer/xlnx-zynqmp-rtc.c +1 -1
@@ -36,7 +36,7 @@#include "qemu/cutils.h" #include "sysemu/sysemu.h" #include "trace.h" -#include "hw/timer/xlnx-zynqmp-rtc.h" +#include "hw/rtc/xlnx-zynqmp-rtc.h" #include "migration/vmstate.h" #ifndef XLNX_ZYNQMP_RTC_ERR_DEBUG
hw/timer/Makefile.objs +0 -1
@@ -14,7 +14,6 @@ common-obj-$(CONFIG_IMX) += imx_epit.o common-obj-$(CONFIG_IMX) += imx_gpt.o common-obj-$(CONFIG_LM32) += lm32_timer.o common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o -common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o
hw/timer/trace-events +0 -3
@@ -70,9 +70,6 @@ cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset" aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 -# xlnx-zynqmp-rtc.c -xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d" - # nrf51_timer.c nrf51_timer_read(uint64_t addr, uint32_t value, unsigned size) "read addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" nrf51_timer_write(uint64_t addr, uint32_t value, unsigned size) "write addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u"
include/hw/arm/xlnx-zynqmp.h +1 -1
@@ -29,7 +29,7 @@#include "hw/dma/xlnx-zdma.h" #include "hw/display/xlnx_dp.h" #include "hw/intc/xlnx-zynqmp-ipi.h" -#include "hw/timer/xlnx-zynqmp-rtc.h" +#include "hw/rtc/xlnx-zynqmp-rtc.h" #include "hw/cpu/cluster.h" #include "target/arm/cpu.h"
include/hw/rtc/xlnx-zynqmp-rtc.h renamed from include/hw/timer/xlnx-zynqmp-rtc.h +3 -3
@@ -3,7 +3,7 @@* * Copyright (c) 2017 Xilinx Inc. * -* Written-by: Alistair Francis <[email protected]> +* Written-by: Alistair Francis * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal
@@ -24,8 +24,8 @@* THE SOFTWARE. */ -#ifndef HW_TIMER_XLNX_ZYNQMP_RTC_H -#define HW_TIMER_XLNX_ZYNQMP_RTC_H +#ifndef HW_RTC_XLNX_ZYNQMP_H +#define HW_RTC_XLNX_ZYNQMP_H #include "hw/register.h" #include "hw/sysbus.h"
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 09/14] hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
Quoted 116 lines
Move RTC devices under the hw/rtc/ subdirectory.
Remove Alistair outdated email address (see commit
c22e580c2ad).Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/rtc/Makefile.objs | 1 + hw/rtc/trace-events | 3 +++ hw/{timer => rtc}/xlnx-zynqmp-rtc.c | 2 +- hw/timer/Makefile.objs | 1 - hw/timer/trace-events | 3 --- include/hw/arm/xlnx-zynqmp.h | 2 +- include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) rename hw/{timer => rtc}/xlnx-zynqmp-rtc.c (99%) rename include/hw/{timer => rtc}/xlnx-zynqmp-rtc.h (95%)hw/rtc/Makefile.objs +1
-0@@ -6,5 +6,6 @@ common-obj-$(CONFIG_M48T59) += m48t59-isa.o endif common-obj-$(CONFIG_PL031) += pl031.o common-obj-$(CONFIG_TWL92230) += twl92230.o +common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.ohw/rtc/trace-events +3
-0@@ -4,6 +4,9 @@ sun4v_rtc_read(uint64_t addr, uint64_t value) "read: addr 0x%" PRIx64 " value 0x%" PRIx64 sun4v_rtc_write(uint64_t addr, uint64_t value) "write: addr 0x%" PRIx64 " value 0x%" PRIx64 +# xlnx-zynqmp-rtc.c +xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d" + # pl031.c pl031_irq_state(int level) "irq state %d" pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x"hw/rtc/xlnx-zynqmp-rtc.c renamed from hw/timer/xlnx-zynqmp-rtc.c +1
-1@@ -36,7 +36,7 @@#include "qemu/cutils.h" #include "sysemu/sysemu.h" #include "trace.h" -#include "hw/timer/xlnx-zynqmp-rtc.h" +#include "hw/rtc/xlnx-zynqmp-rtc.h" #include "migration/vmstate.h" #ifndef XLNX_ZYNQMP_RTC_ERR_DEBUG hw/timer/Makefile.objs +0
-1@@ -14,7 +14,6 @@ common-obj-$(CONFIG_IMX) += imx_epit.o common-obj-$(CONFIG_IMX) += imx_gpt.o common-obj-$(CONFIG_LM32) += lm32_timer.o common-obj-$(CONFIG_MILKYMIST) += milkymist-sysctl.o -common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.ohw/timer/trace-events +0
-3@@ -70,9 +70,6 @@ cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset" aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 -# xlnx-zynqmp-rtc.c -xlnx_zynqmp_rtc_gettime(int year, int month, int day, int hour, int min, int sec) "Get time from host: %d-%d-%d %2d:%02d:%02d" - # nrf51_timer.c nrf51_timer_read(uint64_t addr, uint32_t value, unsigned size) "read addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" nrf51_timer_write(uint64_t addr, uint32_t value, unsigned size) "write addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u"include/hw/arm/xlnx-zynqmp.h +1
-1@@ -29,7 +29,7 @@#include "hw/dma/xlnx-zdma.h" #include "hw/display/xlnx_dp.h" #include "hw/intc/xlnx-zynqmp-ipi.h" -#include "hw/timer/xlnx-zynqmp-rtc.h" +#include "hw/rtc/xlnx-zynqmp-rtc.h" #include "hw/cpu/cluster.h" #include "target/arm/cpu.h" include/hw/rtc/xlnx-zynqmp-rtc.h renamed from include/hw/timer/xlnx-zynqmp-rtc.h +1
-1@@ -3,7 +3,7 @@* * Copyright (c) 2017 Xilinx Inc. * -* Written-by: Alistair Francis <[email protected]> +* Written-by: Alistair Francis * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal
include/hw/rtc/xlnx-zynqmp-rtc.h line 31
Quoted 10 lines
include/hw/rtc/xlnx-zynqmp-rtc.h renamed from include/hw/timer/xlnx-zynqmp-rtc.h +2
-2@@ -24,8 +24,8 @@* THE SOFTWARE. */ -#ifndef HW_TIMER_XLNX_ZYNQMP_RTC_H -#define HW_TIMER_XLNX_ZYNQMP_RTC_H +#ifndef HW_RTC_XLNX_ZYNQMP_H +#define HW_RTC_XLNX_ZYNQMP_H #include "hw/register.h" #include "hw/sysbus.h"
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 10/14 hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéMove RTC devices under the hw/rtc/ subdirectory.
---
hw/rtc/Makefile.objs | 1 +
hw/{timer => rtc}/exynos4210_rtc.c | 0
hw/timer/Makefile.objs | 1 -
3 files changed, 1 insertion(+), 1 deletion(-)
rename hw/{timer => rtc}/exynos4210_rtc.c (100%)hw/rtc/Makefile.objs +1 -0
@@ -7,5 +7,6 @@ endif common-obj-$(CONFIG_PL031) += pl031.o common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o
hw/rtc/exynos4210_rtc.c renamed from hw/timer/exynos4210_rtc.c +0 -0
hw/timer/Makefile.objs +0 -1
@@ -19,7 +19,6 @@ common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o -common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o common-obj-$(CONFIG_OMAP) += omap_gptimer.o common-obj-$(CONFIG_OMAP) += omap_synctimer.o common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 10/14] hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:04, Philippe Mathieu-Daudé a écrit :
Quoted 32 lines
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/exynos4210_rtc.c | 0 hw/timer/Makefile.objs | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename hw/{timer => rtc}/exynos4210_rtc.c (100%)hw/rtc/Makefile.objs +1
-0@@ -7,5 +7,6 @@ endif common-obj-$(CONFIG_PL031) += pl031.o common-obj-$(CONFIG_TWL92230) += twl92230.o common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o +common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.ohw/rtc/exynos4210_rtc.c renamed from hw/timer/exynos4210_rtc.c +0
-0hw/timer/Makefile.objs +0
-0
hw/timer/Makefile.objs common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o · line 24
Quoted 7 lines
hw/timer/Makefile.objs +0
-1@@ -19,7 +19,6 @@ common-obj-$(CONFIG_NRF51_SOC) += nrf51_timer.o common-obj-$(CONFIG_ALTERA_TIMER) += altera_timer.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_mct.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_pwm.o -common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o common-obj-$(CONFIG_OMAP) += omap_gptimer.o common-obj-$(CONFIG_OMAP) += omap_synctimer.o common-obj-$(CONFIG_PXA2XX) += pxa2xx_timer.o
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 11/14 hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory
In reply to Philippe Mathieu-DaudéMove RTC devices under the hw/rtc/ subdirectory.
---
hw/rtc/Makefile.objs | 1 +
hw/{timer => rtc}/aspeed_rtc.c | 2 +-
hw/rtc/trace-events | 4 ++++
hw/timer/Makefile.objs | 2 +-
hw/timer/trace-events | 4 ----
include/hw/arm/aspeed_soc.h | 2 +-
include/hw/{timer => rtc}/aspeed_rtc.h | 6 +++---
7 files changed, 11 insertions(+), 10 deletions(-)
rename hw/{timer => rtc}/aspeed_rtc.c (99%)
rename include/hw/{timer => rtc}/aspeed_rtc.h (84%)hw/rtc/Makefile.objs +1 -0
@@ -10,3 +10,4 @@ common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o +common-obj-$(CONFIG_ASPEED_SOC) += aspeed_rtc.o
hw/rtc/aspeed_rtc.c renamed from hw/timer/aspeed_rtc.c +1 -1
@@ -8,7 +8,7 @@#include "qemu/osdep.h" #include "qemu-common.h" -#include "hw/timer/aspeed_rtc.h" +#include "hw/rtc/aspeed_rtc.h" #include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/timer.h"
hw/rtc/trace-events +4 -0
@@ -13,3 +13,7 @@ pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" pl031_write(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" pl031_alarm_raised(void) "alarm raised" pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks" + +# aspeed-rtc.c +aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 +aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64
hw/timer/Makefile.objs +1 -1
@@ -29,7 +29,7 @@ common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o aspeed_rtc.o +common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o common-obj-$(CONFIG_CMSDK_APB_TIMER) += cmsdk-apb-timer.o common-obj-$(CONFIG_CMSDK_APB_DUALTIMER) += cmsdk-apb-dualtimer.o
hw/timer/trace-events +0 -4
@@ -66,10 +66,6 @@ cmsdk_apb_dualtimer_read(uint64_t offset, uint64_t data, unsigned size) "CMSDK A cmsdk_apb_dualtimer_write(uint64_t offset, uint64_t data, unsigned size) "CMSDK APB dualtimer write: offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u" cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset" -# hw/timer/aspeed-rtc.c -aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 -aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 - # nrf51_timer.c nrf51_timer_read(uint64_t addr, uint32_t value, unsigned size) "read addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" nrf51_timer_write(uint64_t addr, uint32_t value, unsigned size) "write addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u"
include/hw/arm/aspeed_soc.h +1 -1
@@ -17,7 +17,7 @@#include "hw/misc/aspeed_sdmc.h" #include "hw/misc/aspeed_xdma.h" #include "hw/timer/aspeed_timer.h" -#include "hw/timer/aspeed_rtc.h" +#include "hw/rtc/aspeed_rtc.h" #include "hw/i2c/aspeed_i2c.h" #include "hw/ssi/aspeed_smc.h" #include "hw/watchdog/wdt_aspeed.h"
include/hw/rtc/aspeed_rtc.h renamed from include/hw/timer/aspeed_rtc.h +3 -3
@@ -5,8 +5,8 @@* Copyright 2019 IBM Corp * SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef ASPEED_RTC_H -#define ASPEED_RTC_H +#ifndef HW_RTC_ASPEED_RTC_H +#define HW_RTC_ASPEED_RTC_H #include <stdint.h>
@@ -27,4 +27,4 @@ typedef struct AspeedRtcState {#define TYPE_ASPEED_RTC "aspeed.rtc"#define ASPEED_RTC (obj) OBJECT_CHECK(AspeedRtcState, (obj), TYPE_ASPEED_RTC) -#endif /* ASPEED_RTC_H */ +#endif /* HW_RTC_ASPEED_RTC_H */
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 11/14] hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory
Le 04/10/2019 à 01:04, Philippe Mathieu-Daudé a écrit :
Quoted 115 lines
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by Cédric Le Goater <[email protected]>Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/rtc/Makefile.objs | 1 + hw/{timer => rtc}/aspeed_rtc.c | 2 +- hw/rtc/trace-events | 4 ++++ hw/timer/Makefile.objs | 2 +- hw/timer/trace-events | 4 ---- include/hw/arm/aspeed_soc.h | 2 +- include/hw/{timer => rtc}/aspeed_rtc.h | 6 +++--- 7 files changed, 11 insertions(+), 10 deletions(-) rename hw/{timer => rtc}/aspeed_rtc.c (99%) rename include/hw/{timer => rtc}/aspeed_rtc.h (84%)hw/rtc/Makefile.objs +1
-0@@ -10,3 +10,4 @@ common-obj-$(CONFIG_XLNX_ZYNQMP) += xlnx-zynqmp-rtc.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_rtc.o obj-$(CONFIG_MC146818RTC) += mc146818rtc.o common-obj-$(CONFIG_SUN4V_RTC) += sun4v-rtc.o +common-obj-$(CONFIG_ASPEED_SOC) += aspeed_rtc.ohw/rtc/aspeed_rtc.c renamed from hw/timer/aspeed_rtc.c +1
-1@@ -8,7 +8,7 @@#include "qemu/osdep.h" #include "qemu-common.h" -#include "hw/timer/aspeed_rtc.h" +#include "hw/rtc/aspeed_rtc.h" #include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/timer.h" hw/rtc/trace-events +4
-0@@ -13,3 +13,7 @@ pl031_read(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" pl031_write(uint32_t addr, uint32_t value) "addr 0x%08x value 0x%08x" pl031_alarm_raised(void) "alarm raised" pl031_set_alarm(uint32_t ticks) "alarm set for %u ticks" + +# aspeed-rtc.c +aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 +aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64hw/timer/Makefile.objs +1
-1@@ -29,7 +29,7 @@ common-obj-$(CONFIG_MIPS_CPS) += mips_gictimer.o common-obj-$(CONFIG_ALLWINNER_A10_PIT) += allwinner-a10-pit.o common-obj-$(CONFIG_STM32F2XX_TIMER) += stm32f2xx_timer.o -common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o aspeed_rtc.o +common-obj-$(CONFIG_ASPEED_SOC) += aspeed_timer.o common-obj-$(CONFIG_CMSDK_APB_TIMER) += cmsdk-apb-timer.o common-obj-$(CONFIG_CMSDK_APB_DUALTIMER) += cmsdk-apb-dualtimer.ohw/timer/trace-events +0
-4@@ -66,10 +66,6 @@ cmsdk_apb_dualtimer_read(uint64_t offset, uint64_t data, unsigned size) "CMSDK A cmsdk_apb_dualtimer_write(uint64_t offset, uint64_t data, unsigned size) "CMSDK APB dualtimer write: offset 0x%" PRIx64 " data 0x%" PRIx64 " size %u" cmsdk_apb_dualtimer_reset(void) "CMSDK APB dualtimer: reset" -# hw/timer/aspeed-rtc.c -aspeed_rtc_read(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 -aspeed_rtc_write(uint64_t addr, uint64_t value) "addr 0x%02" PRIx64 " value 0x%08" PRIx64 - # nrf51_timer.c nrf51_timer_read(uint64_t addr, uint32_t value, unsigned size) "read addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u" nrf51_timer_write(uint64_t addr, uint32_t value, unsigned size) "write addr 0x%" PRIx64 " data 0x%" PRIx32 " size %u"include/hw/arm/aspeed_soc.h +1
-1@@ -17,7 +17,7 @@#include "hw/misc/aspeed_sdmc.h" #include "hw/misc/aspeed_xdma.h" #include "hw/timer/aspeed_timer.h" -#include "hw/timer/aspeed_rtc.h" +#include "hw/rtc/aspeed_rtc.h" #include "hw/i2c/aspeed_i2c.h" #include "hw/ssi/aspeed_smc.h" #include "hw/watchdog/wdt_aspeed.h" include/hw/rtc/aspeed_rtc.h renamed from include/hw/timer/aspeed_rtc.h +2
-2@@ -5,8 +5,8 @@* Copyright 2019 IBM Corp * SPDX-License-Identifier: GPL-2.0-or-later */ -#ifndef ASPEED_RTC_H -#define ASPEED_RTC_H +#ifndef HW_RTC_ASPEED_RTC_H +#define HW_RTC_ASPEED_RTC_H #include <stdint.h>
include/hw/rtc/aspeed_rtc.h typedef struct AspeedRtcState { · line 30
Quoted 5 lines
include/hw/rtc/aspeed_rtc.h renamed from include/hw/timer/aspeed_rtc.h +1
-1@@ -27,4 +27,4 @@ typedef struct AspeedRtcState {#define TYPE_ASPEED_RTC "aspeed.rtc"#define ASPEED_RTC (obj) OBJECT_CHECK(AspeedRtcState, (obj), TYPE_ASPEED_RTC) -#endif /* ASPEED_RTC_H */ +#endif /* HW_RTC_ASPEED_RTC_H */
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 12/14 hw/rtc/mc146818: Include mc146818rtc_regs.h a bit less
In reply to Philippe Mathieu-DaudéOnly 2 source files require the "mc146818rtc_regs.h" header. Instead of having it processed 12 times, by all objects using "mc146818rtc.h", include it directly where used.
--- hw/rtc/mc146818rtc.c | 1 + hw/timer/hpet.c | 1 + include/hw/rtc/mc146818rtc.h | 1 - 3 files changed, 2 insertions(+), 1 deletion(-)
hw/rtc/mc146818rtc.c +1 -0
@@ -35,6 +35,7 @@#include "sysemu/reset.h" #include "sysemu/runstate.h" #include "hw/rtc/mc146818rtc.h" +#include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "qapi/error.h" #include "qapi/qapi-commands-misc-target.h"
hw/timer/hpet.c +1 -0
@@ -34,6 +34,7 @@#include "hw/timer/hpet.h" #include "hw/sysbus.h" #include "hw/rtc/mc146818rtc.h" +#include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "hw/timer/i8254.h"
include/hw/rtc/mc146818rtc.h +0 -1
@@ -10,7 +10,6 @@#define HW_RTC_MC146818RTC_H #include "hw/isa/isa.h" -#include "hw/rtc/mc146818rtc_regs.h" #define TYPE_MC146818_RTC "mc146818rtc"
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 12/14] hw/rtc/mc146818: Include mc146818rtc_regs.h a bit less
Le 04/10/2019 à 01:04, Philippe Mathieu-Daudé a écrit :
Quoted 42 lines
Only 2 source files require the "
mc146818rtc_regs.h" header. Instead of having it processed 12 times, by all objects using "mc146818rtc.h", include it directly where used.Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/rtc/mc146818rtc.c | 1 + hw/timer/hpet.c | 1 + include/hw/rtc/mc146818rtc.h | 1 - 3 files changed, 2 insertions(+), 1 deletion(-)hw/rtc/mc146818rtc.c +1
-0@@ -35,6 +35,7 @@#include "sysemu/reset.h" #include "sysemu/runstate.h" #include "hw/rtc/mc146818rtc.h" +#include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "qapi/error.h" #include "qapi/qapi-commands-misc-target.h" hw/timer/hpet.c +1
-0@@ -34,6 +34,7 @@#include "hw/timer/hpet.h" #include "hw/sysbus.h" #include "hw/rtc/mc146818rtc.h" +#include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "hw/timer/i8254.h" include/hw/rtc/mc146818rtc.h +0
-0
include/hw/rtc/mc146818rtc.h line 15
Quoted 7 lines
include/hw/rtc/mc146818rtc.h +0
-1@@ -10,7 +10,6 @@#define HW_RTC_MC146818RTC_H #include "hw/isa/isa.h" -#include "hw/rtc/mc146818rtc_regs.h" #define TYPE_MC146818_RTC "mc146818rtc"
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 13/14 hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include
In reply to Philippe Mathieu-DaudéThe "hw/ptimer.h" header is not used, remove it.
--- hw/rtc/xlnx-zynqmp-rtc.c | 1 - 1 file changed, 1 deletion(-)
hw/rtc/xlnx-zynqmp-rtc.c +0 -1
@@ -32,7 +32,6 @@#include "qemu/log.h" #include "qemu/module.h" #include "hw/irq.h" -#include "hw/ptimer.h" #include "qemu/cutils.h" #include "sysemu/sysemu.h" #include "trace.h"
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 13/14] hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include
Le 04/10/2019 à 01:04, Philippe Mathieu-Daudé a écrit :
Quoted 14 lines
The "
hw/ptimer.h" header is not used, remove it.Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/rtc/xlnx-zynqmp-rtc.c | 1 - 1 file changed, 1 deletion(-)hw/rtc/xlnx-zynqmp-rtc.c +0
-0
hw/rtc/xlnx-zynqmp-rtc.c line 37
Quoted 7 lines
hw/rtc/xlnx-zynqmp-rtc.c +0
-1@@ -32,7 +32,6 @@#include "qemu/log.h" #include "qemu/module.h" #include "hw/irq.h" -#include "hw/ptimer.h" #include "qemu/cutils.h" #include "sysemu/sysemu.h" #include "trace.h"
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 14/14 hw/rtc/aspeed_rtc: Remove unused includes
In reply to Philippe Mathieu-DaudéThe system <stdint.h> include is already provided by "osdep.h" (the scripts/clean-includes file clean such headers).
Commit 64552b6be47 suggests we don't need to include "hw/irq.h":
Move the qemu_irq and qemu_irq_handler typedefs from hw/irq.h to qemu/typedefs.h, and then include hw/irq.h only where it's still needed.
--- include/hw/rtc/aspeed_rtc.h | 3 --- 1 file changed, 3 deletions(-)
include/hw/rtc/aspeed_rtc.h +0 -3
@@ -8,9 +8,6 @@ #ifndef HW_RTC_ASPEED_RTC_H #define HW_RTC_ASPEED_RTC_H -#include <stdint.h> - -#include "hw/irq.h" #include "hw/sysbus.h" typedef struct AspeedRtcState {
Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [PATCH v2 14/14] hw/rtc/aspeed_rtc: Remove unused includes
Le 04/10/2019 à 01:04, Philippe Mathieu-Daudé a écrit :
Quoted 22 lines
The system <
stdint.h> include is already provided by "osdep.h" (thescripts/clean-includesfile clean such headers).Commit
64552b6be47suggests we don't need to include "hw/irq.h":Move the
qemu_irqandqemu_irq_handlertypedefs fromhw/irq.htoqemu/typedefs.h, and then includehw/irq.honly where it's still needed.Reviewed-by Cédric Le Goater <[email protected]>Reviewed-by Alistair Francis <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/rtc/aspeed_rtc.h | 3 --- 1 file changed, 3 deletions(-)include/hw/rtc/aspeed_rtc.h +0
-0
include/hw/rtc/aspeed_rtc.h line 13
Quoted 9 lines
include/hw/rtc/aspeed_rtc.h +0
-3@@ -8,9 +8,6 @@ #ifndef HW_RTC_ASPEED_RTC_H #define HW_RTC_ASPEED_RTC_H -#include <stdint.h> - -#include "hw/irq.h" #include "hw/sysbus.h" typedef struct AspeedRtcState {
Applied to my trivial-patches branch.
Thanks,
Laurent
Quoted 6 lines · Philippe Mathieu-Daudé
Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
- addressed review comments (described in patches 3 and 4)
- added R-b/A-b tagsWhole series now reviewed.
for the arm parts:
-- PMM
Quoted 11 lines · Peter Maydell
Quoted 6 lines · Philippe Mathieu-Daudé
Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
- addressed review comments (described in patches 3 and 4)
- added R-b/A-b tagsWhole series now reviewed.
for the arm parts:
Acked-by Peter Maydell <[email protected]>
I'm going to queue this series in qemu-trivial queue, so I guess your Acked-by is for patches 2, 10 and 11?
Thanks,
Laurent
Quoted 7 lines · Laurent Vivier
Quoted 6 lines · Peter Maydell
Quoted 5 lines · Philippe Mathieu-Daudé
Since v1: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg03334.html
- addressed review comments (described in patches 3 and 4)
- added R-b/A-b tags
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Whole series now reviewed.
for the arm parts:
Acked-by Peter Maydell <[email protected]>I'm going to queue this series in qemu-trivial queue, so I guess your Acked-by is for patches 2, 10 and 11?
ARM: 2, 7-11, 13-14:
hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory
hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include hw/rtc/aspeed_rtc: Remove unused includes
PPC: 3-5
hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory
hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory
SPARC: 6
hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory