diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-08-02 19:22:43 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-09-07 12:40:12 +1000 |
commit | dd2fa4f72d1ce44ce1635fe3a744bd47d8f2ab05 (patch) | |
tree | 5c1566cb872b9a28e5fc4840b3269abf0b278d31 /hw/misc | |
parent | 3654fa95bc29e72c2eef22f26eb621af1f86feec (diff) | |
download | qemu-dd2fa4f72d1ce44ce1635fe3a744bd47d8f2ab05.zip qemu-dd2fa4f72d1ce44ce1635fe3a744bd47d8f2ab05.tar.gz qemu-dd2fa4f72d1ce44ce1635fe3a744bd47d8f2ab05.tar.bz2 |
ppc: Fix macio ESCC legacy mapping
The current mapping, while correct for the base ports (which is all the
driver uses these days), is wrong for the extended registers.
I suspect the bugs come from incorrect tables in the CHRP IO Ref document,
I have verified the new values here match Apple's MacTech.pdf.
Note: Nothing that I know of actually uses these registers so it's not a
huge deal, but this patch has the added advantage of adding comments to
document what the registers are.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/misc')
-rw-r--r-- | hw/misc/macio/macio.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c index be03926..5d57f45 100644 --- a/hw/misc/macio/macio.c +++ b/hw/misc/macio/macio.c @@ -89,22 +89,16 @@ static void macio_escc_legacy_setup(MacIOState *macio_state) MemoryRegion *bar = &macio_state->bar; int i; static const int maps[] = { - 0x00, 0x00, - 0x02, 0x20, - 0x04, 0x10, - 0x06, 0x30, - 0x08, 0x40, - 0x0A, 0x50, - 0x60, 0x60, - 0x70, 0x70, - 0x80, 0x70, - 0x90, 0x80, - 0xA0, 0x90, - 0xB0, 0xA0, - 0xC0, 0xB0, - 0xD0, 0xC0, - 0xE0, 0xD0, - 0xF0, 0xE0, + 0x00, 0x00, /* Command B */ + 0x02, 0x20, /* Command A */ + 0x04, 0x10, /* Data B */ + 0x06, 0x30, /* Data A */ + 0x08, 0x40, /* Enhancement B */ + 0x0A, 0x50, /* Enhancement A */ + 0x80, 0x80, /* Recovery count */ + 0x90, 0x90, /* Start A */ + 0xa0, 0xa0, /* Start B */ + 0xb0, 0xb0, /* Detect AB */ }; memory_region_init(escc_legacy, OBJECT(macio_state), "escc-legacy", 256); |