* [U-Boot] [PATCH 2/5] mx53ard: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value Fabio Estevam
@ 2012-02-08 12:34 ` Fabio Estevam
2012-02-09 16:58 ` Stefano Babic
2012-02-08 12:34 ` [U-Boot] [PATCH 3/5] mx53evk: " Fabio Estevam
` (5 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2012-02-08 12:34 UTC (permalink / raw)
To: u-boot
Use gpio_direction_input prior to gpio_get_value.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx53ard/mx53ard.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx53ard/mx53ard.c b/board/freescale/mx53ard/mx53ard.c
index 40b5c19..e90e39e 100644
--- a/board/freescale/mx53ard/mx53ard.c
+++ b/board/freescale/mx53ard/mx53ard.c
@@ -89,7 +89,9 @@ int board_mmc_getcd(struct mmc *mmc)
int ret;
mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
+ gpio_direction_input(1);
mxc_request_iomux(MX53_PIN_GPIO_4, IOMUX_CONFIG_ALT1);
+ gpio_direction_input(4);
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
ret = !gpio_get_value(1); /* GPIO1_1 */
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 2/5] mx53ard: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 ` [U-Boot] [PATCH 2/5] mx53ard: " Fabio Estevam
@ 2012-02-09 16:58 ` Stefano Babic
0 siblings, 0 replies; 15+ messages in thread
From: Stefano Babic @ 2012-02-09 16:58 UTC (permalink / raw)
To: u-boot
On 08/02/2012 13:34, Fabio Estevam wrote:
> Use gpio_direction_input prior to gpio_get_value.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/5] mx53evk: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value Fabio Estevam
2012-02-08 12:34 ` [U-Boot] [PATCH 2/5] mx53ard: " Fabio Estevam
@ 2012-02-08 12:34 ` Fabio Estevam
2012-02-09 2:30 ` Jason Liu
2012-02-09 16:58 ` Stefano Babic
2012-02-08 12:34 ` [U-Boot] [PATCH 4/5] mx53smd: " Fabio Estevam
` (4 subsequent siblings)
6 siblings, 2 replies; 15+ messages in thread
From: Fabio Estevam @ 2012-02-08 12:34 UTC (permalink / raw)
To: u-boot
Use gpio_direction_input prior to gpio_get_value.
Cc: Jason Liu <r64343@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx53evk/mx53evk.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c
index e976ae1..8a6e31d 100644
--- a/board/freescale/mx53evk/mx53evk.c
+++ b/board/freescale/mx53evk/mx53evk.c
@@ -214,7 +214,9 @@ int board_mmc_getcd(struct mmc *mmc)
int ret;
mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
+ gpio_direction_input(75);
mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
+ gpio_direction_input(77);
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
ret = !gpio_get_value(77); /* GPIO3_13 */
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 3/5] mx53evk: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 ` [U-Boot] [PATCH 3/5] mx53evk: " Fabio Estevam
@ 2012-02-09 2:30 ` Jason Liu
2012-02-09 16:58 ` Stefano Babic
1 sibling, 0 replies; 15+ messages in thread
From: Jason Liu @ 2012-02-09 2:30 UTC (permalink / raw)
To: u-boot
2012/2/8 Fabio Estevam <festevam@gmail.com>:
> Use gpio_direction_input prior to gpio_get_value.
>
> Cc: Jason Liu <r64343@freescale.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
> ---
> ?board/freescale/mx53evk/mx53evk.c | ? ?2 ++
> ?1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c
> index e976ae1..8a6e31d 100644
> --- a/board/freescale/mx53evk/mx53evk.c
> +++ b/board/freescale/mx53evk/mx53evk.c
> @@ -214,7 +214,9 @@ int board_mmc_getcd(struct mmc *mmc)
> ? ? ? ?int ret;
>
> ? ? ? ?mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
> + ? ? ? gpio_direction_input(75);
> ? ? ? ?mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
> + ? ? ? gpio_direction_input(77);
>
> ? ? ? ?if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
> ? ? ? ? ? ? ? ?ret = !gpio_get_value(77); /* GPIO3_13 */
> --
> 1.7.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/5] mx53evk: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 ` [U-Boot] [PATCH 3/5] mx53evk: " Fabio Estevam
2012-02-09 2:30 ` Jason Liu
@ 2012-02-09 16:58 ` Stefano Babic
1 sibling, 0 replies; 15+ messages in thread
From: Stefano Babic @ 2012-02-09 16:58 UTC (permalink / raw)
To: u-boot
On 08/02/2012 13:34, Fabio Estevam wrote:
> Use gpio_direction_input prior to gpio_get_value.
>
> Cc: Jason Liu <r64343@freescale.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 4/5] mx53smd: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value Fabio Estevam
2012-02-08 12:34 ` [U-Boot] [PATCH 2/5] mx53ard: " Fabio Estevam
2012-02-08 12:34 ` [U-Boot] [PATCH 3/5] mx53evk: " Fabio Estevam
@ 2012-02-08 12:34 ` Fabio Estevam
2012-02-09 16:58 ` Stefano Babic
2012-02-08 12:34 ` [U-Boot] [PATCH 5/5] mx51evk: " Fabio Estevam
` (3 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2012-02-08 12:34 UTC (permalink / raw)
To: u-boot
Use gpio_direction_input prior to gpio_get_value.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx53smd/mx53smd.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx53smd/mx53smd.c b/board/freescale/mx53smd/mx53smd.c
index e273192..c237980 100644
--- a/board/freescale/mx53smd/mx53smd.c
+++ b/board/freescale/mx53smd/mx53smd.c
@@ -135,6 +135,7 @@ struct fsl_esdhc_cfg esdhc_cfg[1] = {
int board_mmc_getcd(struct mmc *mmc)
{
mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
+ gpio_direction_input(77);
return !gpio_get_value(77); /* GPIO3_13 */
}
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 4/5] mx53smd: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 ` [U-Boot] [PATCH 4/5] mx53smd: " Fabio Estevam
@ 2012-02-09 16:58 ` Stefano Babic
0 siblings, 0 replies; 15+ messages in thread
From: Stefano Babic @ 2012-02-09 16:58 UTC (permalink / raw)
To: u-boot
On 08/02/2012 13:34, Fabio Estevam wrote:
> Use gpio_direction_input prior to gpio_get_value.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/5] mx51evk: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value Fabio Estevam
` (2 preceding siblings ...)
2012-02-08 12:34 ` [U-Boot] [PATCH 4/5] mx53smd: " Fabio Estevam
@ 2012-02-08 12:34 ` Fabio Estevam
2012-02-09 16:58 ` Stefano Babic
2012-02-08 13:08 ` [U-Boot] [PATCH 1/5] mx53loco: " Stefano Babic
` (2 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2012-02-08 12:34 UTC (permalink / raw)
To: u-boot
Use gpio_direction_input prior to gpio_get_value.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx51evk/mx51evk.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index 8d1f6a3..b505a71 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -327,7 +327,9 @@ int board_mmc_getcd(struct mmc *mmc)
int ret;
mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1);
+ gpio_direction_input(0);
mxc_request_iomux(MX51_PIN_GPIO1_6, IOMUX_CONFIG_ALT0);
+ gpio_direction_input(6);
if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
ret = !gpio_get_value(0);
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 5/5] mx51evk: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 ` [U-Boot] [PATCH 5/5] mx51evk: " Fabio Estevam
@ 2012-02-09 16:58 ` Stefano Babic
0 siblings, 0 replies; 15+ messages in thread
From: Stefano Babic @ 2012-02-09 16:58 UTC (permalink / raw)
To: u-boot
On 08/02/2012 13:34, Fabio Estevam wrote:
> Use gpio_direction_input prior to gpio_get_value.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value Fabio Estevam
` (3 preceding siblings ...)
2012-02-08 12:34 ` [U-Boot] [PATCH 5/5] mx51evk: " Fabio Estevam
@ 2012-02-08 13:08 ` Stefano Babic
2012-02-08 13:14 ` Fabio Estevam
2012-02-09 2:30 ` Jason Liu
2012-02-09 16:58 ` Stefano Babic
6 siblings, 1 reply; 15+ messages in thread
From: Stefano Babic @ 2012-02-08 13:08 UTC (permalink / raw)
To: u-boot
On 08/02/2012 13:34, Fabio Estevam wrote:
> Use gpio_direction_input prior to gpio_get_value.
>
> Cc: Jason Liu <r64343@freescale.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> board/freescale/mx53loco/mx53loco.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
Hi Fabio,
> diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
> index e6345e7..c2c26f0 100644
> --- a/board/freescale/mx53loco/mx53loco.c
> +++ b/board/freescale/mx53loco/mx53loco.c
> @@ -153,7 +153,9 @@ int board_mmc_getcd(struct mmc *mmc)
> int ret;
>
> mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
> + gpio_direction_input(75);
> mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
> + gpio_direction_input(77);
>
The patch makes clear that the GPIO is configured as input. However,
after a reset all GPIOs in the MX53 are configured as input. Do we need
such changes ?
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value
2012-02-08 13:08 ` [U-Boot] [PATCH 1/5] mx53loco: " Stefano Babic
@ 2012-02-08 13:14 ` Fabio Estevam
2012-02-08 13:17 ` Stefano Babic
0 siblings, 1 reply; 15+ messages in thread
From: Fabio Estevam @ 2012-02-08 13:14 UTC (permalink / raw)
To: u-boot
On Wed, Feb 8, 2012 at 11:08 AM, Stefano Babic <sbabic@denx.de> wrote:
> The patch makes clear that the GPIO is configured as input. However,
> after a reset all GPIOs in the MX53 are configured as input. Do we need
> such changes ?
I would prefer to explicitly set gpio_direction_input rather than
depending on the reset value and I think it aligns with the GPIO API
mechanism used in the kernel as well.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value
2012-02-08 13:14 ` Fabio Estevam
@ 2012-02-08 13:17 ` Stefano Babic
0 siblings, 0 replies; 15+ messages in thread
From: Stefano Babic @ 2012-02-08 13:17 UTC (permalink / raw)
To: u-boot
On 08/02/2012 14:14, Fabio Estevam wrote:
> On Wed, Feb 8, 2012 at 11:08 AM, Stefano Babic <sbabic@denx.de> wrote:
>
>> The patch makes clear that the GPIO is configured as input. However,
>> after a reset all GPIOs in the MX53 are configured as input. Do we need
>> such changes ?
>
> I would prefer to explicitly set gpio_direction_input rather than
> depending on the reset value and I think it aligns with the GPIO API
> mechanism used in the kernel as well.
Ok, good reasons.
Acked-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value Fabio Estevam
` (4 preceding siblings ...)
2012-02-08 13:08 ` [U-Boot] [PATCH 1/5] mx53loco: " Stefano Babic
@ 2012-02-09 2:30 ` Jason Liu
2012-02-09 16:58 ` Stefano Babic
6 siblings, 0 replies; 15+ messages in thread
From: Jason Liu @ 2012-02-09 2:30 UTC (permalink / raw)
To: u-boot
2012/2/8 Fabio Estevam <festevam@gmail.com>:
> Use gpio_direction_input prior to gpio_get_value.
>
> Cc: Jason Liu <r64343@freescale.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>
> ---
> ?board/freescale/mx53loco/mx53loco.c | ? ?2 ++
> ?1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
> index e6345e7..c2c26f0 100644
> --- a/board/freescale/mx53loco/mx53loco.c
> +++ b/board/freescale/mx53loco/mx53loco.c
> @@ -153,7 +153,9 @@ int board_mmc_getcd(struct mmc *mmc)
> ? ? ? ?int ret;
>
> ? ? ? ?mxc_request_iomux(MX53_PIN_EIM_DA11, IOMUX_CONFIG_ALT1);
> + ? ? ? gpio_direction_input(75);
> ? ? ? ?mxc_request_iomux(MX53_PIN_EIM_DA13, IOMUX_CONFIG_ALT1);
> + ? ? ? gpio_direction_input(77);
>
> ? ? ? ?if (cfg->esdhc_base == MMC_SDHC1_BASE_ADDR)
> ? ? ? ? ? ? ? ?ret = !gpio_get_value(77); /* GPIO3_13 */
> --
> 1.7.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value
2012-02-08 12:34 [U-Boot] [PATCH 1/5] mx53loco: Use gpio_direction_input prior to gpio_get_value Fabio Estevam
` (5 preceding siblings ...)
2012-02-09 2:30 ` Jason Liu
@ 2012-02-09 16:58 ` Stefano Babic
6 siblings, 0 replies; 15+ messages in thread
From: Stefano Babic @ 2012-02-09 16:58 UTC (permalink / raw)
To: u-boot
On 08/02/2012 13:34, Fabio Estevam wrote:
> Use gpio_direction_input prior to gpio_get_value.
>
> Cc: Jason Liu <r64343@freescale.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 15+ messages in thread