malta: use unmapped flash base address
PATCH 1/1 malta: use unmapped flash base address
The physical base address of the NOR flash is 0x1e000000 on the Malta boards. The hardware also maps the first 4MiB of the flash into the 0x1fc00000-0x1fffffff range.
Currently, U-Boot uses the mapped address to access the flash, which does not work in recent qemu versions.
Since commit a427338b222b43197c2776cbc996936df0302f51 (mips_malta: correct reading MIPS revision at 0x1fc00010) writing to the mapped address space causes a CPU exception. Due to the exception, U-Boot hangs during boot when it tries to detect the CFI flash chip.
Use the correct physical address for the MALTA_FLASH_BASE constant to avoid the problem. The change makes it possible to start U-Boot on a Malta board emulated with Qemu 1.6.1 and 1.7.0-rc0. It also works on older versions (tested with 1.1.1, 1.2.2, 1.4.2, 1.5.3). The change is not tested on a real Malta board.
--- arch/mips/include/asm/malta.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/malta.h +1 -1
@@ -44,7 +44,7 @@#define MALTA_RESET_BASE 0x1f000500#define GORESET 0x42 -#define MALTA_FLASH_BASE 0x1fc00000 +#define MALTA_FLASH_BASE 0x1e000000#define MALTA_REVISION 0x1fc00010#define MALTA_REVISION_CORID_SHF 10
Signature · 1 line
1.7.10
PATCH 1/1 malta: use unmapped flash base address
Quoted 33 lines · Gabor Juhos
The physical base address of the NOR flash is
0x1e000000on the Malta boards. The hardware also maps the first 4MiB of the flash into the 0x1fc00000-0x1fffffff range.Currently, U-Boot uses the mapped address to access the flash, which does not work in recent qemu versions.
Since commit
a427338b222b43197c2776cbc996936df0302f51(mips_malta: correct reading MIPS revision at0x1fc00010) writing to the mapped address space causes a CPU exception. Due to the exception, U-Boot hangs during boot when it tries to detect the CFI flash chip.Use the correct physical address for the
MALTA_FLASH_BASEconstant to avoid the problem. The change makes it possible to start U-Boot on a Malta board emulated with Qemu 1.6.1 and 1.7.0-rc0. It also works on older versions (tested with 1.1.1, 1.2.2, 1.4.2, 1.5.3). The change is not tested on a real Malta board.Signed-off-by Gabor Juhos <[email protected]>Cc Daniel Schwierzeck <[email protected]>Cc Paul Burton <[email protected]>--- arch/mips/include/asm/malta.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/include/asm/malta.h +0
-0
arch/mips/include/asm/malta.h line 50
Quoted 8 lines
arch/mips/include/asm/malta.h +1
-1@@ -44,7 +44,7 @@#define MALTA_RESET_BASE 0x1f000500#define GORESET 0x42 -#define MALTA_FLASH_BASE 0x1fc00000 +#define MALTA_FLASH_BASE 0x1e000000#define MALTA_REVISION 0x1fc00010#define MALTA_REVISION_CORID_SHF 10
Hmm, this does run on a real Malta but it takes around a minute to run relocate_code... With the 0x1fc00000 base address it's much faster. I'll see if I can figure out why...
Paul
PATCH 1/1 malta: use unmapped flash base address
2013.11.11. 15:22 keltez?ssel, Paul Burton ?rta:
<...>
Quoted 11 lines
Quoted 11 lines
arch/mips/include/asm/malta.h +1
-1@@ -44,7 +44,7 @@#define MALTA_RESET_BASE 0x1f000500#define GORESET 0x42 -#define MALTA_FLASH_BASE 0x1fc00000 +#define MALTA_FLASH_BASE 0x1e000000
Quoted 7 lines
arch/mips/include/asm/malta.h line 50
Quoted 3 lines
arch/mips/include/asm/malta.h +0
-0#define MALTA_REVISION 0x1fc00010#define MALTA_REVISION_CORID_SHF 10Hmm, this does run on a real Malta but it takes around a minute to run
relocate_code... With the0x1fc00000base address it's much faster. I'll see if I can figure out why...
Hm, you are right. Although I did not notice that before, but with this patch U-Boot starts slower also in qemu. It seems that the problem is in the relocation code. I'm preparing a patch to fix that.
-Gabor