mx53loco: Use gpio_direction_input prior to gpio_get_value
PATCH 1/5 mx53loco: Use gpio_direction_input prior to gpio_get_value
Use gpio_direction_input prior to gpio_get_value.
--- board/freescale/mx53loco/mx53loco.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
board/freescale/mx53loco/mx53loco.c +2 -0
@@ -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 */
Signature · 1 line
1.7.1
PATCH 2/5 mx53ard: Use gpio_direction_input prior to gpio_get_value
Use gpio_direction_input prior to gpio_get_value.
--- board/freescale/mx53ard/mx53ard.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
board/freescale/mx53ard/mx53ard.c +2 -0
@@ -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 */
Signature · 1 line
1.7.1
PATCH 2/5 mx53ard: Use gpio_direction_input prior to gpio_get_value
Quoted 4 lines · Fabio Estevam
Use
gpio_direction_inputprior togpio_get_value.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 3/5 mx53evk: Use gpio_direction_input prior to gpio_get_value
In reply to Fabio EstevamUse gpio_direction_input prior to gpio_get_value.
--- board/freescale/mx53evk/mx53evk.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
board/freescale/mx53evk/mx53evk.c +2 -0
@@ -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 */
Signature · 1 line
1.7.1
PATCH 3/5 mx53evk: Use gpio_direction_input prior to gpio_get_value
2012/2/8 Fabio Estevam <[email protected]>:
Quoted 4 lines
Use
gpio_direction_inputprior togpio_get_value.Cc Jason Liu <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Quoted 25 lines
---
?board/freescale/mx53evk/mx53evk.c | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)board/freescale/mx53evk/mx53evk.c +2
-0@@ -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
PATCH 3/5 mx53evk: Use gpio_direction_input prior to gpio_get_value
In reply to Fabio EstevamQuoted 5 lines · Fabio Estevam
Use
gpio_direction_inputprior togpio_get_value.Cc Jason Liu <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 4/5 mx53smd: Use gpio_direction_input prior to gpio_get_value
In reply to Fabio EstevamUse gpio_direction_input prior to gpio_get_value.
--- board/freescale/mx53smd/mx53smd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
board/freescale/mx53smd/mx53smd.c +1 -0
@@ -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 */ }
Signature · 1 line
1.7.1
PATCH 4/5 mx53smd: Use gpio_direction_input prior to gpio_get_value
Quoted 4 lines · Fabio Estevam
Use
gpio_direction_inputprior togpio_get_value.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 5/5 mx51evk: Use gpio_direction_input prior to gpio_get_value
In reply to Fabio EstevamUse gpio_direction_input prior to gpio_get_value.
--- board/freescale/mx51evk/mx51evk.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
board/freescale/mx51evk/mx51evk.c +2 -0
@@ -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 );
Signature · 1 line
1.7.1
PATCH 5/5 mx51evk: Use gpio_direction_input prior to gpio_get_value
Quoted 4 lines · Fabio Estevam
Use
gpio_direction_inputprior togpio_get_value.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/5 mx53loco: Use gpio_direction_input prior to gpio_get_value
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
Use
gpio_direction_inputprior togpio_get_value.Cc Jason Liu <[email protected]>Signed-off-by Fabio Estevam <[email protected]>--- board/freescale/mx53loco/mx53loco.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
Hi Fabio,
board/freescale/mx53loco/mx53loco.c int board_mmc_getcd(struct mmc *mmc) · line 159
Quoted 12 lines
board/freescale/mx53loco/mx53loco.c +2
-0@@ -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
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/5 mx53loco: Use gpio_direction_input prior to gpio_get_value
Quoted 3 lines · Stefano Babic
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
PATCH 1/5 mx53loco: Use gpio_direction_input prior to gpio_get_value
Quoted 9 lines · Fabio Estevam
Quoted 3 lines · Stefano Babic
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_inputrather 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.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/5 mx53loco: Use gpio_direction_input prior to gpio_get_value
In reply to Fabio Estevam2012/2/8 Fabio Estevam <[email protected]>:
Quoted 4 lines
Use
gpio_direction_inputprior togpio_get_value.Cc Jason Liu <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Quoted 25 lines
---
?board/freescale/mx53loco/mx53loco.c | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)board/freescale/mx53loco/mx53loco.c +2
-0@@ -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
PATCH 1/5 mx53loco: Use gpio_direction_input prior to gpio_get_value
In reply to Fabio EstevamQuoted 5 lines · Fabio Estevam
Use
gpio_direction_inputprior togpio_get_value.Cc Jason Liu <[email protected]>Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================