]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
bcma: mark nflash if it is the boot flash
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 29 Sep 2012 18:33:51 +0000 (20:33 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Oct 2012 19:52:37 +0000 (15:52 -0400)
There are some devices which are able to boot from nand flash and other
are using a serial flash for booting. Add a bool to indicate that the
device is booted from that flash chip and not from some other chip also
connected to the SoC. This is needed to find the nvram, as it is stored
on the flash the devices booted from.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/bcma/driver_chipcommon_nflash.c
include/linux/bcma/bcma_driver_chipcommon.h

index 9042781edec340e932e39d2b75c7dba495764e42..dbda91e4dff5189ccabbb710b7a2a11f0e099651 100644 (file)
@@ -32,6 +32,9 @@ int bcma_nflash_init(struct bcma_drv_cc *cc)
        }
 
        cc->nflash.present = true;
+       if (cc->core->id.rev == 38 &&
+           (cc->status & BCMA_CC_CHIPST_5357_NAND_BOOT))
+               cc->nflash.boot = true;
 
        /* Prepare platform device, but don't register it yet. It's too early,
         * malloc (required by device_private_init) is not available yet. */
index 79993969953a2a35498cdef900dcb762cb51f3e7..145f3c56227f78932ed6cd8490d1b9c5828d63cc 100644 (file)
@@ -533,6 +533,7 @@ struct mtd_info;
 
 struct bcma_nflash {
        bool present;
+       bool boot;              /* This is the flash the SoC boots from */
 
        struct mtd_info *mtd;
 };