[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 3/5] hw/timer/bcm2835: Rename variable holding CTRL_STATUS reg
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 3/5] hw/timer/bcm2835: Rename variable holding CTRL_STATUS register |
Date: |
Mon, 21 Sep 2020 05:52:55 +0200 |
The variable holding the CTRL_STATUS register is misnamed
'status'. Rename it 'ctrl_status' to make it more obvious
this register is also used to control the peripheral.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/timer/bcm2835_systmr.h | 2 +-
hw/timer/bcm2835_systmr.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/hw/timer/bcm2835_systmr.h
b/include/hw/timer/bcm2835_systmr.h
index 11272837a6b..e0db9e9e12b 100644
--- a/include/hw/timer/bcm2835_systmr.h
+++ b/include/hw/timer/bcm2835_systmr.h
@@ -29,7 +29,7 @@ struct BCM2835SystemTimerState {
qemu_irq irq;
struct {
- uint32_t status;
+ uint32_t ctrl_status;
uint32_t compare[BCM2835_SYSTIMER_COUNT];
} reg;
};
diff --git a/hw/timer/bcm2835_systmr.c b/hw/timer/bcm2835_systmr.c
index ff8c5536610..b234e83824f 100644
--- a/hw/timer/bcm2835_systmr.c
+++ b/hw/timer/bcm2835_systmr.c
@@ -30,7 +30,7 @@ REG32(COMPARE3, 0x18)
static void bcm2835_systmr_update_irq(BCM2835SystemTimerState *s)
{
- bool enable = !!s->reg.status;
+ bool enable = !!s->reg.ctrl_status;
trace_bcm2835_systmr_irq(enable);
qemu_set_irq(s->irq, enable);
@@ -52,7 +52,7 @@ static uint64_t bcm2835_systmr_read(void *opaque, hwaddr
offset,
switch (offset) {
case A_CTRL_STATUS:
- r = s->reg.status;
+ r = s->reg.ctrl_status;
break;
case A_COMPARE0 ... A_COMPARE3:
r = s->reg.compare[(offset - A_COMPARE0) >> 2];
@@ -82,7 +82,7 @@ static void bcm2835_systmr_write(void *opaque, hwaddr offset,
trace_bcm2835_systmr_write(offset, value);
switch (offset) {
case A_CTRL_STATUS:
- s->reg.status &= ~value; /* Ack */
+ s->reg.ctrl_status &= ~value; /* Ack */
bcm2835_systmr_update_irq(s);
break;
case A_COMPARE0 ... A_COMPARE3:
@@ -133,7 +133,7 @@ static const VMStateDescription bcm2835_systmr_vmstate = {
.version_id = 1,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
- VMSTATE_UINT32(reg.status, BCM2835SystemTimerState),
+ VMSTATE_UINT32(reg.ctrl_status, BCM2835SystemTimerState),
VMSTATE_UINT32_ARRAY(reg.compare, BCM2835SystemTimerState,
BCM2835_SYSTIMER_COUNT),
VMSTATE_END_OF_LIST()
--
2.26.2
- [PATCH v2 0/5] hw/arm/raspi: Fix SYS_timer to unbrick Linux kernels v3.7+, Philippe Mathieu-Daudé, 2020/09/20
- [PATCH v2 1/5] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers, Philippe Mathieu-Daudé, 2020/09/20
- [PATCH v2 2/5] hw/timer/bcm2835: Introduce BCM2835_SYSTIMER_COUNT definition, Philippe Mathieu-Daudé, 2020/09/20
- [PATCH v2 3/5] hw/timer/bcm2835: Rename variable holding CTRL_STATUS register,
Philippe Mathieu-Daudé <=
- [PATCH v2 4/5] hw/timer/bcm2835: Support the timer COMPARE registers, Philippe Mathieu-Daudé, 2020/09/20
- [PATCH v2 5/5] hw/arm/bcm2835_peripherals: Correctly wire the SYS_timer IRQs, Philippe Mathieu-Daudé, 2020/09/20
- Re: [PATCH v2 0/5] hw/arm/raspi: Fix SYS_timer to unbrick Linux kernels v3.7+, Philippe Mathieu-Daudé, 2020/09/24