mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
spi: mxc_spi: Fix double incrementing read pointer for unaligned buffers
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 <t.herbrecher@gateware.de> Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
This commit is contained in:
parent
21497ded5d
commit
6d5ce1bd00
1 changed files with 1 additions and 1 deletions
|
@ -255,9 +255,9 @@ int spi_xchg_single(struct spi_slave *slave, unsigned int bitlen,
|
||||||
} else {
|
} else {
|
||||||
data = *(u32 *)dout;
|
data = *(u32 *)dout;
|
||||||
data = cpu_to_be32(data);
|
data = cpu_to_be32(data);
|
||||||
}
|
|
||||||
dout += 4;
|
dout += 4;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
debug("Sending SPI 0x%x\n", data);
|
debug("Sending SPI 0x%x\n", data);
|
||||||
reg_write(®s->txdata, data);
|
reg_write(®s->txdata, data);
|
||||||
nbytes -= 4;
|
nbytes -= 4;
|
||||||
|
|
Loading…
Reference in a new issue