Blame 0119-musicpal-Fix-flash-mapping.patch

5544c1
From 2182aa5c2ca5a5a6bf9c2d06d18b3e2db3aa3c7a Mon Sep 17 00:00:00 2001
5544c1
From: Jan Kiszka <jan.kiszka@web.de>
5544c1
Date: Sat, 8 Sep 2012 11:52:39 +0200
5544c1
Subject: [PATCH] musicpal: Fix flash mapping
5544c1
5544c1
The old arithmetic assumed 32 physical address bits which is no longer
5544c1
true for ARM since 3cc0cd61f4.
5544c1
5544c1
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
5544c1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
5544c1
(cherry picked from commit 0c267217ca9985e6d118ec8368bebd382db7a099)
5544c1
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 hw/musicpal.c | 4 ++--
5544c1
 1 file changed, 2 insertions(+), 2 deletions(-)
5544c1
5544c1
diff --git a/hw/musicpal.c b/hw/musicpal.c
5544c1
index ad725b5..f305e21 100644
5544c1
--- a/hw/musicpal.c
5544c1
+++ b/hw/musicpal.c
5544c1
@@ -1583,7 +1583,7 @@ static void musicpal_init(ram_addr_t ram_size,
5544c1
          * image is smaller than 32 MB.
5544c1
          */
5544c1
 #ifdef TARGET_WORDS_BIGENDIAN
5544c1
-        pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, NULL,
5544c1
+        pflash_cfi02_register(0x100000000ULL-MP_FLASH_SIZE_MAX, NULL,
5544c1
                               "musicpal.flash", flash_size,
5544c1
                               dinfo->bdrv, 0x10000,
5544c1
                               (flash_size + 0xffff) >> 16,
5544c1
@@ -1591,7 +1591,7 @@ static void musicpal_init(ram_addr_t ram_size,
5544c1
                               2, 0x00BF, 0x236D, 0x0000, 0x0000,
5544c1
                               0x5555, 0x2AAA, 1);
5544c1
 #else
5544c1
-        pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, NULL,
5544c1
+        pflash_cfi02_register(0x100000000ULL-MP_FLASH_SIZE_MAX, NULL,
5544c1
                               "musicpal.flash", flash_size,
5544c1
                               dinfo->bdrv, 0x10000,
5544c1
                               (flash_size + 0xffff) >> 16,
5544c1
-- 
5544c1
1.7.12.1
5544c1