|
|
@ -24,7 +24,7 @@ |
|
|
|
base = bcma_cc->pflash.window;
|
|
|
|
base = bcma_cc->pflash.window;
|
|
|
|
lim = bcma_cc->pflash.window_size;
|
|
|
|
lim = bcma_cc->pflash.window_size;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
@@ -86,7 +84,106 @@ found:
|
|
|
|
@@ -86,7 +84,110 @@ found:
|
|
|
|
for (i = 0; i < sizeof(struct nvram_header); i += 4)
|
|
|
|
for (i = 0; i < sizeof(struct nvram_header); i += 4)
|
|
|
|
*dst++ = *src++;
|
|
|
|
*dst++ = *src++;
|
|
|
|
for (; i < header->len && i < NVRAM_SPACE; i += 4)
|
|
|
|
for (; i < header->len && i < NVRAM_SPACE; i += 4)
|
|
|
@ -87,10 +87,12 @@ |
|
|
|
+ switch (bcm47xx_bus.ssb.chipco.flash_type) {
|
|
|
|
+ switch (bcm47xx_bus.ssb.chipco.flash_type) {
|
|
|
|
+ case SSB_PFLASH:
|
|
|
|
+ case SSB_PFLASH:
|
|
|
|
+ early_nvram_init_pflash();
|
|
|
|
+ early_nvram_init_pflash();
|
|
|
|
|
|
|
|
+ break;
|
|
|
|
+ case SSB_SFLASH:
|
|
|
|
+ case SSB_SFLASH:
|
|
|
|
+ err = early_nvram_init_sflash();
|
|
|
|
+ err = early_nvram_init_sflash();
|
|
|
|
+ if (err < 0)
|
|
|
|
+ if (err < 0)
|
|
|
|
+ printk(KERN_WARNING "can not read from flash: %i\n", err);
|
|
|
|
+ printk(KERN_WARNING "can not read from flash: %i\n", err);
|
|
|
|
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ default:
|
|
|
|
+ printk(KERN_WARNING "unknow flash type\n");
|
|
|
|
+ printk(KERN_WARNING "unknow flash type\n");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
@ -105,10 +107,12 @@ |
|
|
|
+ switch (bcm47xx_bus.bcma.bus.drv_cc.flash_type) {
|
|
|
|
+ switch (bcm47xx_bus.bcma.bus.drv_cc.flash_type) {
|
|
|
|
+ case BCMA_PFLASH:
|
|
|
|
+ case BCMA_PFLASH:
|
|
|
|
+ early_nvram_init_pflash();
|
|
|
|
+ early_nvram_init_pflash();
|
|
|
|
|
|
|
|
+ break;
|
|
|
|
+ case BCMA_SFLASH:
|
|
|
|
+ case BCMA_SFLASH:
|
|
|
|
+ err = early_nvram_init_sflash();
|
|
|
|
+ err = early_nvram_init_sflash();
|
|
|
|
+ if (err < 0)
|
|
|
|
+ if (err < 0)
|
|
|
|
+ printk(KERN_WARNING "can not read from flash: %i\n", err);
|
|
|
|
+ printk(KERN_WARNING "can not read from flash: %i\n", err);
|
|
|
|
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ default:
|
|
|
|
+ printk(KERN_WARNING "unknow flash type\n");
|
|
|
|
+ printk(KERN_WARNING "unknow flash type\n");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|