Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2022 20:07:33 GMT
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1ee7a8049218 - main - sdio: Always use increment address for read/write_4
Message-ID:  <202208102007.27AK7X2s001055@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=1ee7a8049218e6dc0a520e6e298626d11d254a2b

commit 1ee7a8049218e6dc0a520e6e298626d11d254a2b
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2021-05-21 11:33:34 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-08-10 20:07:23 +0000

    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 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;
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208102007.27AK7X2s001055>