From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Luc Michel" <luc@lmichel.fr>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH v2 06/25] hw/timer/cmsdk-apb-timer: Rename CMSDKAPBTIMER struct to CMSDKAPBTimer
Date: Thu, 28 Jan 2021 11:41:26 +0000 [thread overview]
Message-ID: <20210128114145.20536-7-peter.maydell@linaro.org> (raw)
In-Reply-To: <20210128114145.20536-1-peter.maydell@linaro.org>
The state struct for the CMSDK APB timer device doesn't follow our
usual naming convention of camelcase -- "CMSDK" and "APB" are both
acronyms, but "TIMER" is not so should not be all-uppercase.
Globally rename the struct to "CMSDKAPBTimer" (bringing it into line
with CMSDKAPBWatchdog and CMSDKAPBDualTimer; CMSDKAPBUART remains
as-is because "UART" is an acronym).
Commit created with:
perl -p -i -e 's/CMSDKAPBTIMER/CMSDKAPBTimer/g' hw/timer/cmsdk-apb-timer.c include/hw/arm/armsse.h include/hw/timer/cmsdk-apb-timer.h
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Message-id: 20210121190622.22000-7-peter.maydell@linaro.org
---
include/hw/arm/armsse.h | 6 +++---
include/hw/timer/cmsdk-apb-timer.h | 4 ++--
hw/timer/cmsdk-apb-timer.c | 28 ++++++++++++++--------------
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/include/hw/arm/armsse.h b/include/hw/arm/armsse.h
index 77f86771c30..83f5e28c16e 100644
--- a/include/hw/arm/armsse.h
+++ b/include/hw/arm/armsse.h
@@ -153,9 +153,9 @@ struct ARMSSE {
TZPPC apb_ppc0;
TZPPC apb_ppc1;
TZMPC mpc[IOTS_NUM_MPC];
- CMSDKAPBTIMER timer0;
- CMSDKAPBTIMER timer1;
- CMSDKAPBTIMER s32ktimer;
+ CMSDKAPBTimer timer0;
+ CMSDKAPBTimer timer1;
+ CMSDKAPBTimer s32ktimer;
qemu_or_irq ppc_irq_orgate;
SplitIRQ sec_resp_splitter;
SplitIRQ ppc_irq_splitter[NUM_PPCS];
diff --git a/include/hw/timer/cmsdk-apb-timer.h b/include/hw/timer/cmsdk-apb-timer.h
index 0d80b2a48cd..baa009bb2da 100644
--- a/include/hw/timer/cmsdk-apb-timer.h
+++ b/include/hw/timer/cmsdk-apb-timer.h
@@ -18,9 +18,9 @@
#include "qom/object.h"
#define TYPE_CMSDK_APB_TIMER "cmsdk-apb-timer"
-OBJECT_DECLARE_SIMPLE_TYPE(CMSDKAPBTIMER, CMSDK_APB_TIMER)
+OBJECT_DECLARE_SIMPLE_TYPE(CMSDKAPBTimer, CMSDK_APB_TIMER)
-struct CMSDKAPBTIMER {
+struct CMSDKAPBTimer {
/*< private >*/
SysBusDevice parent_obj;
diff --git a/hw/timer/cmsdk-apb-timer.c b/hw/timer/cmsdk-apb-timer.c
index f85f1309f37..ae9c5422540 100644
--- a/hw/timer/cmsdk-apb-timer.c
+++ b/hw/timer/cmsdk-apb-timer.c
@@ -67,14 +67,14 @@ static const int timer_id[] = {
0x0d, 0xf0, 0x05, 0xb1, /* CID0..CID3 */
};
-static void cmsdk_apb_timer_update(CMSDKAPBTIMER *s)
+static void cmsdk_apb_timer_update(CMSDKAPBTimer *s)
{
qemu_set_irq(s->timerint, !!(s->intstatus & R_INTSTATUS_IRQ_MASK));
}
static uint64_t cmsdk_apb_timer_read(void *opaque, hwaddr offset, unsigned size)
{
- CMSDKAPBTIMER *s = CMSDK_APB_TIMER(opaque);
+ CMSDKAPBTimer *s = CMSDK_APB_TIMER(opaque);
uint64_t r;
switch (offset) {
@@ -106,7 +106,7 @@ static uint64_t cmsdk_apb_timer_read(void *opaque, hwaddr offset, unsigned size)
static void cmsdk_apb_timer_write(void *opaque, hwaddr offset, uint64_t value,
unsigned size)
{
- CMSDKAPBTIMER *s = CMSDK_APB_TIMER(opaque);
+ CMSDKAPBTimer *s = CMSDK_APB_TIMER(opaque);
trace_cmsdk_apb_timer_write(offset, value, size);
@@ -181,7 +181,7 @@ static const MemoryRegionOps cmsdk_apb_timer_ops = {
static void cmsdk_apb_timer_tick(void *opaque)
{
- CMSDKAPBTIMER *s = CMSDK_APB_TIMER(opaque);
+ CMSDKAPBTimer *s = CMSDK_APB_TIMER(opaque);
if (s->ctrl & R_CTRL_IRQEN_MASK) {
s->intstatus |= R_INTSTATUS_IRQ_MASK;
@@ -191,7 +191,7 @@ static void cmsdk_apb_timer_tick(void *opaque)
static void cmsdk_apb_timer_reset(DeviceState *dev)
{
- CMSDKAPBTIMER *s = CMSDK_APB_TIMER(dev);
+ CMSDKAPBTimer *s = CMSDK_APB_TIMER(dev);
trace_cmsdk_apb_timer_reset();
s->ctrl = 0;
@@ -206,7 +206,7 @@ static void cmsdk_apb_timer_reset(DeviceState *dev)
static void cmsdk_apb_timer_init(Object *obj)
{
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
- CMSDKAPBTIMER *s = CMSDK_APB_TIMER(obj);
+ CMSDKAPBTimer *s = CMSDK_APB_TIMER(obj);
memory_region_init_io(&s->iomem, obj, &cmsdk_apb_timer_ops,
s, "cmsdk-apb-timer", 0x1000);
@@ -216,7 +216,7 @@ static void cmsdk_apb_timer_init(Object *obj)
static void cmsdk_apb_timer_realize(DeviceState *dev, Error **errp)
{
- CMSDKAPBTIMER *s = CMSDK_APB_TIMER(dev);
+ CMSDKAPBTimer *s = CMSDK_APB_TIMER(dev);
if (s->pclk_frq == 0) {
error_setg(errp, "CMSDK APB timer: pclk-frq property must be set");
@@ -239,17 +239,17 @@ static const VMStateDescription cmsdk_apb_timer_vmstate = {
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
- VMSTATE_PTIMER(timer, CMSDKAPBTIMER),
- VMSTATE_UINT32(ctrl, CMSDKAPBTIMER),
- VMSTATE_UINT32(value, CMSDKAPBTIMER),
- VMSTATE_UINT32(reload, CMSDKAPBTIMER),
- VMSTATE_UINT32(intstatus, CMSDKAPBTIMER),
+ VMSTATE_PTIMER(timer, CMSDKAPBTimer),
+ VMSTATE_UINT32(ctrl, CMSDKAPBTimer),
+ VMSTATE_UINT32(value, CMSDKAPBTimer),
+ VMSTATE_UINT32(reload, CMSDKAPBTimer),
+ VMSTATE_UINT32(intstatus, CMSDKAPBTimer),
VMSTATE_END_OF_LIST()
}
};
static Property cmsdk_apb_timer_properties[] = {
- DEFINE_PROP_UINT32("pclk-frq", CMSDKAPBTIMER, pclk_frq, 0),
+ DEFINE_PROP_UINT32("pclk-frq", CMSDKAPBTimer, pclk_frq, 0),
DEFINE_PROP_END_OF_LIST(),
};
@@ -266,7 +266,7 @@ static void cmsdk_apb_timer_class_init(ObjectClass *klass, void *data)
static const TypeInfo cmsdk_apb_timer_info = {
.name = TYPE_CMSDK_APB_TIMER,
.parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(CMSDKAPBTIMER),
+ .instance_size = sizeof(CMSDKAPBTimer),
.instance_init = cmsdk_apb_timer_init,
.class_init = cmsdk_apb_timer_class_init,
};
--
2.20.1
next prev parent reply other threads:[~2021-01-28 11:53 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-28 11:41 [PATCH v2 00/25] Convert CMSDK timer, watchdog, dualtimer to Clock framework Peter Maydell
2021-01-28 11:41 ` [PATCH v2 01/25] ptimer: Add new ptimer_set_period_from_clock() function Peter Maydell
2021-01-28 14:38 ` Philippe Mathieu-Daudé
2021-01-28 11:41 ` [PATCH v2 02/25] clock: Add new clock_has_source() function Peter Maydell
2021-01-28 11:41 ` [PATCH v2 03/25] tests: Add a simple test of the CMSDK APB timer Peter Maydell
2021-01-28 11:41 ` [PATCH v2 04/25] tests: Add a simple test of the CMSDK APB watchdog Peter Maydell
2021-01-28 11:41 ` [PATCH v2 05/25] tests: Add a simple test of the CMSDK APB dual timer Peter Maydell
2021-01-28 13:38 ` Philippe Mathieu-Daudé
2021-01-28 18:57 ` Luc Michel
2021-01-28 11:41 ` Peter Maydell [this message]
2021-01-28 11:41 ` [PATCH v2 07/25] hw/timer/cmsdk-apb-timer: Add Clock input Peter Maydell
2021-01-28 11:41 ` [PATCH v2 08/25] hw/timer/cmsdk-apb-dualtimer: " Peter Maydell
2021-01-28 11:41 ` [PATCH v2 09/25] hw/watchdog/cmsdk-apb-watchdog: " Peter Maydell
2021-01-28 11:41 ` [PATCH v2 10/25] hw/arm/armsse: Rename "MAINCLK" property to "MAINCLK_FRQ" Peter Maydell
2021-01-28 11:41 ` [PATCH v2 11/25] hw/arm/armsse: Wire up clocks Peter Maydell
2021-01-28 11:41 ` [PATCH v2 12/25] hw/arm/mps2: Inline CMSDK_APB_TIMER creation Peter Maydell
2021-01-28 11:41 ` [PATCH v2 13/25] hw/arm/mps2: Create and connect SYSCLK Clock Peter Maydell
2021-01-28 11:41 ` [PATCH v2 14/25] hw/arm/mps2-tz: Create and connect ARMSSE Clocks Peter Maydell
2021-01-28 11:41 ` [PATCH v2 15/25] hw/arm/musca: " Peter Maydell
2021-01-28 11:41 ` [PATCH v2 16/25] hw/arm/stellaris: Convert SSYS to QOM device Peter Maydell
2021-01-28 11:41 ` [PATCH v2 17/25] hw/arm/stellaris: Create Clock input for watchdog Peter Maydell
2021-01-28 11:41 ` [PATCH v2 18/25] hw/timer/cmsdk-apb-timer: Convert to use Clock input Peter Maydell
2021-01-28 11:41 ` [PATCH v2 19/25] hw/timer/cmsdk-apb-dualtimer: " Peter Maydell
2021-01-28 11:41 ` [PATCH v2 20/25] hw/watchdog/cmsdk-apb-watchdog: " Peter Maydell
2021-01-28 11:41 ` [PATCH v2 21/25] tests/qtest/cmsdk-apb-watchdog-test: Test clock changes Peter Maydell
2021-01-28 11:41 ` [PATCH v2 22/25] hw/arm/armsse: Use Clock to set system_clock_scale Peter Maydell
2021-01-28 18:57 ` Luc Michel
2021-01-28 11:41 ` [PATCH v2 23/25] arm: Don't set freq properties on CMSDK timer, dualtimer, watchdog, ARMSSE Peter Maydell
2021-01-28 11:41 ` [PATCH v2 24/25] arm: Remove frq " Peter Maydell
2021-01-28 11:41 ` [PATCH v2 25/25] hw/arm/stellaris: Remove board-creation reset of STELLARIS_SYS Peter Maydell
2021-01-28 13:39 ` [PATCH v2 00/25] Convert CMSDK timer, watchdog, dualtimer to Clock framework 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=20210128114145.20536-7-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=f4bug@amsat.org \
--cc=luc@lmichel.fr \
--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).