ssb: add attribute to indicate a parallel flash is available
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 29 Sep 2012 18:36:18 +0000 (20:36 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Oct 2012 19:52:48 +0000 (15:52 -0400)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/ssb/driver_mipscore.c
include/linux/ssb/ssb_driver_mips.h

index dcad2c40836ef6da432c6b8f8a9215820cfb8e70..b918ba9223067bdc8219c3c54828dd31f0a0d819 100644 (file)
@@ -192,6 +192,7 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
 
        /* When there is no chipcommon on the bus there is 4MB flash */
        if (!bus->chipco.dev) {
+               mcore->pflash.present = true;
                mcore->pflash.buswidth = 2;
                mcore->pflash.window = SSB_FLASH1;
                mcore->pflash.window_size = SSB_FLASH1_SZ;
@@ -206,6 +207,7 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
                break;
        case SSB_CHIPCO_FLASHT_PARA:
                pr_debug("Found parallel flash\n");
+               mcore->pflash.present = true;
                mcore->pflash.window = SSB_FLASH2;
                mcore->pflash.window_size = SSB_FLASH2_SZ;
                if ((ssb_read32(bus->chipco.dev, SSB_CHIPCO_FLASH_CFG)
index 5d057db53071a1b283fb77c6cec75eeb4750da4f..07a9c7a2e088e5baedd31426a1679dab23def26c 100644 (file)
@@ -14,6 +14,7 @@ struct ssb_serial_port {
 };
 
 struct ssb_pflash {
+       bool present;
        u8 buswidth;
        u32 window;
        u32 window_size;