nxp: Make board/freescale/common/Kconfig safe to include once in arch/Kconfig

The way that we use this file currently means that we have to guard it
in every platform Kconfig.  But it is also required in all NXP
platforms, including non-reference platforms.  Make all options in it
have appropriate dependencies so that we can include it a single time
under arch/Kconfig

Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/board/freescale/common/Kconfig b/board/freescale/common/Kconfig
index 195fc47..85acdde 100644
--- a/board/freescale/common/Kconfig
+++ b/board/freescale/common/Kconfig
@@ -16,7 +16,8 @@
 
 config CMD_ESBC_VALIDATE
 	bool "Enable the 'esbc_validate' and 'esbc_halt' commands"
-	default y if CHAIN_OF_TRUST
+	depends on CHAIN_OF_TRUST
+	default y
 	help
 	  This option enables two commands used for secure booting:
 
@@ -25,26 +26,28 @@
 
 config DEEP_SLEEP
 	bool "Enable SoC deep sleep feature"
-	default y if ARCH_T1024 || ARCH_T1040 || ARCH_T1042 || ARCH_LS1021A
+	depends on ARCH_T1024 || ARCH_T1040 || ARCH_T1042 || ARCH_LS1021A
+	default y
 	help
 	  Indicates this SoC supports deep sleep feature. If deep sleep is
 	  supported, core will start to execute uboot when wakes up.
 
 config FSL_USE_PCA9547_MUX
 	bool "Enable PCA9547 I2C Mux on Freescale boards"
+	depends on PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
 	help
 	 This option enables the PCA9547 I2C mux on Freescale boards.
 
 config VID
 	bool "Enable Freescale VID"
-	depends on I2C || DM_I2C
+	depends on (PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3) && (I2C || DM_I2C)
 	help
 	 This option enables setting core voltage based on individual
 	 values saved in SoC fuses.
 
 config SPL_VID
 	bool "Enable Freescale VID in SPL"
-	depends on I2C || DM_I2C
+	depends on (PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3) && (SPL_I2C || DM_SPL_I2C)
 	help
 	 This option enables setting core voltage based on individual
 	 values saved in SoC fuses, in SPL.
@@ -103,6 +106,7 @@
 
 config FSL_QIXIS
 	bool "Enable QIXIS support"
+	depends on PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3
 
 config QIXIS_I2C_ACCESS
 	bool "Access to QIXIS is over i2c"
diff --git a/board/freescale/corenet_ds/Kconfig b/board/freescale/corenet_ds/Kconfig
index e92b0d0..dbcd1af 100644
--- a/board/freescale/corenet_ds/Kconfig
+++ b/board/freescale/corenet_ds/Kconfig
@@ -9,8 +9,6 @@
 config SYS_CONFIG_NAME
 	default "P3041DS"
 
-source "board/freescale/common/Kconfig"
-
 endif
 
 if TARGET_P4080DS
@@ -24,8 +22,6 @@
 config SYS_CONFIG_NAME
 	default "P4080DS"
 
-source "board/freescale/common/Kconfig"
-
 endif
 
 if TARGET_P5040DS
@@ -39,6 +35,4 @@
 config SYS_CONFIG_NAME
 	default "P5040DS"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/imx8mn_evk/Kconfig b/board/freescale/imx8mn_evk/Kconfig
index 0adf87b..a148a9b 100644
--- a/board/freescale/imx8mn_evk/Kconfig
+++ b/board/freescale/imx8mn_evk/Kconfig
@@ -15,6 +15,4 @@
 config IMX_CONFIG
 	default "board/freescale/imx8mn_evk/imximage-8mn-ddr4.cfg"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/imx8mp_evk/Kconfig b/board/freescale/imx8mp_evk/Kconfig
index 42625fd..cafa632 100644
--- a/board/freescale/imx8mp_evk/Kconfig
+++ b/board/freescale/imx8mp_evk/Kconfig
@@ -12,6 +12,4 @@
 config IMX_CONFIG
 	default "board/freescale/imx8mp_evk/imximage-8mp-lpddr4.cfg"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/imx8qm_mek/Kconfig b/board/freescale/imx8qm_mek/Kconfig
index aed6ab2..5f2413f 100644
--- a/board/freescale/imx8qm_mek/Kconfig
+++ b/board/freescale/imx8qm_mek/Kconfig
@@ -12,6 +12,4 @@
 config IMX_CONFIG
 	default "board/freescale/imx8qm_mek/imximage.cfg"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/imx8qxp_mek/Kconfig b/board/freescale/imx8qxp_mek/Kconfig
index b9aab37..6533b4d 100644
--- a/board/freescale/imx8qxp_mek/Kconfig
+++ b/board/freescale/imx8qxp_mek/Kconfig
@@ -12,6 +12,4 @@
 config IMX_CONFIG
 	default "board/freescale/imx8qxp_mek/imximage.cfg"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/imx8ulp_evk/Kconfig b/board/freescale/imx8ulp_evk/Kconfig
index 1e461ee..4637b96 100644
--- a/board/freescale/imx8ulp_evk/Kconfig
+++ b/board/freescale/imx8ulp_evk/Kconfig
@@ -9,6 +9,4 @@
 config SYS_CONFIG_NAME
 	default "imx8ulp_evk"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1012afrdm/Kconfig b/board/freescale/ls1012afrdm/Kconfig
index 4ac69d7..75de782af 100644
--- a/board/freescale/ls1012afrdm/Kconfig
+++ b/board/freescale/ls1012afrdm/Kconfig
@@ -89,7 +89,3 @@
 	hex "length of PFE Firmware HDR"
 	default 0xc00
 endif
-
-if TARGET_LS1012AFRDM || TARGET_LS1012AFRWY
-source "board/freescale/common/Kconfig"
-endif
diff --git a/board/freescale/ls1012aqds/Kconfig b/board/freescale/ls1012aqds/Kconfig
index 59b1a87..991ba60 100644
--- a/board/freescale/ls1012aqds/Kconfig
+++ b/board/freescale/ls1012aqds/Kconfig
@@ -77,7 +77,4 @@
 
 endif
 
-
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1012ardb/Kconfig b/board/freescale/ls1012ardb/Kconfig
index c4acea3..aa15f5a 100644
--- a/board/freescale/ls1012ardb/Kconfig
+++ b/board/freescale/ls1012ardb/Kconfig
@@ -63,8 +63,6 @@
 
 endif
 
-source "board/freescale/common/Kconfig"
-
 endif
 
 if TARGET_LS1012A2G5RDB
@@ -119,6 +117,4 @@
 
 endif
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1021aiot/Kconfig b/board/freescale/ls1021aiot/Kconfig
index c6b1606..4a12c16 100644
--- a/board/freescale/ls1021aiot/Kconfig
+++ b/board/freescale/ls1021aiot/Kconfig
@@ -12,6 +12,4 @@
 config SYS_CONFIG_NAME
 	default "ls1021aiot"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1021aqds/Kconfig b/board/freescale/ls1021aqds/Kconfig
index 60b8472..119b955 100644
--- a/board/freescale/ls1021aqds/Kconfig
+++ b/board/freescale/ls1021aqds/Kconfig
@@ -12,6 +12,4 @@
 config SYS_CONFIG_NAME
 	default "ls1021aqds"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1021atsn/Kconfig b/board/freescale/ls1021atsn/Kconfig
index d999fa4..aa42a06 100644
--- a/board/freescale/ls1021atsn/Kconfig
+++ b/board/freescale/ls1021atsn/Kconfig
@@ -13,6 +13,4 @@
 config SYS_CONFIG_NAME
 	default "ls1021atsn"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1021atwr/Kconfig b/board/freescale/ls1021atwr/Kconfig
index a4641cb..bc50b8d 100644
--- a/board/freescale/ls1021atwr/Kconfig
+++ b/board/freescale/ls1021atwr/Kconfig
@@ -12,6 +12,4 @@
 config SYS_CONFIG_NAME
 	default "ls1021atwr"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1028a/Kconfig b/board/freescale/ls1028a/Kconfig
index 4093981..5c27f0f 100644
--- a/board/freescale/ls1028a/Kconfig
+++ b/board/freescale/ls1028a/Kconfig
@@ -32,8 +32,6 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
-
 endif
 
 if TARGET_LS1028ARDB
@@ -58,6 +56,4 @@
 	default 0x82000000 if TFABOOT
 	default 0x20100000
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1043aqds/Kconfig b/board/freescale/ls1043aqds/Kconfig
index 182900e..4be445e 100644
--- a/board/freescale/ls1043aqds/Kconfig
+++ b/board/freescale/ls1043aqds/Kconfig
@@ -28,6 +28,4 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1043ardb/Kconfig b/board/freescale/ls1043ardb/Kconfig
index d66c780..56502f9 100644
--- a/board/freescale/ls1043ardb/Kconfig
+++ b/board/freescale/ls1043ardb/Kconfig
@@ -27,6 +27,4 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1046afrwy/Kconfig b/board/freescale/ls1046afrwy/Kconfig
index 6a4c3e9..68329d7 100644
--- a/board/freescale/ls1046afrwy/Kconfig
+++ b/board/freescale/ls1046afrwy/Kconfig
@@ -13,5 +13,4 @@
 config SYS_CONFIG_NAME
 	default "ls1046afrwy"
 
-source "board/freescale/common/Kconfig"
 endif
diff --git a/board/freescale/ls1046aqds/Kconfig b/board/freescale/ls1046aqds/Kconfig
index 1616dcc..adf325f 100644
--- a/board/freescale/ls1046aqds/Kconfig
+++ b/board/freescale/ls1046aqds/Kconfig
@@ -28,6 +28,4 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls1046ardb/Kconfig b/board/freescale/ls1046ardb/Kconfig
index 4c31e0e..1fb391c 100644
--- a/board/freescale/ls1046ardb/Kconfig
+++ b/board/freescale/ls1046ardb/Kconfig
@@ -27,5 +27,4 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
 endif
diff --git a/board/freescale/ls1088a/Kconfig b/board/freescale/ls1088a/Kconfig
index 8bb828e..f1a4523 100644
--- a/board/freescale/ls1088a/Kconfig
+++ b/board/freescale/ls1088a/Kconfig
@@ -26,7 +26,6 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
 endif
 
 if TARGET_LS1088ARDB
@@ -57,5 +56,4 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
 endif
diff --git a/board/freescale/ls2080aqds/Kconfig b/board/freescale/ls2080aqds/Kconfig
index 6b2b645..1036f33 100644
--- a/board/freescale/ls2080aqds/Kconfig
+++ b/board/freescale/ls2080aqds/Kconfig
@@ -29,6 +29,4 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/ls2080ardb/Kconfig b/board/freescale/ls2080ardb/Kconfig
index 678d582..c8b0b94 100644
--- a/board/freescale/ls2080ardb/Kconfig
+++ b/board/freescale/ls2080ardb/Kconfig
@@ -12,8 +12,6 @@
 config SYS_CONFIG_NAME
 	default "ls2080ardb"
 
-source "board/freescale/common/Kconfig"
-
 if FSL_LS_PPA
 config SYS_LS_PPA_FW_ADDR
 	hex "PPA Firmware Addr"
@@ -30,6 +28,4 @@
 endif
 endif
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/lx2160a/Kconfig b/board/freescale/lx2160a/Kconfig
index 7556f7d..0e4b415 100644
--- a/board/freescale/lx2160a/Kconfig
+++ b/board/freescale/lx2160a/Kconfig
@@ -12,7 +12,6 @@
 config SYS_CONFIG_NAME
 	default "lx2160ardb"
 
-source "board/freescale/common/Kconfig"
 endif
 
 if TARGET_LX2160AQDS
@@ -29,7 +28,6 @@
 config SYS_CONFIG_NAME
 	default "lx2160aqds"
 
-source "board/freescale/common/Kconfig"
 endif
 
 if TARGET_LX2162AQDS
@@ -46,5 +44,4 @@
 config SYS_CONFIG_NAME
 	default "lx2162aqds"
 
-source "board/freescale/common/Kconfig"
 endif
diff --git a/board/freescale/p1010rdb/Kconfig b/board/freescale/p1010rdb/Kconfig
index 3adac4a..159bcc4 100644
--- a/board/freescale/p1010rdb/Kconfig
+++ b/board/freescale/p1010rdb/Kconfig
@@ -9,6 +9,4 @@
 config SYS_CONFIG_NAME
 	default "P1010RDB"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/p1_p2_rdb_pc/Kconfig b/board/freescale/p1_p2_rdb_pc/Kconfig
index db7b47a..cd36150 100644
--- a/board/freescale/p1_p2_rdb_pc/Kconfig
+++ b/board/freescale/p1_p2_rdb_pc/Kconfig
@@ -11,6 +11,4 @@
 config SYS_CONFIG_NAME
 	default "p1_p2_rdb_pc"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/p2041rdb/Kconfig b/board/freescale/p2041rdb/Kconfig
index 7e187dd..78e1121 100644
--- a/board/freescale/p2041rdb/Kconfig
+++ b/board/freescale/p2041rdb/Kconfig
@@ -9,6 +9,4 @@
 config SYS_CONFIG_NAME
 	default "P2041RDB"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/t102xrdb/Kconfig b/board/freescale/t102xrdb/Kconfig
index 6deeb24..d538386 100644
--- a/board/freescale/t102xrdb/Kconfig
+++ b/board/freescale/t102xrdb/Kconfig
@@ -9,6 +9,4 @@
 config SYS_CONFIG_NAME
 	default "T102xRDB"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/t104xrdb/Kconfig b/board/freescale/t104xrdb/Kconfig
index e6e46fa..e33d317 100644
--- a/board/freescale/t104xrdb/Kconfig
+++ b/board/freescale/t104xrdb/Kconfig
@@ -11,6 +11,4 @@
 config SYS_CONFIG_NAME
 	default "T104xRDB"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/t208xqds/Kconfig b/board/freescale/t208xqds/Kconfig
index 58a31b6..c419a59 100644
--- a/board/freescale/t208xqds/Kconfig
+++ b/board/freescale/t208xqds/Kconfig
@@ -12,6 +12,4 @@
 config SRIO_PCIE_BOOT_SLAVE
 	bool "Boot as a SRIO PCIe slave device"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/t208xrdb/Kconfig b/board/freescale/t208xrdb/Kconfig
index d4c061a..35d884e 100644
--- a/board/freescale/t208xrdb/Kconfig
+++ b/board/freescale/t208xrdb/Kconfig
@@ -12,6 +12,4 @@
 config T2080RDB_REV_D
 	bool "Support for T2080RDB revisions D and up"
 
-source "board/freescale/common/Kconfig"
-
 endif
diff --git a/board/freescale/t4rdb/Kconfig b/board/freescale/t4rdb/Kconfig
index 542e574..d93e453 100644
--- a/board/freescale/t4rdb/Kconfig
+++ b/board/freescale/t4rdb/Kconfig
@@ -9,6 +9,4 @@
 config SYS_CONFIG_NAME
 	default "T4240RDB"
 
-source "board/freescale/common/Kconfig"
-
 endif