GPIO PI6 can be used to obtain the write-protect status of an SD card
inserted into the SD slot.

Signed-off-by: Thierry Reding <thierry.red...@avionic-design.de>
---
Changes in v2:
- new patch

 board/avionic-design/common/tamonten.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/avionic-design/common/tamonten.c 
b/board/avionic-design/common/tamonten.c
index 2b19d1e..7c92158 100644
--- a/board/avionic-design/common/tamonten.c
+++ b/board/avionic-design/common/tamonten.c
@@ -66,6 +66,8 @@ void gpio_early_init(void)
 static void pin_mux_mmc(void)
 {
        funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT);
+       /* for write-protect GPIO PI6 */
+       pinmux_tristate_disable(PINGRP_ATA);
        /* for CD GPIO PH2 */
        pinmux_tristate_disable(PINGRP_ATD);
 }
@@ -77,7 +79,7 @@ int board_mmc_init(bd_t *bd)
        pin_mux_mmc();
 
        /* init dev 0, SD slot, with 4-bit bus */
-       tegra2_mmc_init(0, 4, -1, GPIO_PH2);
+       tegra2_mmc_init(0, 4, GPIO_PI6, GPIO_PH2);
 
        return 0;
 }
-- 
1.7.10.2

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

Reply via email to