aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/fsl_espi.c
diff options
context:
space:
mode:
authorShaohui Xie2012-10-11 20:31:46 +0000
committerAndy Fleming2012-10-22 15:52:46 -0500
commit9905757e298f37c59587d1a07b1ad8cdbed4e063 (patch)
treeb22201d1eeb4d945452aa7b103671f02081da9ff /drivers/spi/fsl_espi.c
parent1f3bd3e239fb0542128f7c911829c9f0360b0d8f (diff)
powerpc/espi: remove write command length check
Current espi controller driver assumes the command length of write command is not equal to '1', it was made based on SPANSION SPI flash, but some SPI flash driver such as SST does use write command length as '1', so write command on SST SPI flash will not work. And the length check for write command is not necessary for SPANSION, though it's harmless for SPANSION, it will stop write operation on flashes like SST, so we remove the check. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/spi/fsl_espi.c')
-rw-r--r--drivers/spi/fsl_espi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index a1ebd330d7b..eb99e90becc 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -216,10 +216,8 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *data_out,
return 1;
}
memcpy(buffer, cmd_buf, cmd_len);
- if (cmd_len != 1) {
- if (data_in == NULL)
- memcpy(buffer + cmd_len, data_out, data_len);
- }
+ if (data_in == NULL)
+ memcpy(buffer + cmd_len, data_out, data_len);
break;
case SPI_XFER_BEGIN | SPI_XFER_END:
len = data_len;