diff mbox series

[v5,1/6] hw/sd/sdhci: MMIO region is implemented in 32-bit accesses

Message ID 20221031115402.91912-2-philmd@linaro.org
State Superseded
Headers show
Series ppc/e500: Add support for two types of flash, cleanup | expand

Commit Message

Philippe Mathieu-Daudé Oct. 31, 2022, 11:53 a.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/sd/sdhci.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Bernhard Beschow Nov. 1, 2022, 10:32 p.m. UTC | #1
Am 31. Oktober 2022 11:53:57 UTC schrieb "Philippe Mathieu-Daudé" <philmd@linaro.org>:
>Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Indeed there is `offset & ~0x3` in both sdhci_{read,write}, so:
Reviewed-by: Bernhard Beschow <shentey@gmail.com>

>---
> hw/sd/sdhci.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
>index 0e5e988927..f9c5b58e6d 100644
>--- a/hw/sd/sdhci.c
>+++ b/hw/sd/sdhci.c
>@@ -1332,6 +1332,10 @@ sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
> static const MemoryRegionOps sdhci_mmio_ops = {
>     .read = sdhci_read,
>     .write = sdhci_write,
>+    .impl = {
>+        .min_access_size = 4,
>+        .max_access_size = 4,
>+    },
>     .valid = {
>         .min_access_size = 1,
>         .max_access_size = 4,
diff mbox series

Patch

diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 0e5e988927..f9c5b58e6d 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -1332,6 +1332,10 @@  sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
 static const MemoryRegionOps sdhci_mmio_ops = {
     .read = sdhci_read,
     .write = sdhci_write,
+    .impl = {
+        .min_access_size = 4,
+        .max_access_size = 4,
+    },
     .valid = {
         .min_access_size = 1,
         .max_access_size = 4,