Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: http://patchwork.linux-mips.org/patch/4741/
Signed-off-by: John Crispin <blogic@openwrt.org>
u32 off;
u32 *src, *dst;
+ /* TODO: when nvram is on nand flash check for bad blocks first. */
off = FLASH_MIN;
while (off <= lim) {
/* Windowed flash access */
u32 base;
u32 lim;
+#ifdef CONFIG_BCMA_NFLASH
+ if (cc->nflash.boot) {
+ base = BCMA_SOC_FLASH1;
+ lim = BCMA_SOC_FLASH1_SZ;
+ } else
+#endif
if (cc->pflash.present) {
base = cc->pflash.window;
lim = cc->pflash.window_size;