linux-mips
[Top] [All Lists]

[PATCH 4/5] MIPS: bcm63xx: remove BCM6345 hacks to read base boot addres

To: ralf@linux-mips.org
Subject: [PATCH 4/5] MIPS: bcm63xx: remove BCM6345 hacks to read base boot address
From: Florian Fainelli <florian@openwrt.org>
Date: Wed, 21 Sep 2011 15:39:49 +0200
Cc: linux-mips@linux-mips.org, Florian Fainelli <ffainelli@freebox.fr>, Florian Fainelli <florian@openwrt.org>
In-reply-to: <1316612390-6367-1-git-send-email-florian@openwrt.org>
References: <1316612390-6367-1-git-send-email-florian@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
From: Florian Fainelli <ffainelli@freebox.fr>

Though BCM6345 does not technically have the same MPI register layout
than the other SoCs, reading the chip-select registers is done the same
way, and particularly for chip-select 0, which is the boot flash.
Now that BCM6345 has a MPI_BASE register defined, use it.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
 arch/mips/bcm63xx/boards/board_bcm963xx.c |   21 ++++++---------------
 1 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/arch/mips/bcm63xx/boards/board_bcm963xx.c 
b/arch/mips/bcm63xx/boards/board_bcm963xx.c
index 40b223b..ac948c2 100644
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -709,15 +709,9 @@ void __init board_prom_init(void)
        char cfe_version[32];
        u32 val;
 
-       /* read base address of boot chip select (0)
-        * 6345 does not have MPI but boots from standard
-        * MIPS Flash address */
-       if (BCMCPU_IS_6345())
-               val = 0x1fc00000;
-       else {
-               val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-               val &= MPI_CSBASE_BASE_MASK;
-       }
+       /* read base address of boot chip select (0) */
+       val = bcm_mpi_readl(MPI_CSBASE_REG(0));
+       val &= MPI_CSBASE_BASE_MASK;
        boot_addr = (u8 *)KSEG1ADDR(val);
 
        /* dump cfe version */
@@ -893,12 +887,9 @@ int __init board_register_devices(void)
                bcm63xx_dsp_register(&board.dsp);
 
        /* read base address of boot chip select (0) */
-       if (BCMCPU_IS_6345())
-               val = 0x1fc00000;
-       else {
-               val = bcm_mpi_readl(MPI_CSBASE_REG(0));
-               val &= MPI_CSBASE_BASE_MASK;
-       }
+       val = bcm_mpi_readl(MPI_CSBASE_REG(0));
+       val &= MPI_CSBASE_BASE_MASK;
+
        mtd_resources[0].start = val;
        mtd_resources[0].end = 0x1FFFFFFF;
 
-- 
1.7.4.1


<Prev in Thread] Current Thread [Next in Thread>