[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 09/13] hw/timer/allwinner: Rename AwA10TimerContext as Allwin
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 09/13] hw/timer/allwinner: Rename AwA10TimerContext as AllwinnerTmrState |
Date: |
Thu, 19 Dec 2019 19:51:23 +0100 |
This structure will be common to various Allwinner timer
controllers, rename it.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
include/hw/timer/allwinner-a10-pit.h | 6 +++---
hw/timer/allwinner-a10-pit.c | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/hw/timer/allwinner-a10-pit.h
b/include/hw/timer/allwinner-a10-pit.h
index 8c64c33f01..3a47633cc4 100644
--- a/include/hw/timer/allwinner-a10-pit.h
+++ b/include/hw/timer/allwinner-a10-pit.h
@@ -10,7 +10,7 @@
typedef struct AwA10PITState AwA10PITState;
-typedef struct AwA10TimerContext {
+typedef struct AllwinnerTmrState {
AwA10PITState *container;
int index;
ptimer_state *ptimer;
@@ -18,14 +18,14 @@ typedef struct AwA10TimerContext {
uint32_t control;
uint32_t interval;
uint32_t count;
-} AwA10TimerContext;
+} AllwinnerTmrState;
struct AwA10PITState {
/*< private >*/
SysBusDevice parent_obj;
/*< public >*/
size_t timer_count;
- AwA10TimerContext timer[AW_PIT_TIMER_MAX];
+ AllwinnerTmrState timer[AW_PIT_TIMER_MAX];
MemoryRegion iomem;
uint32_t clk_freq[4];
diff --git a/hw/timer/allwinner-a10-pit.c b/hw/timer/allwinner-a10-pit.c
index 3f47588703..ecfc198937 100644
--- a/hw/timer/allwinner-a10-pit.c
+++ b/hw/timer/allwinner-a10-pit.c
@@ -234,10 +234,10 @@ static const VMStateDescription vmstate_aw_timer = {
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
- VMSTATE_UINT32(control, AwA10TimerContext),
- VMSTATE_UINT32(interval, AwA10TimerContext),
- VMSTATE_UINT32(count, AwA10TimerContext),
- VMSTATE_PTIMER(ptimer, AwA10TimerContext),
+ VMSTATE_UINT32(control, AllwinnerTmrState),
+ VMSTATE_UINT32(interval, AllwinnerTmrState),
+ VMSTATE_UINT32(count, AllwinnerTmrState),
+ VMSTATE_PTIMER(ptimer, AllwinnerTmrState),
VMSTATE_END_OF_LIST()
}
};
@@ -252,7 +252,7 @@ static const VMStateDescription vmstate_a10_pit = {
VMSTATE_STRUCT_ARRAY(timer, AwA10PITState,
AW_PIT_TIMER_MAX,
0, vmstate_aw_timer,
- AwA10TimerContext),
+ AllwinnerTmrState),
VMSTATE_UINT32(watch_dog_mode, AwA10PITState),
VMSTATE_UINT32(watch_dog_control, AwA10PITState),
VMSTATE_UINT32(count_lo, AwA10PITState),
@@ -289,7 +289,7 @@ static void a10_pit_reset(DeviceState *dev)
static void a10_pit_timer_cb(void *opaque)
{
- AwA10TimerContext *tc = opaque;
+ AllwinnerTmrState *tc = opaque;
AwA10PITState *s = tc->container;
uint8_t i = tc->index;
@@ -319,7 +319,7 @@ static void a10_pit_init(Object *obj)
sysbus_init_mmio(sbd, &s->iomem);
for (i = 0; i < s->timer_count; i++) {
- AwA10TimerContext *tc = &s->timer[i];
+ AllwinnerTmrState *tc = &s->timer[i];
tc->container = s;
tc->index = i;
--
2.21.0
- [RFC PATCH 00/13] hw/timer/allwinner: Make it reusable, Philippe Mathieu-Daudé, 2019/12/19
- [PATCH 01/13] hw/timer/allwinner: Use the AW_A10_PIT_TIMER_NR definition, Philippe Mathieu-Daudé, 2019/12/19
- [PATCH 03/13] hw/timer/allwinner: Remove unused definitions, Philippe Mathieu-Daudé, 2019/12/19
- [PATCH 02/13] hw/timer/allwinner: Add AW_PIT_TIMER_MAX definition, Philippe Mathieu-Daudé, 2019/12/19
- [PATCH 04/13] hw/timer/allwinner: Move definitions from header to source, Philippe Mathieu-Daudé, 2019/12/19
- [RFC PATCH 05/13] hw/timer/allwinner: Rename the ptimer field, Philippe Mathieu-Daudé, 2019/12/19
- [RFC PATCH 06/13] hw/timer/allwinner: Rename 'timer_context' as 'timer', Philippe Mathieu-Daudé, 2019/12/19
- [RFC PATCH 07/13] hw/timer/allwinner: Move timer specific fields into AwA10TimerContext, Philippe Mathieu-Daudé, 2019/12/19
- [RFC PATCH 08/13] hw/timer/allwinner: Add a timer_count field, Philippe Mathieu-Daudé, 2019/12/19
- [RFC PATCH 09/13] hw/timer/allwinner: Rename AwA10TimerContext as AllwinnerTmrState,
Philippe Mathieu-Daudé <=
- [RFC PATCH 10/13] hw/timer/allwinner: Rename AwA10PITState as AllwinnerTmrCtrlState, Philippe Mathieu-Daudé, 2019/12/19
- [RFC PATCH 11/13] hw/timer/allwinner: Introduce TYPE_AW_COMMON_PIT abstract device, Philippe Mathieu-Daudé, 2019/12/19
- [RFC PATCH 12/13] hw/timer/allwinner: Rename AW_A10_PIT() as AW_TIMER_CTRL(), Philippe Mathieu-Daudé, 2019/12/19
- [RFC PATCH 13/13] hw/timer/allwinner: Rename functions not specific to the A10 SoC, Philippe Mathieu-Daudé, 2019/12/19
- Re: [RFC PATCH 00/13] hw/timer/allwinner: Make it reusable, Niek Linnenbank, 2019/12/20