[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/41] hw/timer/bcm2835: Rename variable holding CTRL_STATUS regis
From: |
Peter Maydell |
Subject: |
[PULL 06/41] hw/timer/bcm2835: Rename variable holding CTRL_STATUS register |
Date: |
Tue, 20 Oct 2020 16:56:21 +0100 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
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.
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20201010203709.3116542-3-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.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 43df7ee488c..f15788a78d8 100644
--- a/include/hw/timer/bcm2835_systmr.h
+++ b/include/hw/timer/bcm2835_systmr.h
@@ -27,7 +27,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.20.1
- [PULL 00/41] target-arm queue, Peter Maydell, 2020/10/20
- [PULL 01/41] target/arm: Fix SMLAD incorrect setting of Q bit, Peter Maydell, 2020/10/20
- [PULL 02/41] target/arm: AArch32 VCVT fixed-point to float is always round-to-nearest, Peter Maydell, 2020/10/20
- [PULL 03/41] hw/arm/strongarm: Fix 'time to transmit a char' unit comment, Peter Maydell, 2020/10/20
- [PULL 04/41] hw/arm: Restrict APEI tables generation to the 'virt' machine, Peter Maydell, 2020/10/20
- [PULL 05/41] hw/timer/bcm2835: Introduce BCM2835_SYSTIMER_COUNT definition, Peter Maydell, 2020/10/20
- [PULL 06/41] hw/timer/bcm2835: Rename variable holding CTRL_STATUS register,
Peter Maydell <=
- [PULL 08/41] hw/arm/bcm2835_peripherals: Correctly wire the SYS_timer IRQs, Peter Maydell, 2020/10/20
- [PULL 07/41] hw/timer/bcm2835: Support the timer COMPARE registers, Peter Maydell, 2020/10/20
- [PULL 09/41] accel/tcg: Add tlb_flush_page_bits_by_mmuidx*, Peter Maydell, 2020/10/20
- [PULL 10/41] target/arm: Use tlb_flush_page_bits_by_mmuidx*, Peter Maydell, 2020/10/20
- [PULL 12/41] loads-stores.rst: add footnote that clarifies GETPC usage, Peter Maydell, 2020/10/20
- [PULL 13/41] hw/intc/bcm2835_ic: Trace GPU/CPU IRQ handlers, Peter Maydell, 2020/10/20
- [PULL 11/41] tests/qtest: Add npcm7xx timer test, Peter Maydell, 2020/10/20
- [PULL 14/41] hw/intc/bcm2836_control: Use IRQ definitions instead of magic numbers, Peter Maydell, 2020/10/20
- [PULL 15/41] target/arm: Remove redundant mmu_idx lookup, Peter Maydell, 2020/10/20
- [PULL 16/41] target/arm: Fix reported EL for mte_check_fail, Peter Maydell, 2020/10/20