mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
drivers: spi: consider command bytes when sending transfers
Command bytes are part of the written bytes and they should be taken into account when sending a spi transfer. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
This commit is contained in:
parent
8af74edc30
commit
6c94bd12c4
2 changed files with 2 additions and 2 deletions
|
@ -405,7 +405,7 @@ int spi_flash_cmd_write_ops(struct spi_flash *flash, u32 offset,
|
||||||
|
|
||||||
if (spi->max_write_size)
|
if (spi->max_write_size)
|
||||||
chunk_len = min(chunk_len,
|
chunk_len = min(chunk_len,
|
||||||
(size_t)spi->max_write_size);
|
spi->max_write_size - sizeof(cmd));
|
||||||
|
|
||||||
spi_flash_addr(write_addr, cmd);
|
spi_flash_addr(write_addr, cmd);
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ struct dm_spi_slave_platdata {
|
||||||
* @max_read_size: If non-zero, the maximum number of bytes which can
|
* @max_read_size: If non-zero, the maximum number of bytes which can
|
||||||
* be read at once.
|
* be read at once.
|
||||||
* @max_write_size: If non-zero, the maximum number of bytes which can
|
* @max_write_size: If non-zero, the maximum number of bytes which can
|
||||||
* be written at once, excluding command bytes.
|
* be written at once.
|
||||||
* @memory_map: Address of read-only SPI flash access.
|
* @memory_map: Address of read-only SPI flash access.
|
||||||
* @flags: Indication of SPI flags.
|
* @flags: Indication of SPI flags.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue