[U-Boot] [PATCH 3/7] ARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.

Peter Griffin peter.griffin at linaro.org
Wed Apr 20 18:13:59 CEST 2016


Currently only the serial pl01x driver is using DT,
and the other drivers still use platform data but
as more DT lands in the upstream kernel the aim is
to migrate the other drivers over to DT as well to
have a fully DT configured hikey u-boot.

Signed-off-by: Peter Griffin <peter.griffin at linaro.org>
---
 arch/arm/Kconfig              | 1 +
 arch/arm/dts/Makefile         | 2 ++
 board/hisilicon/hikey/hikey.c | 3 +++
 configs/hikey_defconfig       | 1 +
 4 files changed, 7 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index bf5e18a..fa506bb 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -668,6 +668,7 @@ config TARGET_HIKEY
 	select DM
 	select DM_GPIO
 	select DM_SERIAL
+	select OF_CONTROL
 	  help
 	  Support for HiKey 96boards platform. It features a HI6220
 	  SoC, with 8xA53 CPU, mali450 gpu, and 1GB RAM.
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 0da9e3b..4d1981c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -11,6 +11,8 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
 	exynos4412-trats2.dtb \
 	exynos4412-odroid.dtb
 
+dtb-$(CONFIG_TARGET_HIKEY) += hi6220-hikey.dtb
+
 dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
 	exynos5250-snow.dtb \
 	exynos5250-spring.dtb \
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index 3b484a9..3f0a0cc 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -71,6 +71,8 @@ U_BOOT_DEVICES(hi6220_gpios) = {
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#if !CONFIG_IS_ENABLED(OF_CONTROL)
+
 static const struct pl01x_serial_platdata serial_platdata = {
 #if CONFIG_CONS_INDEX == 1
 	.base = HI6220_UART0_BASE,
@@ -87,6 +89,7 @@ U_BOOT_DEVICE(hikey_seriala) = {
 	.name = "serial_pl01x",
 	.platdata = &serial_platdata,
 };
+#endif
 
 static struct mm_region hikey_mem_map[] = {
 	{
diff --git a/configs/hikey_defconfig b/configs/hikey_defconfig
index 8b75642..e7b7496 100644
--- a/configs/hikey_defconfig
+++ b/configs/hikey_defconfig
@@ -3,3 +3,4 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_GPIO=y
 CONFIG_OF_LIBFDT=y
+CONFIG_DEFAULT_DEVICE_TREE="hi6220-hikey"
-- 
1.9.1



More information about the U-Boot mailing list