diff options
author | 2013-06-17 19:56:20 +0200 | |
---|---|---|
committer | 2013-06-17 14:38:54 -0400 | |
commit | e570bd0472b10c9f982fdb58eb39c81445cddb5c (patch) | |
tree | 457461b97a5a48842877bd4d23b7c33ec1395845 /drivers/ssb/driver_chipcommon_sflash.c | |
parent | bcma: use const for serial flash hardware table (diff) | |
download | linux-e570bd0472b10c9f982fdb58eb39c81445cddb5c.tar.gz linux-e570bd0472b10c9f982fdb58eb39c81445cddb5c.tar.bz2 linux-e570bd0472b10c9f982fdb58eb39c81445cddb5c.zip |
ssb: add struct for serial flash
This data allow writing for example MTD driver.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/driver_chipcommon_sflash.c')
-rw-r--r-- | drivers/ssb/driver_chipcommon_sflash.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ssb/driver_chipcommon_sflash.c b/drivers/ssb/driver_chipcommon_sflash.c index 1b9e770f5328..205f1c499c46 100644 --- a/drivers/ssb/driver_chipcommon_sflash.c +++ b/drivers/ssb/driver_chipcommon_sflash.c @@ -73,6 +73,7 @@ static void ssb_sflash_cmd(struct ssb_chipcommon *cc, u32 opcode) /* Initialize serial flash access */ int ssb_sflash_init(struct ssb_chipcommon *cc) { + struct ssb_sflash *sflash = &cc->dev->bus->mipscore.sflash; const struct ssb_sflash_tbl_e *e; u32 id, id2; @@ -131,6 +132,12 @@ int ssb_sflash_init(struct ssb_chipcommon *cc) return -ENOTSUPP; } + sflash->window = SSB_FLASH2; + sflash->blocksize = e->blocksize; + sflash->numblocks = e->numblocks; + sflash->size = sflash->blocksize * sflash->numblocks; + sflash->present = true; + pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n", e->name, e->blocksize, e->numblocks); |