Message ID | 20191003230404.19384-12-philmd@redhat.com |
---|---|
State | New |
Headers | show |
Series | hw: Split RTC devices from hw/timer/ to hw/rtc/ | expand |
Le 04/10/2019 à 01:04, Philippe Mathieu-Daudé a écrit : > Move RTC devices under the hw/rtc/ subdirectory. > > Reviewed-by: Cédric Le Goater <clg@kaod.org> > Reviewed-by: Alistair Francis <alistair.francis@wdc.com> > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > 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%) > > diff --git a/hw/rtc/Makefile.objs b/hw/rtc/Makefile.objs > index 3d4763fc26..8dc9fcd3a9 100644 > --- a/hw/rtc/Makefile.objs > +++ b/hw/rtc/Makefile.objs > @@ -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 > diff --git a/hw/timer/aspeed_rtc.c b/hw/rtc/aspeed_rtc.c > similarity index 99% > rename from hw/timer/aspeed_rtc.c > rename to hw/rtc/aspeed_rtc.c > index 5313017353..3ca1183558 100644 > --- a/hw/timer/aspeed_rtc.c > +++ b/hw/rtc/aspeed_rtc.c > @@ -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" > diff --git a/hw/rtc/trace-events b/hw/rtc/trace-events > index 7f1945ad4c..d6749f4616 100644 > --- a/hw/rtc/trace-events > +++ b/hw/rtc/trace-events > @@ -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 > diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs > index 33191d74cb..83091770df 100644 > --- a/hw/timer/Makefile.objs > +++ b/hw/timer/Makefile.objs > @@ -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 > diff --git a/hw/timer/trace-events b/hw/timer/trace-events > index 1459d07237..e18b87fc96 100644 > --- a/hw/timer/trace-events > +++ b/hw/timer/trace-events > @@ -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" > diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h > index ab5052b12c..5a443006ed 100644 > --- a/include/hw/arm/aspeed_soc.h > +++ b/include/hw/arm/aspeed_soc.h > @@ -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" > diff --git a/include/hw/timer/aspeed_rtc.h b/include/hw/rtc/aspeed_rtc.h > similarity index 84% > rename from include/hw/timer/aspeed_rtc.h > rename to include/hw/rtc/aspeed_rtc.h > index 15ba42912b..3fde854ad9 100644 > --- a/include/hw/timer/aspeed_rtc.h > +++ b/include/hw/rtc/aspeed_rtc.h > @@ -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 */ > Applied to my trivial-patches branch. Thanks, Laurent
diff --git a/hw/rtc/Makefile.objs b/hw/rtc/Makefile.objs index 3d4763fc26..8dc9fcd3a9 100644 --- a/hw/rtc/Makefile.objs +++ b/hw/rtc/Makefile.objs @@ -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 diff --git a/hw/timer/aspeed_rtc.c b/hw/rtc/aspeed_rtc.c similarity index 99% rename from hw/timer/aspeed_rtc.c rename to hw/rtc/aspeed_rtc.c index 5313017353..3ca1183558 100644 --- a/hw/timer/aspeed_rtc.c +++ b/hw/rtc/aspeed_rtc.c @@ -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" diff --git a/hw/rtc/trace-events b/hw/rtc/trace-events index 7f1945ad4c..d6749f4616 100644 --- a/hw/rtc/trace-events +++ b/hw/rtc/trace-events @@ -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 diff --git a/hw/timer/Makefile.objs b/hw/timer/Makefile.objs index 33191d74cb..83091770df 100644 --- a/hw/timer/Makefile.objs +++ b/hw/timer/Makefile.objs @@ -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 diff --git a/hw/timer/trace-events b/hw/timer/trace-events index 1459d07237..e18b87fc96 100644 --- a/hw/timer/trace-events +++ b/hw/timer/trace-events @@ -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" diff --git a/include/hw/arm/aspeed_soc.h b/include/hw/arm/aspeed_soc.h index ab5052b12c..5a443006ed 100644 --- a/include/hw/arm/aspeed_soc.h +++ b/include/hw/arm/aspeed_soc.h @@ -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" diff --git a/include/hw/timer/aspeed_rtc.h b/include/hw/rtc/aspeed_rtc.h similarity index 84% rename from include/hw/timer/aspeed_rtc.h rename to include/hw/rtc/aspeed_rtc.h index 15ba42912b..3fde854ad9 100644 --- a/include/hw/timer/aspeed_rtc.h +++ b/include/hw/rtc/aspeed_rtc.h @@ -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 */