qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/6] sparc32-ledma: don't reference nd_table directly within


From: Mark Cave-Ayland
Subject: Re: [PATCH 4/6] sparc32-ledma: don't reference nd_table directly within the device
Date: Sat, 26 Sep 2020 11:29:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

On 21/09/2020 18:58, Philippe Mathieu-Daudé wrote:

> Sorry I guess I got confused by the 2 different sparc32_dma_init()
> functions.
> 
> Since ledma always expose lance, maybe you can use:
> 
> diff --git a/hw/dma/sparc32_dma.c b/hw/dma/sparc32_dma.c
> index 2cbe331959a..9a907a30373 100644
> --- a/hw/dma/sparc32_dma.c
> +++ b/hw/dma/sparc32_dma.c
> @@ -336,18 +336,14 @@ static void sparc32_ledma_device_init(Object *obj)
>                            "ledma-mmio", DMA_SIZE);
> 
>      object_initialize_child(obj, "lance", &ls->lance, TYPE_LANCE);
> +    qdev_alias_all_properties(DEVICE(&ls->lance), obj);
>  }
> 
> This way you set the properties directly on the ledma and only
> have to sysbus_map lance.

Thanks for the hint. I've had a look at qdev_alias_all_properties() and for the
moment I'd prefer to get the reference to the internal lance/esp devices via
object_resolve_path_component(), since to me it makes it clearer on which 
device the
properties really belong from just looking at the code.


ATB,

Mark.



reply via email to

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