[U-Boot] [PATCH] OMAP3EVM: net_chip uses CS5 not CS6

Detlev Zundel dzu at denx.de
Fri May 8 14:28:43 CEST 2009


Hi,

> Wolfgang Denk wrote:
>> Dear Scott Wood,
>> 
>> In message <4A034B09.7030105 at freescale.com> you wrote:
>>>> Or what replaced the "immr" structs?
>>> The device tree, mainly...
>> 
>> Right, of course.
>> 
>>>                      ...  But #defines can work for u-boot.
>> 
>> Of course they _can_ work. But they can easily fail (as we just see
>> in this patch), and we don't have typechecking. So until DT's are
>> omnipresent, let's use structs in U-Boot, please.
>
> You *do* have typechecking as long as the individual blocks are 
> described with structs.
>
> We could take immap to extremes by defining one big 4GiB struct that 
> shows where memory, immr, flash, desired PCI bars, FPGAs, etc. are -- 
> but that would be silly.  IMHO, so is doing it at the immr level. :-)
>
> How would you deal with blocks being at different locations in different 
> chips?  It's a lot easier to ifdef (or have the config file specify) a 
> couple addresses than to ifdef the locations of fields in a struct, 
> especially when you have more than a couple variations.

For what its worth, I'm with Scott here.  Structures for register blocks
is very nice and should be mandated and it seems they are maintainable.
Locations of individual blocks (or number of incarnations thereof) seem
to change frequently and thus tend to be less friendly to "whole
internal address space" structures.  So the latter may better be mapped
by single defines.  The correctness of them is easily validated and an
incorrect value will immediatley be discovered.

Cheers
  Detlev

-- 
config LGUEST
        If unsure, say N.  If curious, say M.  If masochistic, say Y.
                                     -- linux/drivers/lguest/Kconfig
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list