The existing common code for Engicam boards uses i.MX6,
so attach that into i.MX6 Engicam boards so-that adding
new SoC variants of Engicam boards become meaningful.
Add support for it.
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
--- /dev/null
+config IMX6_ENGICAM_COMMON
+ bool "Engicam i.MX6 Common code"
+ depends on SPL && MX6
+ default y if TARGET_MX6Q_ENGICAM || TARGET_MX6UL_ENGICAM
+ help
+ Common SPL and U-Boot proper code for Engicam i.MX6 targets.
+
+ Enable it in board Kconfig if it uses i.MX6 variant Engicam boards.
# SPDX-License-Identifier: GPL-2.0+
# Copyright (C) 2016 Amarula Solutions B.V.
-obj-y := board.o
-obj-$(CONFIG_SPL_BUILD) += spl.o
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_IMX6_ENGICAM_COMMON) += spl.o
+else
+obj-$(CONFIG_IMX6_ENGICAM_COMMON) += board.o
+endif
config SYS_CONFIG_NAME
default "imx6-engicam"
+source "board/engicam/common/Kconfig"
+
endif
config SYS_CONFIG_NAME
default "imx6-engicam"
+source "board/engicam/common/Kconfig"
+
endif