mx6ul_14x14_evk: don't use array for SD2 card detect pad
authorEric Nelson <eric@nelint.com>
Fri, 5 Aug 2016 23:51:17 +0000 (16:51 -0700)
committerStefano Babic <sbabic@denx.de>
Tue, 6 Sep 2016 16:22:48 +0000 (18:22 +0200)
Only a single pad is changed to change sdhc2_dat3 from an
SDIO pin to and from GPIO4:5, so remove the array and use
the imx_iomux_v3_setup_pad() routine.

Signed-off-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c

index 66d679556b45c95dde3524fb2d6e8d8dee9db5b8..c2138612a10adf00d035093455df875676836dd4 100644 (file)
@@ -277,18 +277,16 @@ static iomux_v3_cfg_t const usdhc2_pads[] = {
        MX6_PAD_NAND_DATA03__USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const usdhc2_cd_pads[] = {
-       /*
-        * The evk board uses DAT3 to detect CD card plugin,
-        * in u-boot we mux the pin to GPIO when doing board_mmc_getcd.
-        */
-       MX6_PAD_NAND_DATA03__GPIO4_IO05 | MUX_PAD_CTRL(USDHC_DAT3_CD_PAD_CTRL),
-};
+/*
+ * The evk board uses DAT3 to detect CD card plugin,
+ * in u-boot we mux the pin to GPIO when doing board_mmc_getcd.
+ */
+static iomux_v3_cfg_t const usdhc2_cd_pad =
+       MX6_PAD_NAND_DATA03__GPIO4_IO05 | MUX_PAD_CTRL(USDHC_DAT3_CD_PAD_CTRL);
 
-static iomux_v3_cfg_t const usdhc2_dat3_pads[] = {
+static iomux_v3_cfg_t const usdhc2_dat3_pad =
        MX6_PAD_NAND_DATA03__USDHC2_DATA3 |
-       MUX_PAD_CTRL(USDHC_DAT3_CD_PAD_CTRL),
-};
+       MUX_PAD_CTRL(USDHC_DAT3_CD_PAD_CTRL);
 #endif
 
 static void setup_iomux_uart(void)
@@ -351,8 +349,7 @@ int board_mmc_getcd(struct mmc *mmc)
 #if defined(CONFIG_MX6UL_14X14_EVK_EMMC_REWORK)
                ret = 1;
 #else
-               imx_iomux_v3_setup_multiple_pads(usdhc2_cd_pads,
-                                                ARRAY_SIZE(usdhc2_cd_pads));
+               imx_iomux_v3_setup_pad(usdhc2_cd_pad);
                gpio_direction_input(USDHC2_CD_GPIO);
 
                /*
@@ -361,8 +358,7 @@ int board_mmc_getcd(struct mmc *mmc)
                 */
                ret = gpio_get_value(USDHC2_CD_GPIO);
 
-               imx_iomux_v3_setup_multiple_pads(usdhc2_dat3_pads,
-                                                ARRAY_SIZE(usdhc2_dat3_pads));
+               imx_iomux_v3_setup_pad(usdhc2_dat3_pad);
 #endif
                break;
        }