[U-Boot-Users] Multiple Flash Devices

Wolfgang Denk wd at denx.de
Thu Feb 24 23:31:48 CET 2005


In message <a04f56da05022109345c7fb8fc at mail.gmail.com> you wrote:
> 
> I want to be able to access two (very different) flash devices.  I

Just do it, then.

> Is there a good method of setting up two flash devices at once?  As

Yes, U-Boot has always been capable of doing this. Your flash devices
will form spearate "banks" of flash memory. Thee  is  no  requirement
that  all  banks  must  be  identical.  In  fact,  several boards use
different flash types on different banks.

> 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 are wrong.

> 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

This is not accetable, and not necessary.

> 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.

You don't have to create any new interfaces. The existing code  which
provides  a  flash_info  struncture  per  bank  of  flash  memory  is
sufficient.

> Has anyone else ran into this problem?  Perhaps that is another board

It's not a problem. It's somthiong that is working  fine  on  several
boards.

> 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.

See for example "board/cpu86/flash.c"

Best regards,

Wolfgang Denk

-- 
See us @ Embedded World, Nuremberg, Feb 22 - 24,  Hall 10.0 Booth 310
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Your csh still thinks true is false. Write to your vendor  today  and
tell them that next year Configure ought to "rm /bin/csh" unless they
fix  their blasted shell. :-)
                 - Larry Wall in Configure from the perl distribution




More information about the U-Boot mailing list