summaryrefslogtreecommitdiff
path: root/arch/mips/bcm47xx
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2014-10-28 13:30:23 +0100
committerRalf Baechle <ralf@linux-mips.org>2014-11-24 07:44:59 +0100
commit7177efc5b030012c54c2e217c9d6decc0bcc1c53 (patch)
treede7286cacf84e4936905451e6278e9f726b9cca8 /arch/mips/bcm47xx
parent21400f252a97755579b43a4dc95dd02cd7f0ca75 (diff)
MIPS: BCM47XX: Make bcma init NVRAM instead of bcm47xx polling it
This drops ssb/bcma dependency and will allow us to make it a standalone driver. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: Hauke Mehrtens <hauke@hauke-m.de> Patchwork: https://patchwork.linux-mips.org/patch/8233/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/bcm47xx')
-rw-r--r--arch/mips/bcm47xx/nvram.c42
1 files changed, 2 insertions, 40 deletions
diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c
index fecc5aeddd46..21712fb40d72 100644
--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
@@ -121,48 +121,10 @@ int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
return err;
}
-#ifdef CONFIG_BCM47XX_BCMA
-static int nvram_init_bcma(void)
-{
- struct bcma_drv_cc *cc = &bcm47xx_bus.bcma.bus.drv_cc;
- u32 base;
- u32 lim;
-
-#ifdef CONFIG_BCMA_NFLASH
- if (cc->nflash.boot) {
- base = BCMA_SOC_FLASH1;
- lim = BCMA_SOC_FLASH1_SZ;
- } else
-#endif
- if (cc->pflash.present) {
- base = cc->pflash.window;
- lim = cc->pflash.window_size;
-#ifdef CONFIG_BCMA_SFLASH
- } else if (cc->sflash.present) {
- base = cc->sflash.window;
- lim = cc->sflash.size;
-#endif
- } else {
- pr_err("Couldn't find supported flash memory\n");
- return -ENXIO;
- }
-
- return bcm47xx_nvram_init_from_mem(base, lim);
-}
-#endif
-
static int nvram_init(void)
{
- switch (bcm47xx_bus_type) {
-#ifdef CONFIG_BCM47XX_SSB
- case BCM47XX_BUS_TYPE_SSB:
- break;
-#endif
-#ifdef CONFIG_BCM47XX_BCMA
- case BCM47XX_BUS_TYPE_BCMA:
- return nvram_init_bcma();
-#endif
- }
+ /* TODO: Look for MTD "nvram" partition */
+
return -ENXIO;
}