u-boot/board/keymile
Holger Brunck c471d84808 arm/km: remove calls to kw_gpio_* in board_early_init_f
These functions tried to access two static tables before relocation
(board_early_init_f is executed before relocation). But these static
tables lie in the bss section which is not valid before relocation.
These accesses then overwrote some parts of u-boot binary before it was
relocated. For the kmnusa build, this results in a corrupted important
env variable (bootcmd) but it may be that some other parts of the u-boot
binary are corrupted.

This patch solves this problem by moving all the kw_gpio_* calls to
board_init, which should be early enough in the boot sequence. The only
calls that could not be moved is the one for the SOFT (bitbang) I2C, and
they have been replaced by a direct access to the GPIO dataout Control
register to set the two GPIOs as output.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:38 +02:00
..
common arm/km: enable BOCO2 FPGA download support 2012-07-07 14:07:37 +02:00
km82xx punt unused clean/distclean targets 2011-10-15 22:20:36 +02:00
km83xx powerpc/83xx/km: readout dip_switch on kmcoge5ne 2012-06-15 17:12:51 -05:00
km_arm arm/km: remove calls to kw_gpio_* in board_early_init_f 2012-07-07 14:07:38 +02:00
scripts km/common: add toolchain variable 2011-12-20 23:43:45 +01:00