[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 17/21] openpic: fix timer address decoding
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 17/21] openpic: fix timer address decoding |
Date: |
Fri, 25 Jan 2013 13:53:00 +0100 |
From: Scott Wood <address@hidden>
The timer memory range begins at 0x10f0, so that address 0x1120 shows
up as 0x30, 0x1130 shows up as 0x40, etc. However, the address
decoding (other than TFRR) is not adjusted for this, causing the
wrong registers to be accessed.
Signed-off-by: Scott Wood <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/openpic.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/openpic.c b/hw/openpic.c
index a4488c2..0a4379f 100644
--- a/hw/openpic.c
+++ b/hw/openpic.c
@@ -792,19 +792,23 @@ static void openpic_tmr_write(void *opaque, hwaddr addr,
uint64_t val,
OpenPICState *opp = opaque;
int idx;
+ addr += 0x10f0;
+
DPRINTF("%s: addr %#" HWADDR_PRIx " <= %08" PRIx64 "\n",
__func__, addr, val);
if (addr & 0xF) {
return;
}
- idx = (addr >> 6) & 0x3;
- addr = addr & 0x30;
- if (addr == 0x0) {
+ if (addr == 0x10f0) {
/* TFRR */
opp->tfrr = val;
return;
}
+
+ idx = (addr >> 6) & 0x3;
+ addr = addr & 0x30;
+
switch (addr & 0x30) {
case 0x00: /* TCCR */
break;
--
1.6.0.2
- [Qemu-ppc] [PATCH 14/21] pseries: Improve handling of multiple PCI host bridges, (continued)
- [Qemu-ppc] [PATCH 14/21] pseries: Improve handling of multiple PCI host bridges, Alexander Graf, 2013/01/25
- [Qemu-ppc] [PATCH 09/21] cuda: QOM'ify CUDA, Alexander Graf, 2013/01/25
- [Qemu-ppc] [PATCH 21/21] PPC: Move ppc specific hw emulation to hw/ppc, Alexander Graf, 2013/01/25
- [Qemu-ppc] [PATCH 20/21] PPC: e500: Select MPIC v4.2 on ppce500 platform, Alexander Graf, 2013/01/25
- [Qemu-ppc] [PATCH 18/21] openpic: add basic support for MPIC v4.2, Alexander Graf, 2013/01/25
- [Qemu-ppc] [PATCH 19/21] PPC: e500: fix mpic_iack address, Alexander Graf, 2013/01/25
- [Qemu-ppc] [PATCH 16/21] openpic: fix remaining issues from idr-to-destmask conversion, Alexander Graf, 2013/01/25
- [Qemu-ppc] [PATCH 17/21] openpic: fix timer address decoding,
Alexander Graf <=
- [Qemu-ppc] [PATCH 11/21] adb: QOM'ify ADB devices, Alexander Graf, 2013/01/25
- [Qemu-ppc] [PATCH 02/21] macio: QOM'ify some more, Alexander Graf, 2013/01/25