diff options
author | wdenk <wdenk> | 2004-06-07 23:46:25 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-06-07 23:46:25 +0000 |
commit | 79fa88f3ede051ca860667d5397e6cdc7e74a6d0 (patch) | |
tree | a720e281e25d5846b9c05cb65e58e7e589591b70 /board/netphone/flash.c | |
parent | cea655a224456d043192156fb2d44a0896194adc (diff) | |
download | u-boot-imx-79fa88f3ede051ca860667d5397e6cdc7e74a6d0.zip u-boot-imx-79fa88f3ede051ca860667d5397e6cdc7e74a6d0.tar.gz u-boot-imx-79fa88f3ede051ca860667d5397e6cdc7e74a6d0.tar.bz2 |
Patch by Pantelis Antoniou, 5 May 2004:
- Intracom board update.
- Add Codec POST.
Diffstat (limited to 'board/netphone/flash.c')
-rw-r--r-- | board/netphone/flash.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/board/netphone/flash.c b/board/netphone/flash.c index adbc28e..0c81140 100644 --- a/board/netphone/flash.c +++ b/board/netphone/flash.c @@ -87,21 +87,22 @@ unsigned long flash_init(void) #if CONFIG_NETPHONE_VERSION == 2 size1 = flash_get_size((vu_long *) FLASH_BASE4_PRELIM, &flash_info[1]); + if (size1 > 0) { + if (flash_info[1].flash_id == FLASH_UNKNOWN) + printf("## Unknown FLASH on Bank 1 - Size = 0x%08lx = %ld MB\n", size1, size1 << 20); - if (flash_info[1].flash_id == FLASH_UNKNOWN && size1 > 0) { - printf("## Unknown FLASH on Bank 1 - Size = 0x%08lx = %ld MB\n", size1, size1 << 20); - } - - /* Remap FLASH according to real size */ - memctl->memc_or4 = CFG_OR_TIMING_FLASH | (-size1 & 0xFFFF8000); - memctl->memc_br4 = (CFG_FLASH_BASE4 & BR_BA_MSK) | (memctl->memc_br4 & ~(BR_BA_MSK)); + /* Remap FLASH according to real size */ + memctl->memc_or4 = CFG_OR_TIMING_FLASH | (-size1 & 0xFFFF8000); + memctl->memc_br4 = (CFG_FLASH_BASE4 & BR_BA_MSK) | (memctl->memc_br4 & ~(BR_BA_MSK)); - /* Re-do sizing to get full correct info */ - size1 = flash_get_size((vu_long *) CFG_FLASH_BASE4, &flash_info[1]); + /* Re-do sizing to get full correct info */ + size1 = flash_get_size((vu_long *) CFG_FLASH_BASE4, &flash_info[1]); - flash_get_offsets(CFG_FLASH_BASE4, &flash_info[1]); + flash_get_offsets(CFG_FLASH_BASE4, &flash_info[1]); - size += size1; + size += size1; + } else + memctl->memc_br4 &= ~BR_V; #endif return (size); |