summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-05-19 17:45:46 -0700
committerSimon Glass <sjg@chromium.org>2011-08-24 10:01:32 -0700
commit92a4f823f8f81864caf36e7fabd030a8fec73114 (patch)
tree0a8a4e63786eaee9060f1d2ff345485dad4af2c4 /drivers/spi
parenta5b69fbf6e44d7dd3c1e7d16b24719a1d8050dbd (diff)
tegra2: Add pinmux control functions
This adds functions to change pinmux functions and the pullup/pulldown state for pin groups. BUG=chromium-os:11623 TEST=build and boot U-Boot on Seaboard Change-Id: I82130ede79c6c10420d81b90042d946afa7f1838 Reviewed-on: http://gerrit.chromium.org/gerrit/1642 Reviewed-by: Anton Staaf <robotboy@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/tegra2_spi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/spi/tegra2_spi.c b/drivers/spi/tegra2_spi.c
index 5743ce2e86..553ed58d73 100644
--- a/drivers/spi/tegra2_spi.c
+++ b/drivers/spi/tegra2_spi.c
@@ -75,7 +75,6 @@ void spi_free_slave(struct spi_slave *slave)
void spi_init(void)
{
struct clk_rst_ctlr *clkrst = (struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE;
- struct pmux_tri_ctlr *pmt = (struct pmux_tri_ctlr *)NV_PA_APB_MISC_BASE;
struct spi_tegra *spi = (struct spi_tegra *)TEGRA2_SPI_BASE;
u32 reg;
@@ -117,16 +116,15 @@ void spi_init(void)
/*
* SPI pins on Tegra2 are muxed - change pinmux last due to UART
- * issue. GMD_SEL [31:30] = (3) SFLASH
+ * issue.
*/
- bf_writel(GMD_SEL_SFLASH, 3, &pmt->pmt_ctl_c);
-
+ pinmux_set_func(PINGRP_GMD, PMUX_FUNC_SFLASH);
pinmux_tristate_disable(PINGRP_LSPI);
/*
* NOTE:
* Don't set PinMux bits 3:2 to SPI here or subsequent UART data
- * won't go out! It'll be correctly set in seaboard_switch_spi_uart().
+ * won't go out! It'll be correctly set in spi_uart_switch().
*/
}