mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ssb: move parallel flash config into an own struct
This is a preparing step for adding serial flash support. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
e5c9d7c075
commit
54c974984e
4 changed files with 19 additions and 16 deletions
|
|
@ -192,9 +192,9 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
|
|||
|
||||
/* When there is no chipcommon on the bus there is 4MB flash */
|
||||
if (!bus->chipco.dev) {
|
||||
mcore->flash_buswidth = 2;
|
||||
mcore->flash_window = SSB_FLASH1;
|
||||
mcore->flash_window_size = SSB_FLASH1_SZ;
|
||||
mcore->pflash.buswidth = 2;
|
||||
mcore->pflash.window = SSB_FLASH1;
|
||||
mcore->pflash.window_size = SSB_FLASH1_SZ;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -206,13 +206,13 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore)
|
|||
break;
|
||||
case SSB_CHIPCO_FLASHT_PARA:
|
||||
pr_debug("Found parallel flash\n");
|
||||
mcore->flash_window = SSB_FLASH2;
|
||||
mcore->flash_window_size = SSB_FLASH2_SZ;
|
||||
mcore->pflash.window = SSB_FLASH2;
|
||||
mcore->pflash.window_size = SSB_FLASH2_SZ;
|
||||
if ((ssb_read32(bus->chipco.dev, SSB_CHIPCO_FLASH_CFG)
|
||||
& SSB_CHIPCO_CFG_DS16) == 0)
|
||||
mcore->flash_buswidth = 1;
|
||||
mcore->pflash.buswidth = 1;
|
||||
else
|
||||
mcore->flash_buswidth = 2;
|
||||
mcore->pflash.buswidth = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue