[U-Boot-Users] misc_init_r() and flash
robert lazarski
robertlazarski at gmail.com
Fri Jul 13 23:29:20 CEST 2007
Hi all, I'm using the TQM_85xx flash configuration for my board with a
mpc8548E - the reason being is that I also have 128MB of flash. The
TQM_85xx has two banks and mine is just one bank. My flash is
S29GL01GP . I'm using the TQM_85xx example because others for the 85xx
have two 8MB banks of flash positioned as this comment explains:
"If flash is 8M at default position (last 8M), no LAW needed."
Here's my relevant init.S :
#define CFG_FLASH_BASE 0xF8000000 /* start of FLASH 128M */
#define CFG_LBC_FLASH_BASE CFG_FLASH_BASE /* Localbus flash start */
/*
* TLB 0, 1: 128M Non-cacheable, guarded
* 0xf8000000 128M FLASH
* Out of reset this entry is only 4K.
*/
.long TLB1_MAS0(1, 1, 0)
.long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_64M)
.long TLB1_MAS2(E500_TLB_EPN(CFG_FLASH_BASE), 0,0,0,0,1,0,1,0)
.long TLB1_MAS3(E500_TLB_RPN(CFG_FLASH_BASE), 0,0,0,0,0,1,0,1,0,1)
.long TLB1_MAS0(1, 0, 0)
.long TLB1_MAS1(1, 1, 0, 0, BOOKE_PAGESZ_64M)
.long TLB1_MAS2(E500_TLB_EPN(CFG_FLASH_BASE+0x4000000), 0,0,0,0,1,0,1,0)
.long TLB1_MAS3(E500_TLB_RPN(CFG_FLASH_BASE+0x4000000),
0,0,0,0,0,1,0,1,0,1)
#define LAWBAR5 ((CFG_LBC_FLASH_BASE>>12) & 0xfffff)
#define LAWAR5 (LAWAR_EN | LAWAR_TRGT_IF_LBC | (LAWAR_SIZE & LAWAR_SIZE_128M))
My question is, do I need misc_init_r() ? I notice the tqm_85xx is
using misc_init_r() to do further configuration of the flash. Until I
seen that, I was thinking since my flash supports CFI, nothing further
is needed. I notice the cds 85xx boards don't use misc_init_r() to
setup flash.
We just got the bare board today, so it'll be a few weeks until I can
run the code. Any advice appreciated.
Robert
More information about the U-Boot
mailing list