From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timo Herbrecher Date: Tue, 15 Oct 2013 07:57:49 +0200 Subject: [U-Boot] [PATCH v2] mxc_spi: bugfix for double incrementing read pointer on unaligned buffers in spi_xchg_single In-Reply-To: References: <525259A8.6060605@gateware.de> Message-ID: <525CD95D.9030604@gateware.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Yes I tested it on the master-probe branch of u-boot-spi.git. Am 7.10.2013 09:24, schrieb Jagan Teki: > Did you test this on u-boot-spi.git with master-probe branch? > > On Mon, Oct 7, 2013 at 12:20 PM, Timo Herbrecher > wrote: >> If dout buffer is not 32 bit-aligned or data to transmit is not multiple >> of 32 bit the read data pointer is already incremented on single byte reads. >> >> Signed-off-by: Timo Herbrecher >> --- >> drivers/spi/mxc_spi.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c >> index fd72a65..95dd03f 100644 >> --- a/drivers/spi/mxc_spi.c >> +++ b/drivers/spi/mxc_spi.c >> @@ -255,8 +255,8 @@ int spi_xchg_single(struct spi_slave *slave, >> unsigned int bitlen, >> } else { >> data = *(u32 *)dout; >> data = cpu_to_be32(data); >> + dout += 4; >> } >> - dout += 4; >> } >> debug("Sending SPI 0x%x\n", data); >> reg_write(®s->txdata, data); >> -- >> 1.7.0.4 >> >> > > >