All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx6ul_14x14_evk: don't use array for SD2 card detect pad
@ 2016-08-05 23:51 Eric Nelson
  2016-08-08 16:23 ` Fabio Estevam
  2016-08-26 13:31 ` Stefano Babic
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Nelson @ 2016-08-05 23:51 UTC (permalink / raw)
  To: u-boot

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>
---
 board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 24 ++++++++++-------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
index 66d6795..c213861 100644
--- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
+++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
@@ -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;
 	}
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] mx6ul_14x14_evk: don't use array for SD2 card detect pad
  2016-08-05 23:51 [U-Boot] [PATCH] mx6ul_14x14_evk: don't use array for SD2 card detect pad Eric Nelson
@ 2016-08-08 16:23 ` Fabio Estevam
  2016-08-26 13:31 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2016-08-08 16:23 UTC (permalink / raw)
  To: u-boot

Hi Eric,

On Fri, Aug 5, 2016 at 8:51 PM, Eric Nelson <eric@nelint.com> wrote:
> 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>

Thanks for the patch:

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] mx6ul_14x14_evk: don't use array for SD2 card detect pad
  2016-08-05 23:51 [U-Boot] [PATCH] mx6ul_14x14_evk: don't use array for SD2 card detect pad Eric Nelson
  2016-08-08 16:23 ` Fabio Estevam
@ 2016-08-26 13:31 ` Stefano Babic
  1 sibling, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2016-08-26 13:31 UTC (permalink / raw)
  To: u-boot

On 06/08/2016 01:51, Eric Nelson wrote:
> 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>
> ---
>  board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 24 ++++++++++-------------
>  1 file changed, 10 insertions(+), 14 deletions(-)
> 
> diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> index 66d6795..c213861 100644
> --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> @@ -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;
>  	}
> 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-26 13:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-05 23:51 [U-Boot] [PATCH] mx6ul_14x14_evk: don't use array for SD2 card detect pad Eric Nelson
2016-08-08 16:23 ` Fabio Estevam
2016-08-26 13:31 ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.