From 82ee67302290c9e76e6c2f0af6e031afc3680b4a Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Wed, 26 Dec 2012 19:51:11 +0000 Subject: [PATCH] --- yaml --- r: 360028 b: refs/heads/master c: c4485671fbbb6fc453c2fb2dbb4bfc374770b0e7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/bcm47xx/nvram.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9791b2e15163..fa472c246cfb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cc4403e02541af226ae6b7da0917c8959dd73a75 +refs/heads/master: c4485671fbbb6fc453c2fb2dbb4bfc374770b0e7 diff --git a/trunk/arch/mips/bcm47xx/nvram.c b/trunk/arch/mips/bcm47xx/nvram.c index 80e352e0c995..42e527121314 100644 --- a/trunk/arch/mips/bcm47xx/nvram.c +++ b/trunk/arch/mips/bcm47xx/nvram.c @@ -30,6 +30,7 @@ static int nvram_find_and_copy(u32 base, u32 lim) 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 */ @@ -88,6 +89,12 @@ static int nvram_init_bcma(void) 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;