[U-Boot-Users] Re: A Shared flash.c

Wolfgang Denk wd at denx.de
Sat Mar 6 00:19:49 CET 2004


In message <6922-64489 at sneakemail.com> you wrote:
>
> OK, that's true about the flash.c file as a whole, but the
> print_flash_info functions are all board independent, as far
> as I can see. Just different levels of completeness. There

This has nothing to do with completeness, but  with  optimization  of
memory  footprint.  The  reason why most boards use their own special
version of flash.c is so that it gives minimum  memory  footprint  by
just  supporting  the poosible variants of this specific board. It is
just a waste of memory when you for example include support for Intel
chips when you know for sure that the board will always see only  AMD
chips.

> are other similar functions that only peruse the flash_info
> structures and so are completely board independent, and I
> was merely thinking in terms of unifying some common code.

This has been suggested before, and the rules have been defined, too:

Such a modification is welcome, if and only if:

- it works on ALL existing boards at least as good as the current code
- it does NOT increase the memory footprint for any board

> Again, I see your point WRT flash.c as a whole, but wouldn't
> it be useful to for example make flash_print_info common?

I think it would break U-Boot for a couple of  boards  that  live  in
small memory like a 128 kB EPROM.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
How much net work could a network work, if a network could net work?




More information about the U-Boot mailing list