qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 15/33] serial-mm: add endianness property


From: Peter Maydell
Subject: Re: [PATCH v3 15/33] serial-mm: add endianness property
Date: Mon, 18 Nov 2019 15:07:04 +0000

On Wed, 23 Oct 2019 at 18:34, Marc-André Lureau
<address@hidden> wrote:
>
> Add a qdev property for endianness, so memory region setup can be done
> in realize.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  hw/char/serial.c         | 2 ++
>  include/hw/char/serial.h | 1 +
>  2 files changed, 3 insertions(+)
>
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index c28cfc94fd..2f7667c30c 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1081,6 +1081,7 @@ SerialMM *serial_mm_init(MemoryRegion *address_space,
>      qdev_prop_set_uint32(DEVICE(s), "baudbase", baudbase);
>      qdev_prop_set_chr(DEVICE(s), "chardev", chr);
>      qdev_prop_set_int32(DEVICE(s), "instance-id", base);
> +    qdev_prop_set_uint8(DEVICE(s), "endianness", end);
>
>      qdev_init_nofail(DEVICE(s));
>      qdev_init_nofail(DEVICE(self));
> @@ -1102,6 +1103,7 @@ static void serial_mm_instance_init(Object *o)
>
>  static Property serial_mm_properties[] = {
>      DEFINE_PROP_UINT8("regshift", SerialMM, regshift, 0),
> +    DEFINE_PROP_UINT8("endianness", SerialMM, endianness, 
> DEVICE_NATIVE_ENDIAN),
>      DEFINE_PROP_END_OF_LIST(),
>  };

...on reading patch 16, I just noticed that here in patch 15
you define the 'endianness' property on the SerialMM object, but
you're trying to set it on the SerialState object. This bug then
gets fixed in passing in patch 16, but we should just be
setting it on the right object to start with.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]