[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 06/14] hw: Move sun4v hypervisor RTC from hw/timer/ to hw/
From: |
Laurent Vivier |
Subject: |
Re: [PATCH v2 06/14] hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory |
Date: |
Thu, 24 Oct 2019 20:23:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
Le 04/10/2019 à 01:03, Philippe Mathieu-Daudé a écrit :
> Move RTC devices under the hw/rtc/ subdirectory.
>
> Reviewed-by: Alistair Francis <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> 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.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 0dfaa05d17..31e4fbf579 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1165,8 +1165,8 @@ Sun4v
> M: Artyom Tarasenko <address@hidden>
> 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 <address@hidden>
> 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
> similarity index 98%
> rename from hw/timer/sun4v-rtc.c
> rename to 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 167143bffe..dfa0817eae 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);
>
Applied to my trivial-patches branch.
Thanks,
Laurent
- Re: [PATCH v2 02/14] hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory, (continued)
- [PATCH v2 03/14] hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03
- [PATCH v2 04/14] hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03
- [PATCH v2 05/14] hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03
- [PATCH v2 06/14] hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03
- [PATCH v2 07/14] hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03
- [PATCH v2 08/14] hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03
- [PATCH v2 09/14] hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03
- [PATCH v2 10/14] hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03
- [PATCH v2 11/14] hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory, Philippe Mathieu-Daudé, 2019/10/03