From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
qemu-arm@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"Sergey Kambalin" <serg.oker@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v2 06/19] hw/timer/arm_timer: Rename SP804State -> SP804Timer
Date: Tue, 4 Jul 2023 16:49:59 +0200 [thread overview]
Message-ID: <20230704145012.49870-7-philmd@linaro.org> (raw)
In-Reply-To: <20230704145012.49870-1-philmd@linaro.org>
Following docs/devel/style.rst guidelines, rename SP804State
as SP804Timer.
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/timer/arm_timer.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/timer/arm_timer.c b/hw/timer/arm_timer.c
index 8a2939483f..41045de8ed 100644
--- a/hw/timer/arm_timer.c
+++ b/hw/timer/arm_timer.c
@@ -192,9 +192,9 @@ static ArmTimer *arm_timer_init(uint32_t freq)
*/
#define TYPE_SP804 "sp804"
-OBJECT_DECLARE_SIMPLE_TYPE(SP804State, SP804)
+OBJECT_DECLARE_SIMPLE_TYPE(SP804Timer, SP804)
-struct SP804State {
+struct SP804Timer {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -214,7 +214,7 @@ static const uint8_t sp804_ids[] = {
/* Merge the IRQs from the two component devices. */
static void sp804_set_irq(void *opaque, int irq, int level)
{
- SP804State *s = opaque;
+ SP804Timer *s = opaque;
s->level[irq] = level;
qemu_set_irq(s->irq, s->level[0] || s->level[1]);
@@ -223,7 +223,7 @@ static void sp804_set_irq(void *opaque, int irq, int level)
static uint64_t sp804_read(void *opaque, hwaddr offset,
unsigned size)
{
- SP804State *s = opaque;
+ SP804Timer *s = opaque;
if (offset < 0x20) {
return arm_timer_read(s->timer[0], offset);
@@ -255,7 +255,7 @@ static uint64_t sp804_read(void *opaque, hwaddr offset,
static void sp804_write(void *opaque, hwaddr offset,
uint64_t value, unsigned size)
{
- SP804State *s = opaque;
+ SP804Timer *s = opaque;
if (offset < 0x20) {
arm_timer_write(s->timer[0], offset, value);
@@ -283,14 +283,14 @@ static const VMStateDescription vmstate_sp804 = {
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
- VMSTATE_INT32_ARRAY(level, SP804State, 2),
+ VMSTATE_INT32_ARRAY(level, SP804Timer, 2),
VMSTATE_END_OF_LIST()
}
};
static void sp804_init(Object *obj)
{
- SP804State *s = SP804(obj);
+ SP804Timer *s = SP804(obj);
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
sysbus_init_irq(sbd, &s->irq);
@@ -301,7 +301,7 @@ static void sp804_init(Object *obj)
static void sp804_realize(DeviceState *dev, Error **errp)
{
- SP804State *s = SP804(dev);
+ SP804Timer *s = SP804(dev);
s->timer[0] = arm_timer_init(s->freq0);
s->timer[1] = arm_timer_init(s->freq1);
@@ -310,8 +310,8 @@ static void sp804_realize(DeviceState *dev, Error **errp)
}
static Property sp804_properties[] = {
- DEFINE_PROP_UINT32("freq0", SP804State, freq0, 1000000),
- DEFINE_PROP_UINT32("freq1", SP804State, freq1, 1000000),
+ DEFINE_PROP_UINT32("freq0", SP804Timer, freq0, 1000000),
+ DEFINE_PROP_UINT32("freq1", SP804Timer, freq1, 1000000),
DEFINE_PROP_END_OF_LIST(),
};
@@ -405,7 +405,7 @@ static const TypeInfo arm_timer_types[] = {
}, {
.name = TYPE_SP804,
.parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(SP804State),
+ .instance_size = sizeof(SP804Timer),
.instance_init = sp804_init,
.class_init = sp804_class_init,
}
--
2.38.1
next prev parent reply other threads:[~2023-07-04 14:52 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 14:49 [PATCH v2 00/19] hw/timer/arm_timer: QOM'ify ARM_TIMER and correct sysbus/irq in ICP_PIT Philippe Mathieu-Daudé
2023-07-04 14:49 ` [PATCH v2 01/19] hw/timer/arm_timer: Declare QOM types using DEFINE_TYPES() macro Philippe Mathieu-Daudé
2023-07-05 15:25 ` Richard Henderson
2023-07-04 14:49 ` [PATCH v2 02/19] hw/timer/arm_timer: Remove pointless cast from void * Philippe Mathieu-Daudé
2023-07-05 15:26 ` Richard Henderson
2023-07-04 14:49 ` [PATCH v2 03/19] hw/timer/arm_timer: Move SP804 code around Philippe Mathieu-Daudé
2023-07-05 15:26 ` Richard Henderson
2023-07-04 14:49 ` [PATCH v2 04/19] hw/timer/arm_timer: CamelCase rename icp_pit_state -> IntegratorPIT Philippe Mathieu-Daudé
2023-07-05 15:27 ` Richard Henderson
2023-07-04 14:49 ` [PATCH v2 05/19] hw/timer/arm_timer: CamelCase rename arm_timer_state -> ArmTimer Philippe Mathieu-Daudé
2023-07-05 15:28 ` Richard Henderson
2023-07-04 14:49 ` Philippe Mathieu-Daudé [this message]
2023-07-05 15:33 ` [PATCH v2 06/19] hw/timer/arm_timer: Rename SP804State -> SP804Timer Richard Henderson
2023-07-04 14:50 ` [PATCH v2 07/19] hw/timer/arm_timer: Rename TYPE_SP804 -> TYPE_SP804_TIMER Philippe Mathieu-Daudé
2023-07-05 15:34 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 08/19] hw/timer/arm_timer: Extract arm_timer_reset_hold() Philippe Mathieu-Daudé
2023-07-05 15:34 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 09/19] hw/timer/arm_timer: Convert read/write handlers to MemoryRegionOps ones Philippe Mathieu-Daudé
2023-07-05 15:35 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 10/19] hw/timer/arm_timer: Rename arm_timer_init() -> arm_timer_new() Philippe Mathieu-Daudé
2023-07-05 15:35 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 11/19] hw/timer/arm_timer: Convert ArmTimer::freq to uint32_t type Philippe Mathieu-Daudé
2023-07-05 15:35 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 12/19] hw/timer/arm_timer: Use array of frequency in SP804Timer Philippe Mathieu-Daudé
2023-07-05 15:36 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 13/19] hw/timer/arm_timer: Iterate on timers using for() loop statement Philippe Mathieu-Daudé
2023-07-05 15:37 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 14/19] hw/timer/arm_timer: Pass timer output IRQ as parameter to arm_timer_new Philippe Mathieu-Daudé
2023-07-05 15:39 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 15/19] hw/timer/arm_timer: Fix misuse of SysBus IRQ in IntegratorPIT Philippe Mathieu-Daudé
2023-07-05 15:40 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 16/19] hw/timer/arm_timer: Extract icp_pit_realize() from icp_pit_init() Philippe Mathieu-Daudé
2023-07-05 15:41 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 17/19] hw/timer/arm_timer: QDev'ify ARM_TIMER Philippe Mathieu-Daudé
2023-07-24 15:01 ` Peter Maydell
2023-07-04 14:50 ` [PATCH v2 18/19] hw/timer/arm_timer: Map ARM_TIMER MMIO regions into IntegratorPIT Philippe Mathieu-Daudé
2023-07-05 15:44 ` Richard Henderson
2023-07-04 14:50 ` [PATCH v2 19/19] hw/timer/arm_timer: Map ARM_TIMER MMIO regions into SP804Timer Philippe Mathieu-Daudé
2023-07-05 15:44 ` Richard Henderson
2023-07-04 15:10 ` [PATCH v2 00/19] hw/timer/arm_timer: QOM'ify ARM_TIMER and correct sysbus/irq in ICP_PIT Philippe Mathieu-Daudé
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=20230704145012.49870-7-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=serg.oker@gmail.com \
--cc=thuth@redhat.com \
/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).