mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
ssb: add struct for serial flash
This data allow writing for example MTD driver. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
4a71053ec5
commit
e570bd0472
2 changed files with 22 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue