diff options
author | Philippe Mathieu-Daudé | 2019-10-04 01:03:56 +0200 |
---|---|---|
committer | Laurent Vivier | 2019-10-24 20:23:15 +0200 |
commit | 2811ac30596644c1bfc3eee4e2ebffd2a107c3e4 (patch) | |
tree | 7a4d1da706036cb03f4d18e46618a7f2ac1a314e | |
parent | hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory (diff) | |
download | qemu-2811ac30596644c1bfc3eee4e2ebffd2a107c3e4.tar.gz qemu-2811ac30596644c1bfc3eee4e2ebffd2a107c3e4.tar.xz qemu-2811ac30596644c1bfc3eee4e2ebffd2a107c3e4.zip |
hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory
Move RTC devices under the hw/rtc/ subdirectory.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Message-Id: <20191003230404.19384-7-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r-- | MAINTAINERS | 4 | ||||
-rw-r--r-- | hw/rtc/Kconfig | 3 | ||||
-rw-r--r-- | hw/rtc/Makefile.objs | 1 | ||||
-rw-r--r-- | hw/rtc/sun4v-rtc.c (renamed from hw/timer/sun4v-rtc.c) | 2 | ||||
-rw-r--r-- | hw/rtc/trace-events | 4 | ||||
-rw-r--r-- | hw/sparc64/niagara.c | 2 | ||||
-rw-r--r-- | hw/timer/Kconfig | 3 | ||||
-rw-r--r-- | hw/timer/Makefile.objs | 1 | ||||
-rw-r--r-- | hw/timer/trace-events | 4 | ||||
-rw-r--r-- | include/hw/rtc/sun4v-rtc.h | 19 | ||||
-rw-r--r-- | include/hw/timer/sun4v-rtc.h | 1 |
11 files changed, 31 insertions, 13 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index ba0d1906aa..a7de5e2d12 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1163,8 +1163,8 @@ Sun4v M: Artyom Tarasenko <atar4qemu@gmail.com> 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 <chouteau@adacore.com> diff --git a/hw/rtc/Kconfig b/hw/rtc/Kconfig index 434b20b2b1..cc7fead764 100644 --- a/hw/rtc/Kconfig +++ b/hw/rtc/Kconfig @@ -10,3 +10,6 @@ config PL031 config MC146818RTC bool + +config SUN4V_RTC + bool diff --git a/hw/rtc/Makefile.objs b/hw/rtc/Makefile.objs index 89e8e48c64..4621b37bc2 100644 --- a/hw/rtc/Makefile.objs +++ b/hw/rtc/Makefile.objs @@ -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 diff --git a/hw/timer/sun4v-rtc.c b/hw/rtc/sun4v-rtc.c index 54272a822f..ada01b5774 100644 --- a/hw/timer/sun4v-rtc.c +++ b/hw/rtc/sun4v-rtc.c @@ -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" diff --git a/hw/rtc/trace-events b/hw/rtc/trace-events index 54c94ac557..ac9e0e0fba 100644 --- a/hw/rtc/trace-events +++ b/hw/rtc/trace-events @@ -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" diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c index 5987693659..5eb2d097b9 100644 --- a/hw/sparc64/niagara.c +++ b/hw/sparc64/niagara.c @@ -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" diff --git a/hw/timer/Kconfig b/hw/timer/Kconfig index a6b668b255..b04c928136 100644 --- a/hw/timer/Kconfig +++ b/hw/timer/Kconfig @@ -35,9 +35,6 @@ config ALLWINNER_A10_PIT config STM32F2XX_TIMER bool -config SUN4V_RTC - bool - config CMSDK_APB_TIMER bool select PTIMER diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs index 2fb12162a6..034bd30255 100644 --- a/hw/timer/Makefile.objs +++ b/hw/timer/Makefile.objs @@ -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 diff --git a/hw/timer/trace-events b/hw/timer/trace-events index 6936fe8573..ce34b967db 100644 --- a/hw/timer/trace-events +++ b/hw/timer/trace-events @@ -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" diff --git a/include/hw/rtc/sun4v-rtc.h b/include/hw/rtc/sun4v-rtc.h new file mode 100644 index 0000000000..fd868f6ed2 --- /dev/null +++ b/include/hw/rtc/sun4v-rtc.h @@ -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 diff --git a/include/hw/timer/sun4v-rtc.h b/include/hw/timer/sun4v-rtc.h deleted file mode 100644 index 407278f918..0000000000 --- a/include/hw/timer/sun4v-rtc.h +++ /dev/null @@ -1 +0,0 @@ -void sun4v_rtc_init(hwaddr addr); |