public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dale P. Smith <dsmith@vtiinstruments.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] FSL espi: Return all data read from device unmodified.
Date: Wed, 12 Jun 2013 17:54:26 -0400	[thread overview]
Message-ID: <1371074066-732-1-git-send-email-dsmith@vtiinstruments.com> (raw)
In-Reply-To: <51B8C5CF.9070307@gmail.com>


Signed-off-by: Dale P. Smith <dsmith@vtiinstruments.com>
---
 drivers/spi/fsl_espi.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index 28609ee..bd9dc64 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -287,17 +287,11 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *data_out,
 				debug("***spi_xfer:...%08x readed\n", tmpdin);
 			}
 		}
-		if (data_in) {
-			memcpy(data_in, buffer + 2 * cmd_len, tran_len);
-			if (*buffer == 0x0b) {
-				data_in += tran_len;
-				data_len -= tran_len;
-				*(int *)buffer += tran_len;
-			}
-		}
 		spi_cs_deactivate(slave);
 	}
 
+	if (data_in)
+		memcpy(data_in, buffer + rx_offset, len);
 	free(buffer);
 	return 0;
 }
-- 
1.7.2.5

  reply	other threads:[~2013-06-12 21:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 21:07 [U-Boot] [PATCH] FSL SPI read fix Dale Smith
2013-06-12 19:02 ` [U-Boot] " Jagan Teki
2013-06-12 21:54   ` Dale P. Smith [this message]
2013-06-13  2:39     ` [U-Boot] [PATCH] FSL espi: Return all data read from device unmodified Jagan Teki
2013-06-13  9:09       ` Albert ARIBAUD
2013-06-13  9:22         ` Jagan Teki
2015-12-12  2:19     ` [U-Boot] [PATCH v3] spi: fsl_espi: " Dale P. Smith
2015-12-12 17:10       ` Joakim Tjernlund
2015-12-14  7:01         ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371074066-732-1-git-send-email-dsmith@vtiinstruments.com \
    --to=dsmith@vtiinstruments.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox