diff mbox

hw/omap_gpmc: Don't try to map CS0 twice on reset

Message ID 1314123872-16843-1-git-send-email-peter.maydell@linaro.org
State Accepted
Commit 710ffe604810676f9385263ba10f71f41b330cce
Headers show

Commit Message

Peter Maydell Aug. 23, 2011, 6:24 p.m. UTC
Remove a spurious second map of the OMAP GPMC CS0 region on reset.
This fixes an assertion failure when we try to add the region to
its container when it was already added. (The old code did not
complain about mismatched map/unmap calls, but the new MemoryRegion
implementation does.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/omap_gpmc.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Edgar E. Iglesias Aug. 23, 2011, 7:52 p.m. UTC | #1
On Tue, Aug 23, 2011 at 07:24:32PM +0100, Peter Maydell wrote:
> Remove a spurious second map of the OMAP GPMC CS0 region on reset.
> This fixes an assertion failure when we try to add the region to
> its container when it was already added. (The old code did not
> complain about mismatched map/unmap calls, but the new MemoryRegion
> implementation does.)
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Applied, thanks.

Cheers
diff mbox

Patch

diff --git a/hw/omap_gpmc.c b/hw/omap_gpmc.c
index 922d622..673dddd 100644
--- a/hw/omap_gpmc.c
+++ b/hw/omap_gpmc.c
@@ -135,7 +135,6 @@  void omap_gpmc_reset(struct omap_gpmc_s *s)
                             s->cs_file[i].config[6] & 0x1f,	/* MASKADDR */
                         (s->cs_file[i].config[6] >> 8 & 0xf));	/* BASEADDR */
     }
-    omap_gpmc_cs_map(s->cs_file, 0, 0xf);
     s->ecc_cs = 0;
     s->ecc_ptr = 0;
     s->ecc_cfg = 0x3fcff000;