]> git.ipfire.org Git - people/ms/u-boot.git/commit
rockchip: fix turning off boot-mode via Kconfig
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Fri, 24 Nov 2017 13:44:58 +0000 (14:44 +0100)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Sun, 26 Nov 2017 13:57:11 +0000 (14:57 +0100)
commitf07d76c00d1fe05baad1599d01d07a9226498923
treeb330f6d143b2d880851bbfafdd9da113b5a8bc3f
parent8c2bb589e29d5cb89e10c3ddd23b28d949fa9693
rockchip: fix turning off boot-mode via Kconfig

The ROCKCHIP_BOOT_MODE_REG option defaults to a hex value, so 0 will
show as 0x0 if a default is provided and changed via Kconfig.
However, it still will show as 0, if no default is given.

Consequently, the "is set to something other than 0" test in a
Makefile is cumbersome.  Instead this check can easily be performed in
the C-code.

This removes the ifeq-check from mach-rockchip/Makefile, adds a
matching #if-check to boot_mode.c and fixes resulting link issues (if
boot_mode.o was not included due to the Makefile check) by defining a
stub function (in case the functionality is not built in) for
setup_boot_mode in boot_mode.c.

Fixes: e306779 (rockchip: make boot_mode related codes reused across all platforms)
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
arch/arm/mach-rockchip/Makefile
arch/arm/mach-rockchip/boot_mode.c