Skip to content

Commit e661b75

Browse files
haukelinvjw
authored andcommitted
bcma: mark nflash if it is the boot flash
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>
1 parent cc78708 commit e661b75

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/bcma/driver_chipcommon_nflash.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ int bcma_nflash_init(struct bcma_drv_cc *cc)
3232
}
3333

3434
cc->nflash.present = true;
35+
if (cc->core->id.rev == 38 &&
36+
(cc->status & BCMA_CC_CHIPST_5357_NAND_BOOT))
37+
cc->nflash.boot = true;
3538

3639
/* Prepare platform device, but don't register it yet. It's too early,
3740
* malloc (required by device_private_init) is not available yet. */

‎include/linux/bcma/bcma_driver_chipcommon.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ struct mtd_info;
533533

534534
struct bcma_nflash {
535535
bool present;
536+
bool boot; /* This is the flash the SoC boots from */
536537

537538
struct mtd_info *mtd;
538539
};

0 commit comments

Comments
 (0)