Updates the board configuration to enable use of the PCA9547 I2C mux.

Signed-off-by: Stephen Carlson <stcar...@linux.microsoft.com>
---
 board/freescale/ls1043aqds/ls1043aqds.c      | 27 +-------------------
 configs/ls1043aqds_defconfig                 |  1 +
 configs/ls1043aqds_lpuart_defconfig          |  1 +
 configs/ls1043aqds_nand_defconfig            |  1 +
 configs/ls1043aqds_nor_ddr3_defconfig        |  1 +
 configs/ls1043aqds_qspi_defconfig            |  1 +
 configs/ls1043aqds_sdcard_ifc_defconfig      |  1 +
 configs/ls1043aqds_sdcard_qspi_defconfig     |  1 +
 configs/ls1043aqds_tfa_SECURE_BOOT_defconfig |  1 +
 configs/ls1043aqds_tfa_defconfig             |  1 +
 10 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/board/freescale/ls1043aqds/ls1043aqds.c 
b/board/freescale/ls1043aqds/ls1043aqds.c
index 5b131d1d67..76bbb6087a 100644
--- a/board/freescale/ls1043aqds/ls1043aqds.c
+++ b/board/freescale/ls1043aqds/ls1043aqds.c
@@ -28,6 +28,7 @@
 #include <fsl_esdhc.h>
 #include <fsl_ifc.h>
 #include <spl.h>
+#include "../common/i2c_mux.h"

 #include "../common/qixis.h"
 #include "ls1043aqds_qixis.h"
@@ -279,32 +280,6 @@ unsigned long get_board_ddr_clk(void)
        return 66666666;
 }

-int select_i2c_ch_pca9547(u8 ch, int bus_num)
-{
-       int ret;
-
-#if CONFIG_IS_ENABLED(DM_I2C)
-       struct udevice *dev;
-
-       ret = i2c_get_chip_for_busnum(bus_num, I2C_MUX_PCA_ADDR_PRI,
-                                     1, &dev);
-       if (ret) {
-               printf("%s: Cannot find udev for a bus %d\n", __func__,
-                      bus_num);
-               return ret;
-       }
-       ret = dm_i2c_write(dev, 0, &ch, 1);
-#else
-       ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
-#endif
-       if (ret) {
-               puts("PCA: failed to select proper channel\n");
-               return ret;
-       }
-
-       return 0;
-}
-
 int dram_init(void)
 {
        /*
diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index 5e04dca25c..6fc6c327ba 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -69,3 +69,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1043aqds_lpuart_defconfig 
b/configs/ls1043aqds_lpuart_defconfig
index 8f479b7cb2..b2223b8d4e 100644
--- a/configs/ls1043aqds_lpuart_defconfig
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -71,3 +71,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1043aqds_nand_defconfig 
b/configs/ls1043aqds_nand_defconfig
index f0951cdf3e..42830d3228 100644
--- a/configs/ls1043aqds_nand_defconfig
+++ b/configs/ls1043aqds_nand_defconfig
@@ -85,3 +85,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1043aqds_nor_ddr3_defconfig 
b/configs/ls1043aqds_nor_ddr3_defconfig
index 1de948f48c..481f6eaa6f 100644
--- a/configs/ls1043aqds_nor_ddr3_defconfig
+++ b/configs/ls1043aqds_nor_ddr3_defconfig
@@ -70,3 +70,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1043aqds_qspi_defconfig 
b/configs/ls1043aqds_qspi_defconfig
index 8a98ce9977..fb105f3cd0 100644
--- a/configs/ls1043aqds_qspi_defconfig
+++ b/configs/ls1043aqds_qspi_defconfig
@@ -66,3 +66,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1043aqds_sdcard_ifc_defconfig 
b/configs/ls1043aqds_sdcard_ifc_defconfig
index 11b46211dc..f518517309 100644
--- a/configs/ls1043aqds_sdcard_ifc_defconfig
+++ b/configs/ls1043aqds_sdcard_ifc_defconfig
@@ -86,3 +86,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1043aqds_sdcard_qspi_defconfig 
b/configs/ls1043aqds_sdcard_qspi_defconfig
index 1fe1dee7a9..10e87b7df9 100644
--- a/configs/ls1043aqds_sdcard_qspi_defconfig
+++ b/configs/ls1043aqds_sdcard_qspi_defconfig
@@ -80,3 +80,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig 
b/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
index 29e47cd55a..03effc67c9 100644
--- a/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
+++ b/configs/ls1043aqds_tfa_SECURE_BOOT_defconfig
@@ -72,3 +72,4 @@ CONFIG_RSA=y
 CONFIG_SPL_RSA=y
 CONFIG_RSA_SOFTWARE_EXP=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
diff --git a/configs/ls1043aqds_tfa_defconfig b/configs/ls1043aqds_tfa_defconfig
index 4d6a644a02..00afe589a1 100644
--- a/configs/ls1043aqds_tfa_defconfig
+++ b/configs/ls1043aqds_tfa_defconfig
@@ -79,3 +79,4 @@ CONFIG_DM_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_EFI_LOADER_BOUNCE_BUFFER=y
+CONFIG_FSL_USE_PCA9547_MUX=y
--
2.17.1

Reply via email to