aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Vadot <manu@FreeBSD.org>2021-05-21 11:33:34 +0000
committerEmmanuel Vadot <manu@FreeBSD.org>2022-08-10 20:07:23 +0000
commit1ee7a8049218e6dc0a520e6e298626d11d254a2b (patch)
tree0b7988989588e78670fda256306a22ff1887b1a3
parentb9db5e0a8f38cfcfada7238a9895ad45f39f10a9 (diff)
downloadsrc-1ee7a8049218e6dc0a520e6e298626d11d254a2b.tar.gz
src-1ee7a8049218e6dc0a520e6e298626d11d254a2b.zip
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.
-rw-r--r--sys/dev/sdio/sdio_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/sdio/sdio_subr.c b/sys/dev/sdio/sdio_subr.c
index 55f09a55a02b..0885b16550a6 100644
--- a/sys/dev/sdio/sdio_subr.c
+++ b/sys/dev/sdio/sdio_subr.c
@@ -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;
}