qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org, Niek Linnenbank <nieklinnenbank@gmail.com>
Cc: "Beniamino Galvani" <b.galvani@gmail.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [RFC PATCH 12/13] hw/timer/allwinner: Rename AW_A10_PIT() as AW_TIMER_CTRL()
Date: Thu, 19 Dec 2019 19:51:26 +0100	[thread overview]
Message-ID: <20191219185127.24388-13-f4bug@amsat.org> (raw)
In-Reply-To: <20191219185127.24388-1-f4bug@amsat.org>

This macro is now used by different Allwinner timer controllers,
rename it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/timer/allwinner-a10-pit.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/timer/allwinner-a10-pit.c b/hw/timer/allwinner-a10-pit.c
index ad409b96a1..7413f046cc 100644
--- a/hw/timer/allwinner-a10-pit.c
+++ b/hw/timer/allwinner-a10-pit.c
@@ -51,8 +51,8 @@
 
 #define AW_A10_PIT_DEFAULT_CLOCK    0x4
 
-#define AW_A10_PIT(obj) \
-    OBJECT_CHECK(AllwinnerTmrCtrlState, (obj), TYPE_AW_A10_PIT)
+#define AW_TIMER_CTRL(obj) \
+    OBJECT_CHECK(AllwinnerTmrCtrlState, (obj), TYPE_AW_COMMON_PIT)
 
 typedef struct AllwinnerTmrCtrlClass {
     /*< private >*/
@@ -80,7 +80,7 @@ static void a10_pit_update_irq(AllwinnerTmrCtrlState *s)
 
 static uint64_t a10_pit_read(void *opaque, hwaddr offset, unsigned size)
 {
-    AllwinnerTmrCtrlState *s = AW_A10_PIT(opaque);
+    AllwinnerTmrCtrlState *s = AW_TIMER_CTRL(opaque);
     uint8_t index;
 
     switch (offset) {
@@ -144,7 +144,7 @@ static void a10_pit_set_freq(AllwinnerTmrCtrlState *s, int index)
 static void a10_pit_write(void *opaque, hwaddr offset, uint64_t value,
                             unsigned size)
 {
-     AllwinnerTmrCtrlState *s = AW_A10_PIT(opaque);
+     AllwinnerTmrCtrlState *s = AW_TIMER_CTRL(opaque);
      uint8_t index;
 
     switch (offset) {
@@ -278,7 +278,7 @@ static const VMStateDescription vmstate_a10_pit = {
 
 static void a10_pit_reset(DeviceState *dev)
 {
-    AllwinnerTmrCtrlState *s = AW_A10_PIT(dev);
+    AllwinnerTmrCtrlState *s = AW_TIMER_CTRL(dev);
     uint8_t i;
 
     s->irq_enable = 0;
@@ -319,7 +319,7 @@ static void a10_pit_timer_cb(void *opaque)
 
 static void aw_pit_instance_init(Object *obj)
 {
-    AllwinnerTmrCtrlState *s = AW_A10_PIT(obj);
+    AllwinnerTmrCtrlState *s = AW_TIMER_CTRL(obj);
     AllwinnerTmrCtrlClass *c = AW_TIMER_GET_CLASS(s);
     SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
     uint8_t i;
@@ -330,7 +330,7 @@ static void aw_pit_instance_init(Object *obj)
         sysbus_init_irq(sbd, &s->timer[i].irq);
     }
     memory_region_init_io(&s->iomem, OBJECT(s), &a10_pit_ops, s,
-                          TYPE_AW_A10_PIT, c->region_size);
+                          TYPE_AW_COMMON_PIT, c->region_size);
     sysbus_init_mmio(sbd, &s->iomem);
 
     for (i = 0; i < s->timer_count; i++) {
-- 
2.21.0



  parent reply	other threads:[~2019-12-19 19:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 18:51 [RFC PATCH 00/13] hw/timer/allwinner: Make it reusable Philippe Mathieu-Daudé
2019-12-19 18:51 ` [PATCH 01/13] hw/timer/allwinner: Use the AW_A10_PIT_TIMER_NR definition Philippe Mathieu-Daudé
2019-12-20 21:19   ` Niek Linnenbank
2019-12-19 18:51 ` [PATCH 02/13] hw/timer/allwinner: Add AW_PIT_TIMER_MAX definition Philippe Mathieu-Daudé
2019-12-20 21:27   ` Niek Linnenbank
2019-12-19 18:51 ` [PATCH 03/13] hw/timer/allwinner: Remove unused definitions Philippe Mathieu-Daudé
2019-12-20 21:36   ` Niek Linnenbank
2019-12-19 18:51 ` [PATCH 04/13] hw/timer/allwinner: Move definitions from header to source Philippe Mathieu-Daudé
2019-12-20 21:41   ` Niek Linnenbank
2019-12-19 18:51 ` [RFC PATCH 05/13] hw/timer/allwinner: Rename the ptimer field Philippe Mathieu-Daudé
2019-12-19 18:51 ` [RFC PATCH 06/13] hw/timer/allwinner: Rename 'timer_context' as 'timer' Philippe Mathieu-Daudé
2019-12-19 18:51 ` [RFC PATCH 07/13] hw/timer/allwinner: Move timer specific fields into AwA10TimerContext Philippe Mathieu-Daudé
2019-12-19 18:51 ` [RFC PATCH 08/13] hw/timer/allwinner: Add a timer_count field Philippe Mathieu-Daudé
2019-12-19 18:51 ` [RFC PATCH 09/13] hw/timer/allwinner: Rename AwA10TimerContext as AllwinnerTmrState Philippe Mathieu-Daudé
2019-12-19 18:51 ` [RFC PATCH 10/13] hw/timer/allwinner: Rename AwA10PITState as AllwinnerTmrCtrlState Philippe Mathieu-Daudé
2019-12-19 18:51 ` [RFC PATCH 11/13] hw/timer/allwinner: Introduce TYPE_AW_COMMON_PIT abstract device Philippe Mathieu-Daudé
2019-12-20 21:11   ` Niek Linnenbank
2019-12-19 18:51 ` Philippe Mathieu-Daudé [this message]
2019-12-19 18:51 ` [RFC PATCH 13/13] hw/timer/allwinner: Rename functions not specific to the A10 SoC Philippe Mathieu-Daudé
2019-12-20 20:53 ` [RFC PATCH 00/13] hw/timer/allwinner: Make it reusable Niek Linnenbank

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191219185127.24388-13-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=b.galvani@gmail.com \
    --cc=nieklinnenbank@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).