diff options
author | wdenk <wdenk> | 2004-06-17 18:50:45 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-06-17 18:50:45 +0000 |
commit | 46a414dc12c7809ac3c3e82b6198a1f435d7489f (patch) | |
tree | 1f72a6b74f5f0447ea5369194f7325b1f51092b1 /board | |
parent | f832d8a1432da791b94b820ccf2c7864708c5631 (diff) | |
download | u-boot-imx-46a414dc12c7809ac3c3e82b6198a1f435d7489f.zip u-boot-imx-46a414dc12c7809ac3c3e82b6198a1f435d7489f.tar.gz u-boot-imx-46a414dc12c7809ac3c3e82b6198a1f435d7489f.tar.bz2 |
* Fix flash parameters passed to Linux for PPChameleon board
* Remove eth_init() from lib_arm/board.c; it's done in net.net.c.
Diffstat (limited to 'board')
-rw-r--r-- | board/dave/PPChameleonEVB/PPChameleonEVB.c | 8 | ||||
-rw-r--r-- | board/dave/PPChameleonEVB/flash.c | 20 |
2 files changed, 15 insertions, 13 deletions
diff --git a/board/dave/PPChameleonEVB/PPChameleonEVB.c b/board/dave/PPChameleonEVB/PPChameleonEVB.c index 603bb1e..b08b119 100644 --- a/board/dave/PPChameleonEVB/PPChameleonEVB.c +++ b/board/dave/PPChameleonEVB/PPChameleonEVB.c @@ -96,11 +96,15 @@ int misc_init_f (void) return 0; /* dummy implementation */ } +extern flash_info_t flash_info[]; /* info for FLASH chips */ int misc_init_r (void) { -#if 0 /* test-only */ DECLARE_GLOBAL_DATA_PTR; + + /* adjust flash start and size as well as the offset */ + gd->bd->bi_flashstart = 0 - flash_info[0].size; + gd->bd->bi_flashoffset= flash_info[0].size - CFG_MONITOR_LEN; #if 0 volatile unsigned short *fpga_mode = (unsigned short *)((ulong)CFG_FPGA_BASE_ADDR + CFG_FPGA_CTRL); @@ -192,8 +196,6 @@ int misc_init_r (void) *duart0_mcr = 0x08; *duart1_mcr = 0x08; #endif -#endif - return (0); } diff --git a/board/dave/PPChameleonEVB/flash.c b/board/dave/PPChameleonEVB/flash.c index d57c58d..5f67360 100644 --- a/board/dave/PPChameleonEVB/flash.c +++ b/board/dave/PPChameleonEVB/flash.c @@ -44,10 +44,10 @@ unsigned long flash_init (void) #ifdef __DEBUG_START_FROM_SRAM__ return CFG_DUMMY_FLASH_SIZE; #else - unsigned long size_b0; + unsigned long size; int i; uint pbcr; - unsigned long base_b0; + unsigned long base; int size_val = 0; /* Init: no FLASHes known */ @@ -57,22 +57,22 @@ unsigned long flash_init (void) /* Static FLASH Bank configuration here - FIXME XXX */ - size_b0 = flash_get_size((vu_long *)FLASH_BASE0_PRELIM, &flash_info[0]); + size = flash_get_size((vu_long *)FLASH_BASE0_PRELIM, &flash_info[0]); if (flash_info[0].flash_id == FLASH_UNKNOWN) { printf ("## Unknown FLASH on Bank 0 - Size = 0x%08lx = %ld MB\n", - size_b0, size_b0<<20); + size, size<<20); } /* Setup offsets */ - flash_get_offsets (-size_b0, &flash_info[0]); + flash_get_offsets (-size, &flash_info[0]); /* Re-do sizing to get full correct info */ mtdcr(ebccfga, pb0cr); pbcr = mfdcr(ebccfgd); mtdcr(ebccfga, pb0cr); - base_b0 = -size_b0; - switch (size_b0) { + base = -size; + switch (size) { case 1 << 20: size_val = 0; break; @@ -89,7 +89,7 @@ unsigned long flash_init (void) size_val = 4; break; } - pbcr = (pbcr & 0x0001ffff) | base_b0 | (size_val << 17); + pbcr = (pbcr & 0x0001ffff) | base | (size_val << 17); mtdcr(ebccfgd, pbcr); /* Monitor protection ON by default */ @@ -98,8 +98,8 @@ unsigned long flash_init (void) 0xffffffff, &flash_info[0]); - flash_info[0].size = size_b0; + flash_info[0].size = size; - return (size_b0); + return (size); #endif } |