[U-Boot-Users] Multiple Flash Devices

Zachary Landau kapheine at gmail.com
Mon Feb 21 18:34:56 CET 2005


Hello,

I'm currently working on getting u-boot to work from the internal
flash of the 5282.  I have it booting. and now I am working on getting
all the flash programming stuff setup.

I want to be able to access two (very different) flash devices.  I
want to be able to write to the internal flash device so that I can
save environmental variables, but I also want to be able to write to
the external flash so I can program data into it.

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.

There are two solutions I have thought of so far.  One of them is pick
whichever flash device is used the most and set that up normally.  For
the other flash, I could create different functions for it and in the
code that calls it I can make the necessary changes to call the right
functions.  I don't like this as much, because I'd have to put special
code various commands/ files to handle this.

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.

Has anyone else ran into this problem?  Perhaps that is another board
config that already deals with this?  I looked around, but there are a
lot of configs and I easily could have missed what I was looking for.

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




More information about the U-Boot mailing list