[U-Boot] [PATCHv5 17/17] kconfig: move FSL_PCIE_COMPAT to platform Kconfig
Zhiqiang Hou
Zhiqiang.Hou at nxp.com
Tue Dec 13 07:54:24 CET 2016
From: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou at nxp.com>
---
V5:
- No change
arch/arm/cpu/armv7/ls102xa/Kconfig | 8 ++++++++
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 11 +++++++++++
drivers/pci/pcie_layerscape_fixup.c | 8 ++++----
include/configs/ls1012aqds.h | 1 -
include/configs/ls1012ardb.h | 1 -
include/configs/ls1021aqds.h | 1 -
include/configs/ls1021atwr.h | 1 -
include/configs/ls1043a_common.h | 1 -
include/configs/ls2080a_common.h | 3 ---
9 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/arch/arm/cpu/armv7/ls102xa/Kconfig b/arch/arm/cpu/armv7/ls102xa/Kconfig
index f94568a..8b6e50d 100644
--- a/arch/arm/cpu/armv7/ls102xa/Kconfig
+++ b/arch/arm/cpu/armv7/ls102xa/Kconfig
@@ -92,4 +92,12 @@ config SYS_FSL_IFC_BANK_COUNT
depends on ARCH_LS1021A
default 8
+config FSL_PCIE_COMPAT
+ string "PCIe compatible of Kernel DT"
+ depends on PCIE_LAYERSCAPE
+ default "fsl,ls1021a-pcie" if ARCH_LS1021A
+ help
+ This compatible is used to find pci controller node in Kernel DT
+ to complete fixup.
+
endmenu
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index 6772584..b2fced1 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -147,4 +147,15 @@ config SYS_FSL_DDR4
help
Enable Freescale DDR4 controller.
+config FSL_PCIE_COMPAT
+ string "PCIe compatible of Kernel DT"
+ depends on PCIE_LAYERSCAPE
+ default "fsl,ls1012a-pcie" if ARCH_LS1012A
+ default "fsl,ls1043a-pcie" if ARCH_LS1043A
+ default "fsl,ls1046a-pcie" if ARCH_LS1046A
+ default "fsl,ls2080a-pcie" if ARCH_LS2080A
+ help
+ This compatible is used to find pci controller node in Kernel DT
+ to complete fixup.
+
endmenu
diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
index 47e621f..19ede2f 100644
--- a/drivers/pci/pcie_layerscape_fixup.c
+++ b/drivers/pci/pcie_layerscape_fixup.c
@@ -77,9 +77,9 @@ static void fdt_pcie_set_msi_map_entry(void *blob, struct ls_pcie *pcie,
nodeoffset = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie",
pcie->dbi_res.start);
if (nodeoffset < 0) {
-#ifdef FSL_PCIE_COMPAT /* Compatible with older version of dts node */
+#ifdef CONFIG_FSL_PCIE_COMPAT /* Compatible with older version of dts node */
nodeoffset = fdt_node_offset_by_compat_reg(blob,
- FSL_PCIE_COMPAT, pcie->dbi_res.start);
+ CONFIG_FSL_PCIE_COMPAT, pcie->dbi_res.start);
if (nodeoffset < 0)
return;
#else
@@ -150,9 +150,9 @@ static void ft_pcie_ls_setup(void *blob, struct ls_pcie *pcie)
off = fdt_node_offset_by_compat_reg(blob, "fsl,ls-pcie",
pcie->dbi_res.start);
if (off < 0) {
-#ifdef FSL_PCIE_COMPAT /* Compatible with older version of dts node */
+#ifdef CONFIG_FSL_PCIE_COMPAT /* Compatible with older version of dts node */
off = fdt_node_offset_by_compat_reg(blob,
- FSL_PCIE_COMPAT,
+ CONFIG_FSL_PCIE_COMPAT,
pcie->dbi_res.start);
if (off < 0)
return;
diff --git a/include/configs/ls1012aqds.h b/include/configs/ls1012aqds.h
index 0e4f6e3..cb30d10 100644
--- a/include/configs/ls1012aqds.h
+++ b/include/configs/ls1012aqds.h
@@ -155,7 +155,6 @@
#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
CONFIG_SYS_SCSI_MAX_LUN)
#define CONFIG_PCIE1 /* PCIE controller 1 */
-#define FSL_PCIE_COMPAT "fsl,ls1043a-pcie"
#define CONFIG_NET_MULTI
#define CONFIG_PCI_SCAN_SHOW
diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h
index d5573ba..3d9820d 100644
--- a/include/configs/ls1012ardb.h
+++ b/include/configs/ls1012ardb.h
@@ -68,7 +68,6 @@
#define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \
CONFIG_SYS_SCSI_MAX_LUN)
#define CONFIG_PCIE1 /* PCIE controller 1 */
-#define FSL_PCIE_COMPAT "fsl,ls1043a-pcie"
#define CONFIG_NET_MULTI
#define CONFIG_PCI_SCAN_SHOW
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index ef8a43c..f362f43 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -501,7 +501,6 @@ unsigned long get_board_ddr_clk(void);
/* PCIe */
#define CONFIG_PCIE1 /* PCIE controller 1 */
#define CONFIG_PCIE2 /* PCIE controller 2 */
-#define FSL_PCIE_COMPAT "fsl,ls1021a-pcie"
#ifdef CONFIG_PCI
#define CONFIG_PCI_SCAN_SHOW
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 0e87319..e3f658e 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -371,7 +371,6 @@
/* PCIe */
#define CONFIG_PCIE1 /* PCIE controller 1 */
#define CONFIG_PCIE2 /* PCIE controller 2 */
-#define FSL_PCIE_COMPAT "fsl,ls1021a-pcie"
#ifdef CONFIG_PCI
#define CONFIG_PCI_SCAN_SHOW
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 3600c4a..c89fd55 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -118,7 +118,6 @@
#define CONFIG_PCIE1 /* PCIE controller 1 */
#define CONFIG_PCIE2 /* PCIE controller 2 */
#define CONFIG_PCIE3 /* PCIE controller 3 */
-#define FSL_PCIE_COMPAT "fsl,ls1043a-pcie"
#ifdef CONFIG_PCI
#define CONFIG_NET_MULTI
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 805457d..eb628fd 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -170,9 +170,6 @@ unsigned long long get_qixis_addr(void);
#define CONFIG_SYS_MC_RSV_MEM_ALIGN (512UL * 1024 * 1024)
#endif
-/* PCIe */
-#define FSL_PCIE_COMPAT "fsl,ls2080a-pcie"
-
/* Command line configuration */
#define CONFIG_CMD_ENV
--
2.1.0.27.g96db324
More information about the U-Boot
mailing list