From patchwork Wed Jan 4 11:34:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v3,1/2] hw/integratorcp: Fix sense of REMAP bit Date: Wed, 04 Jan 2012 01:34:58 -0000 From: Peter Maydell X-Patchwork-Id: 134248 Message-Id: <1325676899-23131-2-git-send-email-peter.maydell@linaro.org> To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Beno=C3=AEt=20Canet?= , Avi Kivity , patches@linaro.org Fix the sense of the REMAP bit: 0 should mean "map flash", 1 should mean "map RAM". Signed-off-by: Peter Maydell --- hw/integratorcp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/integratorcp.c b/hw/integratorcp.c index 2551236..8e4c154 100644 --- a/hw/integratorcp.c +++ b/hw/integratorcp.c @@ -112,7 +112,7 @@ static uint64_t integratorcm_read(void *opaque, target_phys_addr_t offset, static void integratorcm_do_remap(integratorcm_state *s, int flash) { - if (flash) { + if (!flash) { if (s->flash_mapped) { sysbus_del_memory(&s->busdev, &s->flash); s->flash_mapped = false;