diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2012-12-26 14:51:11 -0500 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2013-02-15 13:01:56 -0500 |
commit | c4485671fbbb6fc453c2fb2dbb4bfc374770b0e7 (patch) | |
tree | ffd9297eb38fba7ffcefc4dd32e441ef81a4b7e6 /arch/mips/bcm47xx | |
parent | cc4403e02541af226ae6b7da0917c8959dd73a75 (diff) |
MIPS: BCM47XX: nvram add nand flash support
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>
Diffstat (limited to 'arch/mips/bcm47xx')
-rw-r--r-- | arch/mips/bcm47xx/nvram.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c index 80e352e0c995..42e527121314 100644 --- a/arch/mips/bcm47xx/nvram.c +++ b/arch/mips/bcm47xx/nvram.c | |||
@@ -30,6 +30,7 @@ static int nvram_find_and_copy(u32 base, u32 lim) | |||
30 | u32 off; | 30 | u32 off; |
31 | u32 *src, *dst; | 31 | u32 *src, *dst; |
32 | 32 | ||
33 | /* TODO: when nvram is on nand flash check for bad blocks first. */ | ||
33 | off = FLASH_MIN; | 34 | off = FLASH_MIN; |
34 | while (off <= lim) { | 35 | while (off <= lim) { |
35 | /* Windowed flash access */ | 36 | /* Windowed flash access */ |
@@ -88,6 +89,12 @@ static int nvram_init_bcma(void) | |||
88 | u32 base; | 89 | u32 base; |
89 | u32 lim; | 90 | u32 lim; |
90 | 91 | ||
92 | #ifdef CONFIG_BCMA_NFLASH | ||
93 | if (cc->nflash.boot) { | ||
94 | base = BCMA_SOC_FLASH1; | ||
95 | lim = BCMA_SOC_FLASH1_SZ; | ||
96 | } else | ||
97 | #endif | ||
91 | if (cc->pflash.present) { | 98 | if (cc->pflash.present) { |
92 | base = cc->pflash.window; | 99 | base = cc->pflash.window; |
93 | lim = cc->pflash.window_size; | 100 | lim = cc->pflash.window_size; |