[U-Boot] [PATCH v2 6/7] tegra: Use funcmux for MMC on harmony
Simon Glass
sjg at chromium.org
Wed Jan 11 23:42:27 CET 2012
Use the new funcmux_select() feature to set up the MMC pin mux.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v2:
- Remove funcmux_select() option parameter
- Use config enum to select funcmux
board/nvidia/harmony/harmony.c | 19 ++++---------------
1 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/board/nvidia/harmony/harmony.c b/board/nvidia/harmony/harmony.c
index d5e147d..8f8e7bf 100644
--- a/board/nvidia/harmony/harmony.c
+++ b/board/nvidia/harmony/harmony.c
@@ -24,6 +24,8 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/tegra2.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/funcmux.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/mmc.h>
#include <asm/gpio.h>
@@ -46,27 +48,14 @@ void gpio_config_uart(void)
*/
static void pin_mux_mmc(void)
{
- /* SDMMC4: config 3, x8 on 2nd set of pins */
- pinmux_set_func(PINGRP_ATB, PMUX_FUNC_SDIO4);
- pinmux_set_func(PINGRP_GMA, PMUX_FUNC_SDIO4);
- pinmux_set_func(PINGRP_GME, PMUX_FUNC_SDIO4);
-
- pinmux_tristate_disable(PINGRP_ATB);
- pinmux_tristate_disable(PINGRP_GMA);
- pinmux_tristate_disable(PINGRP_GME);
+ funcmux_select(PERIPH_ID_SDMMC4, FUNCMUX_SDMMC4_ATB_GMA_GME_8_BIT);
+ funcmux_select(PERIPH_ID_SDMMC2, FUNCMUX_SDMMC2_DTA_DTD_8BIT);
/* For power GPIO PI6 */
pinmux_tristate_disable(PINGRP_ATA);
/* For CD GPIO PH2 */
pinmux_tristate_disable(PINGRP_ATD);
- /* SDMMC2: SDIO2_CLK, SDIO2_CMD, SDIO2_DAT[7:0] */
- pinmux_set_func(PINGRP_DTA, PMUX_FUNC_SDIO2);
- pinmux_set_func(PINGRP_DTD, PMUX_FUNC_SDIO2);
-
- pinmux_tristate_disable(PINGRP_DTA);
- pinmux_tristate_disable(PINGRP_DTD);
-
/* For power GPIO PT3 */
pinmux_tristate_disable(PINGRP_DTB);
/* For CD GPIO PI5 */
--
1.7.3.1
More information about the U-Boot
mailing list