summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2010-07-14 17:39:11 +0530
committerGary King <gking@nvidia.com>2010-07-17 10:02:36 -0700
commit32a8ef0076f7f31de541dcb1f68e9f8b2c70de4a (patch)
tree62e311dfc8ef7b269ddb767abc9a46f8755d0c81 /arch
parent898f8b08705ecb2de8ee1af033c497273f2cd25b (diff)
[arm/tegra] spi: Returning error incase of timeout error.
When there is timrout happen in the requested slave transaction, driver should rerurn the NvError_Timeout. Currently the error status was overwritten by other api status and so was not returning the correct error. Fixing this issue. Change-Id: Ie2d8600824ea837ec7fed94246a7a17e23d49d56 Reviewed-on: http://git-master/r/3921 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Michael Hsu <mhsu@nvidia.com> Tested-by: Michael Hsu <mhsu@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/nvrm/io/ap15/rm_spi_slink.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/nvrm/io/ap15/rm_spi_slink.c b/arch/arm/mach-tegra/nvrm/io/ap15/rm_spi_slink.c
index d2ed962c6b3f..59cd15dae155 100644
--- a/arch/arm/mach-tegra/nvrm/io/ap15/rm_spi_slink.c
+++ b/arch/arm/mach-tegra/nvrm/io/ap15/rm_spi_slink.c
@@ -661,11 +661,12 @@ WaitForTransferCompletion(
{
if (hRmSpiSlink->CurrentDirection & SerialHwDataFlow_Rx)
{
+ NvError DmaError;
// Get the Rx transfer count transferred by Dma.
- Error = NvRmDmaGetTransferredCount(hRmSpiSlink->hRmRxDma,
+ DmaError = NvRmDmaGetTransferredCount(hRmSpiSlink->hRmRxDma,
&DmaRxTransferCountBytes, NV_TRUE);
- NV_ASSERT(Error == NvSuccess);
- if (Error != NvSuccess)
+ NV_ASSERT(DmaError == NvSuccess);
+ if (DmaError != NvSuccess)
DmaRxTransferCountBytes = 0;
PacketTransferedFromFifoYet = (DmaRxTransferCountBytes >> 2) *
hRmSpiSlink->CurrTransInfo.PacketsPerWord;