[U-Boot] Query: Does Uboot support CFI flash driver forM29W128GH
Stefan Roese
sr at denx.de
Thu Oct 29 08:21:43 CET 2009
Hi Prakash,
On Thursday 29 October 2009 07:24:25 prakash bedge wrote:
> Can you please send me the patch details to fixup the CFI query related bug
> for M29W128GH?
I did send you the patch in my last mail. You just need to add this code to a
board specific file, e.g. board/board_name/board_name.c.
> In the code for each header file there is a macro named
> CONFIG_FLASH_CFI_DRIVER defined in each board specific header file in
> folder /include/configs. But I am not seeing any #ifdef for this macro in
> code. Where this macro is being checked in the code?
It's in the makefile (drivers/mdt/Makefile).
> Is there any documentation giving details on how the CFI flash
> driver executes in U-Boot?
It's really simple, just copy the config options and change some
values like CONFIG_SYS_FLASH_BANKS_LIST, CONFIG_SYS_MAX_FLASH_BANKS
according to your hardware specs. Take a look at zeus for example:
#define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */
#define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */
#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
#define CONFIG_SYS_MAX_FLASH_SECT 512 /* max number of sectors on one chip */
#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
#define CONFIG_SYS_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */
#define CONFIG_SYS_FLASH_PROTECTION 1 /* use hardware flash protection */
#define CONFIG_SYS_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
#define CONFIG_SYS_FLASH_QUIET_TEST 1 /* don't warn upon unknown flash */
This shouldn't be too hard.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
More information about the U-Boot
mailing list