diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2013-01-25 05:36:25 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-30 15:06:45 -0500 |
commit | f1ab57e3a114173fdb94219937191f0c673e87dd (patch) | |
tree | fa0b250b1c9e66b7e985824225d3d8c29589bcfd /drivers/ssb/driver_mipscore.c | |
parent | 4a5fc6d7074de72dd836fbb9c5cd79f9a491871c (diff) |
ssb: trivial: use pflash helper variable
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/driver_mipscore.c')
-rw-r--r-- | drivers/ssb/driver_mipscore.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/ssb/driver_mipscore.c b/drivers/ssb/driver_mipscore.c index 2a7684c90243..77bc8d4c1d5f 100644 --- a/drivers/ssb/driver_mipscore.c +++ b/drivers/ssb/driver_mipscore.c | |||
@@ -189,13 +189,14 @@ static void ssb_mips_serial_init(struct ssb_mipscore *mcore) | |||
189 | static void ssb_mips_flash_detect(struct ssb_mipscore *mcore) | 189 | static void ssb_mips_flash_detect(struct ssb_mipscore *mcore) |
190 | { | 190 | { |
191 | struct ssb_bus *bus = mcore->dev->bus; | 191 | struct ssb_bus *bus = mcore->dev->bus; |
192 | struct ssb_pflash *pflash = &mcore->pflash; | ||
192 | 193 | ||
193 | /* When there is no chipcommon on the bus there is 4MB flash */ | 194 | /* When there is no chipcommon on the bus there is 4MB flash */ |
194 | if (!ssb_chipco_available(&bus->chipco)) { | 195 | if (!ssb_chipco_available(&bus->chipco)) { |
195 | mcore->pflash.present = true; | 196 | pflash->present = true; |
196 | mcore->pflash.buswidth = 2; | 197 | pflash->buswidth = 2; |
197 | mcore->pflash.window = SSB_FLASH1; | 198 | pflash->window = SSB_FLASH1; |
198 | mcore->pflash.window_size = SSB_FLASH1_SZ; | 199 | pflash->window_size = SSB_FLASH1_SZ; |
199 | return; | 200 | return; |
200 | } | 201 | } |
201 | 202 | ||
@@ -208,14 +209,14 @@ static void ssb_mips_flash_detect(struct ssb_mipscore *mcore) | |||
208 | break; | 209 | break; |
209 | case SSB_CHIPCO_FLASHT_PARA: | 210 | case SSB_CHIPCO_FLASHT_PARA: |
210 | pr_debug("Found parallel flash\n"); | 211 | pr_debug("Found parallel flash\n"); |
211 | mcore->pflash.present = true; | 212 | pflash->present = true; |
212 | mcore->pflash.window = SSB_FLASH2; | 213 | pflash->window = SSB_FLASH2; |
213 | mcore->pflash.window_size = SSB_FLASH2_SZ; | 214 | pflash->window_size = SSB_FLASH2_SZ; |
214 | if ((ssb_read32(bus->chipco.dev, SSB_CHIPCO_FLASH_CFG) | 215 | if ((ssb_read32(bus->chipco.dev, SSB_CHIPCO_FLASH_CFG) |
215 | & SSB_CHIPCO_CFG_DS16) == 0) | 216 | & SSB_CHIPCO_CFG_DS16) == 0) |
216 | mcore->pflash.buswidth = 1; | 217 | pflash->buswidth = 1; |
217 | else | 218 | else |
218 | mcore->pflash.buswidth = 2; | 219 | pflash->buswidth = 2; |
219 | break; | 220 | break; |
220 | } | 221 | } |
221 | } | 222 | } |