[U-Boot-Users] flash driver in u-boot
Tolunay Orkun
listmember at orkun.us
Tue Oct 17 10:10:55 CEST 2006
Reeve Yang wrote:
> But cfi_flash.c doesn't work for me. It always complains "flash is
> busy" when I try to write something. However strata_flash.c works. why
> is that? By the way, is there anyway to read flash contents in u-boot? md?
Define success! Did you actually verify that strataflash.c worked
correctly. It might be silently ignoring the issues and giving you false
impression that it was successful. Did you actually check the flash
contents after write? Since you are asking about if md could be used
for reading the flash it tells me you do not know if strataflash was
actually successful.
I have got no idea what code base you are using (top of git tree or some
older version). What CPU architecture you have? How it is interfaced to
your CPU? If flash mapped to the address space correctly. Is that memory
space enabled for write access? Is the timing setup correctly (wait
states, holds etc?). Which one of many strataflash.c you have used (some
with different tweaks)?
Many things can go wrong that could prevent normal operation. If you had
posted actual screen capture from CFI driver and the strataflash.c and
perhaps someone could provide more hints. Ultimately, the code is there.
You will need to do some code reading and debugging to find out why
cfi_flash gives always busy. Or hire someone to do this for you.
All I can say is that cfi_flash.c works with this chip. Cogent csb272
uses 2 of these chips side by side using cfi_flash.c.
Tolunay
>
> On 10/16/06, *Tolunay Orkun* <listmember at orkun.us
> <mailto:listmember at orkun.us>> wrote:
>
> Reeve Yang wrote:
> > I'm a little confused by flash driver selection in u-boot. My flash
> > device is intel JS28F128J3, I assume it's not CFI flash so I
> want to use
>
> Intel 28F128J3 is a CFI compliant flash chip.
>
> > strataflash.c. I added such file under my board directory, add
> it into
> > Makefile, and undef CFG_FLASH_CFI_DRIVER, but I got link error. If
>
> strataflash.c driver is a pre-cursor to common cfi_flash.c. Most
> boards
> are reworked to use the cfi_flash.c. To use strataflash.c you also had
> to define CFG_FLASH_CFI_DRIVER (as far as my memory serves). There
> is no
> reason to use a custom flash driver nowadays unless your flash is
> interfaced to the processor bus in a very unusual way (like data bus
> scrambled -- hardware design bugs)
>
> > define this macro, the compilation is ok and my flash works. My
> question
> > is, if we define this macro, which flash driver being used?
> cfi_flash.c
> > or my strataflash.c?
>
> Use cfi_flash.c
>
> Tolunay
>
>
More information about the U-Boot
mailing list