]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: meson_spifc_a1: Switch to io{read,write}32_rep()
authorIgor Prusov <ivprusov@salutedevices.com>
Tue, 14 Nov 2023 11:02:55 +0000 (14:02 +0300)
committerTom Rini <trini@konsulko.com>
Tue, 28 Nov 2023 21:19:06 +0000 (16:19 -0500)
Use io{read,write}32_rep() functions to sync code with Linux version.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
drivers/spi/meson_spifc_a1.c

index 099c4c037dd28a4b111f1e9ad240a7b31bc2c03c..a33b1a3879b347c15b271ffa3c8a8e87fa3c2f85 100644 (file)
@@ -129,7 +129,7 @@ static void amlogic_spifc_a1_drain_buffer(struct amlogic_spifc_a1 *spifc,
 
        writel(SPIFC_A1_DBUF_AUTO_UPDATE_ADDR,
               spifc->base + SPIFC_A1_DBUF_CTRL_REG);
-       readsl(spifc->base + SPIFC_A1_DBUF_DATA_REG, buf, count);
+       ioread32_rep(spifc->base + SPIFC_A1_DBUF_DATA_REG, buf, count);
 
        if (pad) {
                data = readl(spifc->base + SPIFC_A1_DBUF_DATA_REG);
@@ -146,7 +146,7 @@ static void amlogic_spifc_a1_fill_buffer(struct amlogic_spifc_a1 *spifc,
 
        writel(SPIFC_A1_DBUF_DIR | SPIFC_A1_DBUF_AUTO_UPDATE_ADDR,
               spifc->base + SPIFC_A1_DBUF_CTRL_REG);
-       writesl(spifc->base + SPIFC_A1_DBUF_DATA_REG, buf, count);
+       iowrite32_rep(spifc->base + SPIFC_A1_DBUF_DATA_REG, buf, count);
 
        if (pad) {
                memcpy(&data, buf + len - pad, pad);