diff options
| author | wdenk <wdenk> | 2004-04-18 10:13:26 +0000 | 
|---|---|---|
| committer | wdenk <wdenk> | 2004-04-18 10:13:26 +0000 | 
| commit | c26e454dfc6650428854fa2db3b1ed7f19e0ba0e (patch) | |
| tree | 2ad2368558e366e127683028a71381cb1dd37140 /board/netphone/flash.c | |
| parent | ea66bc8804b66633faae5b7066571c9d68b4d14a (diff) | |
| download | olio-uboot-2014.01-c26e454dfc6650428854fa2db3b1ed7f19e0ba0e.tar.xz olio-uboot-2014.01-c26e454dfc6650428854fa2db3b1ed7f19e0ba0e.zip | |
Patches by Pantelis Antoniou, 16 Apr 2004:
- add support for a new version of an Intracom board and fix
  various other things on others.
- add verify support to the crc32 command (define
  CONFIG_CRC32_VERIFY to enable it)
- fix FEC driver for MPC8xx systems:
  1. fix compilation problems for boards that use dynamic
     allocation of DPRAM
  2. shut down FEC after network transfers
- HUSH parser fixes:
  1. A new test command was added. This is a simplified version of
     the one in the bourne shell.
  2. A new exit command was added which terminates the current
     executing script.
  3. Fixed handing of $? (exit code of last executed command)
Diffstat (limited to 'board/netphone/flash.c')
| -rw-r--r-- | board/netphone/flash.c | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/board/netphone/flash.c b/board/netphone/flash.c index a1c87f513..adbc28e10 100644 --- a/board/netphone/flash.c +++ b/board/netphone/flash.c @@ -41,6 +41,9 @@ unsigned long flash_init(void)  	volatile immap_t *immap = (immap_t *) CFG_IMMR;  	volatile memctl8xx_t *memctl = &immap->im_memctl;  	unsigned long size; +#if CONFIG_NETPHONE_VERSION == 2 +	unsigned long size1; +#endif  	int i;  	/* Init: no FLASHes known */ @@ -82,6 +85,25 @@ unsigned long flash_init(void)  	flash_info[0].size = size; +#if CONFIG_NETPHONE_VERSION == 2 +	size1 = flash_get_size((vu_long *) FLASH_BASE4_PRELIM, &flash_info[1]); + +	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)); + +	/* 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]); + +	size += size1; +#endif +  	return (size);  } |