The driver is already in the tree and functional. Enable it by default
and also remove the board_early_init_f which was a temporary fix for
not having the pinctrl driver.

Signed-off-by: Marek Behun <marek.be...@nic.cz>
---
 board/Marvell/mvebu_armada-37xx/board.c     | 32 -----------------------------
 configs/mvebu_db-88f3720_defconfig          |  5 ++++-
 configs/mvebu_espressobin-88f3720_defconfig |  5 ++++-
 3 files changed, 8 insertions(+), 34 deletions(-)

diff --git a/board/Marvell/mvebu_armada-37xx/board.c 
b/board/Marvell/mvebu_armada-37xx/board.c
index ac3e3a392f..fdd42788d2 100644
--- a/board/Marvell/mvebu_armada-37xx/board.c
+++ b/board/Marvell/mvebu_armada-37xx/board.c
@@ -21,10 +21,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define I2C_IO_REG_0_SATA_OFF  2
 #define I2C_IO_REG_0_USB_H_OFF 1
 
-/* The pin control values are the same for DB and Espressobin */
-#define PINCTRL_NB_REG_VALUE   0x000173fa
-#define PINCTRL_SB_REG_VALUE   0x00007a23
-
 /* Ethernet switch registers */
 /* SMI addresses for multi-chip mode */
 #define MVEBU_PORT_CTRL_SMI_ADDR(p)    (16 + (p))
@@ -48,34 +44,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define MVEBU_G2_SMI_PHY_CMD_REG       (24)
 #define MVEBU_G2_SMI_PHY_DATA_REG      (25)
 
-int board_early_init_f(void)
-{
-       const void *blob = gd->fdt_blob;
-       const char *bank_name;
-       const char *compat = "marvell,armada-3700-pinctl";
-       int off, len;
-       void __iomem *addr;
-
-       /* FIXME
-        * Temporary WA for setting correct pin control values
-        * until the real pin control driver is awailable.
-        */
-       off = fdt_node_offset_by_compatible(blob, -1, compat);
-       while (off != -FDT_ERR_NOTFOUND) {
-               bank_name = fdt_getprop(blob, off, "bank-name", &len);
-               addr = (void __iomem *)fdtdec_get_addr_size_auto_noparent(
-                               blob, off, "reg", 0, NULL, true);
-               if (!strncmp(bank_name, "armada-3700-nb", len))
-                       writel(PINCTRL_NB_REG_VALUE, addr);
-               else if (!strncmp(bank_name, "armada-3700-sb", len))
-                       writel(PINCTRL_SB_REG_VALUE, addr);
-
-               off = fdt_node_offset_by_compatible(blob, off, compat);
-       }
-
-       return 0;
-}
-
 int board_init(void)
 {
        /* adress of boot parameters */
diff --git a/configs/mvebu_db-88f3720_defconfig 
b/configs/mvebu_db-88f3720_defconfig
index 1d6233a6ff..338d764d84 100644
--- a/configs/mvebu_db-88f3720_defconfig
+++ b/configs/mvebu_db-88f3720_defconfig
@@ -12,7 +12,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_ARCH_EARLY_INIT_R=y
-CONFIG_BOARD_EARLY_INIT_F=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
@@ -38,6 +37,10 @@ CONFIG_DM_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_XENON=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_GENERIC=y
+CONFIG_PINMUX=y
+CONFIG_PINCTRL_ARMADA_37XX=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/mvebu_espressobin-88f3720_defconfig 
b/configs/mvebu_espressobin-88f3720_defconfig
index 314d405ea3..28005e6131 100644
--- a/configs/mvebu_espressobin-88f3720_defconfig
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -12,7 +12,6 @@ CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_ARCH_EARLY_INIT_R=y
-CONFIG_BOARD_EARLY_INIT_F=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
@@ -35,6 +34,10 @@ CONFIG_DM_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_XENON=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_GENERIC=y
+CONFIG_PINMUX=y
+CONFIG_PINCTRL_ARMADA_37XX=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
-- 
2.16.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to