[U-Boot-Users] Multiple Flash Devices

Zachary Landau kapheine at gmail.com
Wed Feb 23 16:30:30 CET 2005


> > Is there a good method of setting up two flash devices at once?  As
> > far as I can tell, all the flash functions (like flash_print_info, for
> > example) can only be defined for one type of flash at a time.
> 
> You can use the addresses to differentiate which flash device are
> accessed. Keep the same interfaces uboot has already had and just
> develop your own functions to do the actual jobs.
> 
> > The other option might be to create my own flash function wrappers
> > that call the appropriate flash function based on, for example, the
> > address passed into the function.
> 
> That's what I did before on a EP8245 board. This way shields all the
> differences.

Shawn,

In that case, did both flash devices use the same driver?  My two
flash devices use different drivers.  So what I am currently doing is
adding a prefix to the different flash driver functions (ie: change
CFI's write_buff to cfi_write_buff) and then adding function pointers
to each flash bank structure indicating which function to use.

This seems to be a decent approach.  The main problem is that the
flash calls are a bit scattered, and also it will require all flash
devices to be changed.  But I'll continue with it unless someone has a
better solution?

-- 
Zachary P. Landau <kapheine at gmail.com>




More information about the U-Boot mailing list