Commit e661b75a authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville

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: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cc787081
...@@ -32,6 +32,9 @@ int bcma_nflash_init(struct bcma_drv_cc *cc) ...@@ -32,6 +32,9 @@ int bcma_nflash_init(struct bcma_drv_cc *cc)
} }
cc->nflash.present = true; 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, /* Prepare platform device, but don't register it yet. It's too early,
* malloc (required by device_private_init) is not available yet. */ * malloc (required by device_private_init) is not available yet. */
......
...@@ -533,6 +533,7 @@ struct mtd_info; ...@@ -533,6 +533,7 @@ struct mtd_info;
struct bcma_nflash { struct bcma_nflash {
bool present; bool present;
bool boot; /* This is the flash the SoC boots from */
struct mtd_info *mtd; struct mtd_info *mtd;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment