sdio: Always use increment address for read/write_4

SDIO CMD53 (RW Extented) can either write to the same address (useful for FIFO)
or auto increment the destination address (to write to multiple registers).
It is more logical to have read/write_4 to use incremental mode and make other
helper function for writing to a FIFO destination especially since most FIFO
write/read will be 8bits based and not 32bits based.
This commit is contained in:
Emmanuel Vadot 2021-05-21 13:33:34 +02:00
parent b9db5e0a8f
commit 1ee7a80492

View file

@ -173,7 +173,7 @@ sdio_read_4(struct sdio_func *f, uint32_t addr, int *err)
uint32_t v;
error = SDIO_READ_EXTENDED(device_get_parent(f->dev), f->fn, addr,
sizeof(v), (uint8_t *)&v, false);
sizeof(v), (uint8_t *)&v, true);
if (error) {
if (err != NULL)
*err = error;
@ -191,7 +191,7 @@ sdio_write_4(struct sdio_func *f, uint32_t addr, uint32_t val, int *err)
int error;
error = SDIO_WRITE_EXTENDED(device_get_parent(f->dev), f->fn, addr,
sizeof(val), (uint8_t *)&val, false);
sizeof(val), (uint8_t *)&val, true);
if (err != NULL)
*err = error;
}