From f7b08a82109bbdf1e4e0ff4ac8935097907e9c43 Mon Sep 17 00:00:00 2001 From: Gokul Sriram Palanisamy Date: Mon, 28 Jan 2019 19:03:43 +0530 Subject: [PATCH] ipq807x: Moved Peripheral configs to defconfig Moved PCI, USB and I2C configs to defconfig and disabled for tiny variant to reduce image size. Change-Id: I8dfdd75057527779e7af246bea796a22d50575fc Signed-off-by: Gokul Sriram Palanisamy --- board/ipq807x/Kconfig | 9 +++++++++ board/qca/arm/common/cmd_bootqca.c | 10 ++++++++-- board/qca/arm/ipq807x/ipq807x.c | 4 +++- configs/ipq807x_defconfig | 3 +++ configs/ipq807x_tiny_defconfig | 7 +++++-- include/configs/ipq807x.h | 3 --- 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/board/ipq807x/Kconfig b/board/ipq807x/Kconfig index 77d0005f2a..d0affc4077 100644 --- a/board/ipq807x/Kconfig +++ b/board/ipq807x/Kconfig @@ -10,3 +10,12 @@ config SYS_VENDOR 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 01255a7f68..6d18e3a51f 100644 --- a/board/qca/arm/common/cmd_bootqca.c +++ b/board/qca/arm/common/cmd_bootqca.c @@ -323,13 +323,16 @@ static int authenticate_rootfs(unsigned int kernel_addr) 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_signedimg(cmd_tbl_t *cmdtp, int flag, int argc, char *const a 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 96b4eade2c..05ea6bdc23 100644 --- a/board/qca/arm/ipq807x/ipq807x.c +++ b/board/qca/arm/ipq807x/ipq807x.c @@ -58,7 +58,9 @@ const char *del_node[] = {"uboot", "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 @@ void board_nand_init(void) #endif } +#ifdef CONFIG_PCI_IPQ static void pcie_clock_init(int id) { @@ -657,7 +660,6 @@ static void pcie_clock_deinit(int id) } } -#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 0de4a409ea..e719e54526 100644 --- a/configs/ipq807x_defconfig +++ b/configs/ipq807x_defconfig @@ -177,6 +177,7 @@ CONFIG_SIMPLE_BUS=y # # CONFIG_DM_I2C_COMPAT is not set # CONFIG_CROS_EC_KEYB is not set +CONFIG_IPQ807x_I2C=y # # LED Support @@ -219,6 +220,7 @@ CONFIG_SIMPLE_BUS=y # PCI # # CONFIG_DM_PCI is not set +CONFIG_PCI_IPQ=y # # Pin controllers @@ -260,6 +262,7 @@ CONFIG_REQUIRE_SERIAL_CONSOLE=y # 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 0de4a409ea..9865039a2e 100644 --- a/configs/ipq807x_tiny_defconfig +++ b/configs/ipq807x_tiny_defconfig @@ -177,6 +177,7 @@ CONFIG_SIMPLE_BUS=y # # 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 @@ CONFIG_SIMPLE_BUS=y # PCI # # CONFIG_DM_PCI is not set +# CONFIG_PCI_IPQ is not set # # Pin controllers @@ -258,8 +260,9 @@ CONFIG_REQUIRE_SERIAL_CONSOLE=y # # 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 604475f732..3f2eb193b3 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 @@ extern loff_t board_env_size; /* * 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 @@ extern loff_t board_env_size; #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #endif -#define CONFIG_PCI_IPQ #define PCI_MAX_DEVICES 2 #ifdef CONFIG_PCI_IPQ #define CONFIG_PCI