diff mbox series

[1/4] uninorth: add impl min_access_size and max_access_size to unin_ops

Message ID 20180506142005.19580-2-mark.cave-ayland@ilande.co.uk
State New
Headers show
Series uninorth/macio: minor fixups | expand

Commit Message

Mark Cave-Ayland May 6, 2018, 2:20 p.m. UTC
From testing all my local images the uninorth registers are only ever
read or written with 32-bit accesses.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 hw/pci-host/uninorth.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

David Gibson June 4, 2018, 12:39 a.m. UTC | #1
On Sun, May 06, 2018 at 03:20:02PM +0100, Mark Cave-Ayland wrote:
> >From testing all my local images the uninorth registers are only ever
> read or written with 32-bit accesses.

If that's the case, shouldn't you be setting the range of valid
accesses, rather than the range of implemented accesses?

> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>  hw/pci-host/uninorth.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
> index ba76b84dbc..a658f9230a 100644
> --- a/hw/pci-host/uninorth.c
> +++ b/hw/pci-host/uninorth.c
> @@ -548,6 +548,10 @@ static const MemoryRegionOps unin_ops = {
>      .read = unin_read,
>      .write = unin_write,
>      .endianness = DEVICE_BIG_ENDIAN,
> +    .impl = {
> +        .min_access_size = 4,
> +        .max_access_size = 4,
> +    },
>  };
>  
>  static void unin_init(Object *obj)
diff mbox series

Patch

diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
index ba76b84dbc..a658f9230a 100644
--- a/hw/pci-host/uninorth.c
+++ b/hw/pci-host/uninorth.c
@@ -548,6 +548,10 @@  static const MemoryRegionOps unin_ops = {
     .read = unin_read,
     .write = unin_write,
     .endianness = DEVICE_BIG_ENDIAN,
+    .impl = {
+        .min_access_size = 4,
+        .max_access_size = 4,
+    },
 };
 
 static void unin_init(Object *obj)