Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHi LiangYi,
Sorry, I missed the info in your earlier post: > My flash is AM29DL323GB-90EI Ok. So you have several choices here. You can implement your own flash.c file (see other boards for example), or you can use the u-boot CFI flash driver. To implement your own flash driver, just copy an existing flash.c file that supports the AM29DL323 and add it to your board directory. The RPXClassic, RPXlite_dw, esd/common trees have flash.c files that support your device. You can customize your own flash.c files as you like. The other option is to use the u-boot CFI flash driver (with fixes for avalon bus). The (patched) driver was reported to work fine on the UP3 board. The CFI driver increases the size of your u-boot image -- but should work with all CFI-compliant flash devices -- I'll send you the patch. To get started, the easiest thing to do is enable CFI, once this is (mostly) working you can apply the patch, customize, whatever you like. Remove any board-specific flash routines from your build, then configure for CFI. Here's a starting point: # define CFG_FLASH_CFI_DRIVER# define CFG_MAX_FLASH_SECT 71 /* Max# sects per bank */# define CFG_MAX_FLASH_BANKS 1 /* Max# of flash banks */# define CFG_FLASH_CFI > I do not know clearly what files I need to have and how to correct them. So my board > can be initialized OK. My system now just include NIOS2/s, SDRAM, FLAHS, EPCS4, UART, > JTAG-UART, sysid and system_timer. u-boot will initialize epcs4 (if enabled), the UART _or_ JTAG UART (but not both ... it only touches the device that you specify as the console), and the timer. The flash is scanned based on the flash driver you choose (normally your flash.c fle). The SDRAM and SYSID do not require initialization. Regards, --Scott