Skip to content

Commit

Permalink
bcma: mark nflash if it is the boot flash
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed Oct 19, 2012
1 parent cc78708 commit e661b75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/bcma/driver_chipcommon_nflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
1 change: 1 addition & 0 deletions include/linux/bcma/bcma_driver_chipcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit e661b75

Please sign in to comment.