[U-Boot] [PATCH v3 4/4] ARMV7: OMAP3: Add support for Comelit DIG297 board

Wolfgang Denk wd at denx.de
Sat Apr 9 23:22:52 CEST 2011


Dear Luca Ceresoli,

In message <4DA0C56D.7030705 at comelit.it> you wrote:
> 
> >>> +#ifndef __ASSEMBLY__
> >>> +extern unsigned int boot_flash_base;
> >>> +extern unsigned int boot_flash_off;
> >>> +extern unsigned int boot_flash_sec;
> >>> +extern unsigned int boot_flash_type;
> >>> +#endif
> >> Can we please get rid of this?
> > Hopefully. This mostly depends on how able I will be in understanding
> > the meaning of this stuff and how it should be done instead. I might
> > need support.
> >
> I knew this would have been painful.

I don't think so.

> Observations:
> 
> a. arch/arm/cpu/armv7/omap3/mem.c computes a value for those variables based
>     on config-values in the config file (see gpmc_init(), bottom half):

Note that arch/arm/cpu/armv7/omap3/mem.c is also the only file in the
whole U-Boot source tree which references these variables:

-> egrep -lR 'boot_flash_base|boot_flash_off|boot_flash_sec|boot_flash_type' *
arch/arm/cpu/armv7/omap3/mem.c
include/configs/am3517_evm.h
include/configs/devkit8000.h
include/configs/omap3_beagle.h
include/configs/cm_t35.h
include/configs/omap3_pandora.h
include/configs/omap3_sdp3430.h
include/configs/omap3_zoom1.h
include/configs/omap3_zoom2.h
include/configs/omap3_overo.h
include/configs/omap3_evm.h

> If those variable declarations were moved to some common place, I think it
> should be mem.h (as they are computed in mem.c), or some other omap3-specific
> include file.

Why not add these declarations as "static" variables to
arch/arm/cpu/armv7/omap3/mem.c [and remove all references to them from
the board config files] ?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Another megabytes the dust.


More information about the U-Boot mailing list