From 1ee7a8049218e6dc0a520e6e298626d11d254a2b Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Fri, 21 May 2021 13:33:34 +0200 Subject: [PATCH] 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. --- sys/dev/sdio/sdio_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sdio/sdio_subr.c b/sys/dev/sdio/sdio_subr.c index 55f09a55a02..0885b16550a 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; }