Patchwork [U-Boot,2/4] tegra2: Call gpio_request for SDMMC GPIOs

login
register
mail settings
Submitter Stephen Warren
Date Sept. 30, 2011, 7:40 p.m.
Message ID <1317411631-26370-2-git-send-email-swarren@nvidia.com>
Download mbox | patch
Permalink /patch/117194/
State Superseded
Headers show

Comments

Stephen Warren - Sept. 30, 2011, 7:40 p.m.
Without this, the GPIO_CNF register will not be programmed, and hence the
GPIO signals will not reach the pins; the pinmux's configured function
will be routed to the pins instead.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 board/nvidia/seaboard/seaboard.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Stephen Warren - Oct. 3, 2011, 4:37 p.m.
Stephen Warren wrote at Friday, September 30, 2011 1:40 PM:
...
>  void gpio_config_mmc(void)
>  {
>  	/* Set EN_VDDIO_SD (GPIO I6) */
> +	gpio_request(GPIO_PI6, "SDMMC4 power");
>  	gpio_direction_output(GPIO_PI6, 1);
> 
>  	/* Config pin as GPI for Card Detect (GPIO I5) */
> +	gpio_request(GPIO_PI5, "SDMMC4 card detect");
>  	gpio_direction_input(GPIO_PI5);
>  }

Tom pointed out that the strings here should say "SDMMC3" not "SDMMC4".
I'll wait until Tuesday for any other comments, then repost an updated
patchset including that fix.

Patch

diff --git a/board/nvidia/seaboard/seaboard.c b/board/nvidia/seaboard/seaboard.c
index bc67d0f..578d909 100644
--- a/board/nvidia/seaboard/seaboard.c
+++ b/board/nvidia/seaboard/seaboard.c
@@ -62,9 +62,11 @@  void gpio_config_uart(void)
 void gpio_config_mmc(void)
 {
 	/* Set EN_VDDIO_SD (GPIO I6) */
+	gpio_request(GPIO_PI6, "SDMMC4 power");
 	gpio_direction_output(GPIO_PI6, 1);
 
 	/* Config pin as GPI for Card Detect (GPIO I5) */
+	gpio_request(GPIO_PI5, "SDMMC4 card detect");
 	gpio_direction_input(GPIO_PI5);
 }