prevent bcm6338 and bcm6345 from crashing very early
authorFlorian Fainelli <florian@openwrt.org>
Sat, 27 Jun 2009 18:23:58 +0000 (18:23 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 27 Jun 2009 18:23:58 +0000 (18:23 +0000)
SVN-Revision: 16585

target/linux/brcm63xx/files/arch/mips/bcm63xx/boards/board_bcm963xx.c

index 3e767d8a63d7732c3900cdf622e049a51e8c2c8a..92d46e7628a43ac38c2276b0d3d721cc0c02e07d 100644 (file)
@@ -323,9 +323,15 @@ void __init board_prom_init(void)
        char cfe_version[32];
        u32 val;
 
-       /* read base address of boot chip select (0) */
-       val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-       val &= MPI_CSBASE_BASE_MASK;
+       /* read base address of boot chip select (0) 
+        * 6338 does not have MPI but boots from standard
+        * MIPS Flash address */
+       if (BCMCPU_IS_6338() || BCMCPU_IS_6345())
+               val = 0x1fc00000;
+       else {
+               val = bcm_mpi_readl(MPI_CSBASE_REG(0));
+               val &= MPI_CSBASE_BASE_MASK;
+       }
        boot_addr = (u8 *)KSEG1ADDR(val);
 
        /* dump cfe version */