From: Wolfgang Denk Date: Sat, 09 Apr 2011 23:22:52 +0200 Subject: [U-Boot] [PATCH v3 4/4] ARMV7: OMAP3: Add support for Comelit DIG297 board In-Reply-To: <4DA0C56D.7030705@comelit.it> References: <1301416116-5519-1-git-send-email-luca.ceresoli@comelit.it> <1301416116-5519-5-git-send-email-luca.ceresoli@comelit.it> <20110406075048.11B1614F02E@gemini.denx.de> <4D9E12B7.2040809@comelit.it> <4DA0C56D.7030705@comelit.it> Message-ID: <20110409212252.B6C15151F83@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Luca Ceresoli, In message <4DA0C56D.7030705@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.