arm: tegra: spi: fix rx_tap_delay
Shardar Shariff Md [Fri, 6 Sep 2013 11:11:15 +0000 (16:11 +0530)]
Instead on using rx_tap_delay value, tx_tap_delay value
is passed to SPI_RX_TAP_DELAY macro resulting in
undesired value in command2 reg.

Change-Id: I4592e98b240a7d23a81507bddf80e81008f73a7d
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/271475
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/spi/spi-tegra114.c

index 8956541..f967434 100644 (file)
@@ -780,7 +780,7 @@ static int tegra_spi_start_transfer_one(struct spi_device *spi,
                        rx_tap_delay = min(cdata->rx_clk_tap_delay, 63);
                        tx_tap_delay = min(cdata->tx_clk_tap_delay, 63);
                        command2_reg = SPI_TX_TAP_DELAY(tx_tap_delay) |
-                                       SPI_RX_TAP_DELAY(tx_tap_delay);
+                                       SPI_RX_TAP_DELAY(rx_tap_delay);
                        tegra_spi_writel(tspi, command2_reg, SPI_COMMAND2);
                } else {
                        tegra_spi_writel(tspi, tspi->def_command2_reg, SPI_COMMAND2);