From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Thu, 13 Jun 2013 00:32:39 +0530 Subject: [U-Boot] FSL SPI read fix. In-Reply-To: References: Message-ID: <51B8C5CF.9070307@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, Can you please update the commit header and logic of the code w.r.t current master tree. also please use proper commit body. -- Thanks, Jagan. On 27-09-2012 02:37, Dale Smith wrote: > The fsl spi engine is non functional when reading from a device. This > patch fixes it. > > Note that none of the other spi interfaces parse through the > datastream looking for 0x0b bytes. > > -Dale > > } > > > diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c > index a1ebd33..737719b 100644 > --- a/drivers/spi/fsl_espi.c > +++ b/drivers/spi/fsl_espi.c > @@ -291,17 +291,10 @@ 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; >