Browse Source

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 <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Peter Maydell 13 năm trước cách đây
mục cha
commit
7c64d297f9
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      hw/pxa2xx.c

+ 1 - 0
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;