From 7c64d297f988f6ee2136f29fac010db2c8fc352c Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Sun, 13 Nov 2011 14:18:39 +0000 Subject: [PATCH] hw/pxa2xx.c: Fix handling of RW bits in PMCR Fix an error in commit afd4a6522 which meant that writing a zero to the RW bits in the PMCR wouldn't actually clear them. (Error spotted by Andrzej Zaborowski.) Signed-off-by: Peter Maydell Signed-off-by: Andrzej Zaborowski --- hw/pxa2xx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c index d38b922924..e9a507ece5 100644 --- a/hw/pxa2xx.c +++ b/hw/pxa2xx.c @@ -117,6 +117,7 @@ static void pxa2xx_pm_write(void *opaque, target_phys_addr_t addr, /* Clear the write-one-to-clear bits... */ s->pm_regs[addr >> 2] &= ~(value & 0x2a); /* ...and set the plain r/w bits */ + s->pm_regs[addr >> 2] &= ~0x15; s->pm_regs[addr >> 2] |= value & 0x15; break; -- 2.11.0