Merge "ipq807x: Moved Peripheral configs to defconfig"
diff --git a/board/ipq807x/Kconfig b/board/ipq807x/Kconfig
index 77d0005..d0affc4 100644
--- a/board/ipq807x/Kconfig
+++ b/board/ipq807x/Kconfig
@@ -10,3 +10,12 @@
 config SYS_CONFIG_NAME
        default "ipq807x"
 
+config IPQ807x_I2C
+	bool "Enable i2c support for ipq807x"
+
+config USB_XHCI_IPQ
+	bool "ipq807x usb support for ipq807x"
+
+config PCI_IPQ
+	bool "ipq807x pci support for ipq807x"
+
diff --git a/board/qca/arm/common/cmd_bootqca.c b/board/qca/arm/common/cmd_bootqca.c
index 01255a7..6d18e3a 100644
--- a/board/qca/arm/common/cmd_bootqca.c
+++ b/board/qca/arm/common/cmd_bootqca.c
@@ -323,13 +323,16 @@
 static int do_boot_signedimg(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
 	char runcmd[256];
-	int ret,i;
+	int ret;
 	unsigned int request;
 #ifdef CONFIG_QCA_MMC
 	block_dev_desc_t *blk_dev;
 	disk_partition_t disk_info;
 	unsigned int active_part = 0;
 #endif
+#ifdef CONFIG_USB_XHCI_IPQ
+	int i;
+#endif
 
 	if (argc == 2 && strncmp(argv[1], "debug", 5) == 0)
 		debug = 1;
@@ -503,13 +506,16 @@
 
 static int do_boot_unsignedimg(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {
-	int ret,i;
+	int ret;
 	char runcmd[256];
 #ifdef CONFIG_QCA_MMC
 	block_dev_desc_t *blk_dev;
 	disk_partition_t disk_info;
 	unsigned int active_part = 0;
 #endif
+#ifdef CONFIG_USB_XHCI_IPQ
+	int i;
+#endif
 
 	if (argc == 2 && strncmp(argv[1], "debug", 5) == 0)
 		debug = 1;
diff --git a/board/qca/arm/ipq807x/ipq807x.c b/board/qca/arm/ipq807x/ipq807x.c
index 96b4ead..05ea6bd 100644
--- a/board/qca/arm/ipq807x/ipq807x.c
+++ b/board/qca/arm/ipq807x/ipq807x.c
@@ -58,7 +58,9 @@
 			  "sbl",
 			  NULL};
 const add_node_t add_fdt_node[] = {{}};
+#ifdef CONFIG_PCI_IPQ
 static int pci_initialised;
+#endif
 static int aq_phy_initialised;
 struct dumpinfo_t dumpinfo_n[] = {
 	/* TZ stores the DDR physical address at which it stores the
@@ -539,6 +541,7 @@
 #endif
 }
 
+#ifdef CONFIG_PCI_IPQ
 static void pcie_clock_init(int id)
 {
 
@@ -657,7 +660,6 @@
 	}
 }
 
-#ifdef CONFIG_PCI_IPQ
 void board_pci_init(int id)
 {
 	int node, gpio_node;
diff --git a/configs/ipq807x_defconfig b/configs/ipq807x_defconfig
index 0de4a40..e719e54 100644
--- a/configs/ipq807x_defconfig
+++ b/configs/ipq807x_defconfig
@@ -177,6 +177,7 @@
 #
 # CONFIG_DM_I2C_COMPAT is not set
 # CONFIG_CROS_EC_KEYB is not set
+CONFIG_IPQ807x_I2C=y
 
 #
 # LED Support
@@ -219,6 +220,7 @@
 # PCI
 #
 # CONFIG_DM_PCI is not set
+CONFIG_PCI_IPQ=y
 
 #
 # Pin controllers
@@ -260,6 +262,7 @@
 #
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_USB_XHCI_IPQ=y
 
 #
 # Graphics support
diff --git a/configs/ipq807x_tiny_defconfig b/configs/ipq807x_tiny_defconfig
index 0de4a40..9865039 100644
--- a/configs/ipq807x_tiny_defconfig
+++ b/configs/ipq807x_tiny_defconfig
@@ -177,6 +177,7 @@
 #
 # CONFIG_DM_I2C_COMPAT is not set
 # CONFIG_CROS_EC_KEYB is not set
+# CONFIG_IPQ807x_I2C is not set
 
 #
 # LED Support
@@ -219,6 +220,7 @@
 # PCI
 #
 # CONFIG_DM_PCI is not set
+# CONFIG_PCI_IPQ is not set
 
 #
 # Pin controllers
@@ -258,8 +260,9 @@
 #
 # USB support
 #
-CONFIG_USB=y
-CONFIG_DM_USB=y
+# CONFIG_USB is not set
+# CONFIG_DM_USB is not set
+# CONFIG_USB_XHCI_IPQ is not set
 
 #
 # Graphics support
diff --git a/include/configs/ipq807x.h b/include/configs/ipq807x.h
index 604475f..3f2eb19 100644
--- a/include/configs/ipq807x.h
+++ b/include/configs/ipq807x.h
@@ -72,7 +72,6 @@
           text_base  --> |------------|
 */
 
-#define CONFIG_IPQ807x_I2C	1
 #ifdef CONFIG_IPQ807x_I2C
 #define CONFIG_SYS_I2C_QUP
 #define CONFIG_CMD_I2C
@@ -274,7 +273,6 @@
 /*
  * USB Support
  */
-#define CONFIG_USB_XHCI_IPQ
 #ifdef CONFIG_USB_XHCI_IPQ
 #define CONFIG_USB_XHCI
 #define CONFIG_USB_XHCI_DWC3
@@ -285,7 +283,6 @@
 #define CONFIG_USB_MAX_CONTROLLER_COUNT         2
 #endif
 
-#define CONFIG_PCI_IPQ
 #define PCI_MAX_DEVICES	2
 #ifdef CONFIG_PCI_IPQ
 #define CONFIG_PCI