summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/driver_mips.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2012-07-17 16:26:41 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-07-17 15:11:40 -0400
commit23cb3b2121323443834296a8ecb582b8aeb78d75 (patch)
treefbe5e71832ef74b049fc68ac5de159d8c60b2ff1 /drivers/bcma/driver_mips.c
parent124b979baeb2d7a0593be8d392f43725578478c1 (diff)
downloadop-kernel-dev-23cb3b2121323443834296a8ecb582b8aeb78d75.zip
op-kernel-dev-23cb3b2121323443834296a8ecb582b8aeb78d75.tar.gz
bcma: add place for flash memory support
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_mips.c')
-rw-r--r--drivers/bcma/driver_mips.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c
index ef34ed2..b013b04 100644
--- a/drivers/bcma/driver_mips.c
+++ b/drivers/bcma/driver_mips.c
@@ -185,10 +185,11 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
switch (bus->drv_cc.capabilities & BCMA_CC_CAP_FLASHT) {
case BCMA_CC_FLASHT_STSER:
case BCMA_CC_FLASHT_ATSER:
- bcma_err(bus, "Serial flash not supported.\n");
+ bcma_debug(bus, "Found serial flash\n");
+ bcma_sflash_init(&bus->drv_cc);
break;
case BCMA_CC_FLASHT_PARA:
- bcma_info(bus, "found parallel flash.\n");
+ bcma_debug(bus, "Found parallel flash\n");
bus->drv_cc.pflash.window = 0x1c000000;
bus->drv_cc.pflash.window_size = 0x02000000;
@@ -199,7 +200,15 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore)
bus->drv_cc.pflash.buswidth = 2;
break;
default:
- bcma_err(bus, "flash not supported.\n");
+ bcma_err(bus, "Flash type not supported\n");
+ }
+
+ if (bus->drv_cc.core->id.rev == 38 ||
+ bus->chipinfo.id == BCMA_CHIP_ID_BCM4706) {
+ if (bus->drv_cc.capabilities & BCMA_CC_CAP_NFLASH) {
+ bcma_debug(bus, "Found NAND flash\n");
+ bcma_nflash_init(&bus->drv_cc);
+ }
}
}
OpenPOWER on IntegriCloud