tegra: remove support for UART SPI switch
[platform/kernel/u-boot.git] / drivers / spi / tegra_spi.c
index ce19095..2662923 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/gpio.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/pinmux.h>
-#include <asm/arch/uart-spi-switch.h>
 #include <asm/arch-tegra/clk_rst.h>
 #include <asm/arch-tegra/tegra_spi.h>
 #include <spi.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if defined(CONFIG_SPI_CORRUPTS_UART)
- #define corrupt_delay()       udelay(CONFIG_SPI_CORRUPTS_UART_DLY);
-#else
- #define corrupt_delay()
-#endif
-
 struct tegra_spi_slave {
        struct spi_slave slave;
        struct spi_tegra *regs;
@@ -175,16 +168,8 @@ int spi_claim_bus(struct spi_slave *slave)
         */
        pinmux_set_func(PINGRP_GMD, PMUX_FUNC_SFLASH);
        pinmux_tristate_disable(PINGRP_LSPI);
+       pinmux_set_func(PINGRP_GMC, PMUX_FUNC_SFLASH);
 
-#ifndef CONFIG_SPI_UART_SWITCH
-       /*
-        * NOTE:
-        * Only set PinMux bits 3:2 to SPI here on boards that don't have the
-        * SPI UART switch or subsequent UART data won't go out!  See
-        * spi_uart_switch().
-        */
-       /* TODO: pinmux_set_func(PINGRP_GMC, PMUX_FUNC_SFLASH); */
-#endif
        return 0;
 }
 
@@ -202,24 +187,16 @@ void spi_cs_activate(struct spi_slave *slave)
 {
        struct tegra_spi_slave *spi = to_tegra_spi(slave);
 
-       pinmux_select_spi();
-
        /* CS is negated on Tegra, so drive a 1 to get a 0 */
        setbits_le32(&spi->regs->command, SPI_CMD_CS_VAL);
-
-       corrupt_delay();                /* Let UART settle */
 }
 
 void spi_cs_deactivate(struct spi_slave *slave)
 {
        struct tegra_spi_slave *spi = to_tegra_spi(slave);
 
-       pinmux_select_uart();
-
        /* CS is negated on Tegra, so drive a 0 to get a 1 */
        clrbits_le32(&spi->regs->command, SPI_CMD_CS_VAL);
-
-       corrupt_delay();                /* Let SPI settle */
 }
 
 int spi_xfer(struct spi_slave *slave, unsigned int bitlen,