
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