]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: engicam: Attach i.MX6 common code
authorJagan Teki <jagan@amarulasolutions.com>
Wed, 28 Oct 2020 13:33:44 +0000 (19:03 +0530)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 30 Oct 2020 15:31:26 +0000 (23:31 +0800)
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>
board/engicam/common/Kconfig [new file with mode: 0644]
board/engicam/common/Makefile
board/engicam/imx6q/Kconfig
board/engicam/imx6ul/Kconfig

diff --git a/board/engicam/common/Kconfig b/board/engicam/common/Kconfig
new file mode 100644 (file)
index 0000000..38328fd
--- /dev/null
@@ -0,0 +1,8 @@
+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.
index b392bf6cb1df7b1b7f29181d973ce2554cd3f793..15f0eaa1ec49f8f5fc8b78e97e280b170a8c23b1 100644 (file)
@@ -1,5 +1,8 @@
 # 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
index 48eb60c09a1548073435423ceb85881c91568aa2..fab8da0e73d5a159f29f3e45554decd6bc41dc42 100644 (file)
@@ -9,4 +9,6 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
        default "imx6-engicam"
 
+source "board/engicam/common/Kconfig"
+
 endif
index e91dd15970c8b2912e4c24f56ef5d16dbf5de3fd..58f25d0623920691ce0a82c9381be2f59cce1b2c 100644 (file)
@@ -9,4 +9,6 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
        default "imx6-engicam"
 
+source "board/engicam/common/Kconfig"
+
 endif