qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH-for-5.2? 2/4] hw/arm/exynos4210: Add SD bus QOM alias on the


From: Alistair Francis
Subject: Re: [PATCH-for-5.2? 2/4] hw/arm/exynos4210: Add SD bus QOM alias on the SoC
Date: Mon, 30 Nov 2020 17:51:42 -0800

On Tue, Nov 24, 2020 at 1:55 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> To be able to select a particular SD bus from the command
> line, add a QOM alias on the SoC (using an unique name).
>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  hw/arm/exynos4210.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c
> index ced2769b102..a60f08d372a 100644
> --- a/hw/arm/exynos4210.c
> +++ b/hw/arm/exynos4210.c
> @@ -408,6 +408,7 @@ static void exynos4210_realize(DeviceState *socdev, Error 
> **errp)
>
>      /*** SD/MMC host controllers ***/
>      for (n = 0; n < EXYNOS4210_SDHCI_NUMBER; n++) {
> +        g_autofree char *bus_name = NULL;
>          DeviceState *carddev;
>          BlockBackend *blk;
>          DriveInfo *di;
> @@ -432,6 +433,10 @@ static void exynos4210_realize(DeviceState *socdev, 
> Error **errp)
>          sysbus_mmio_map(busdev, 0, EXYNOS4210_SDHCI_ADDR(n));
>          sysbus_connect_irq(busdev, 0, s->irq_table[exynos4210_get_irq(29, 
> n)]);
>
> +        /* Alias controller SD bus to the SoC itself */
> +        bus_name = g_strdup_printf("sd-bus%d", n);
> +        object_property_add_alias(OBJECT(s), bus_name, OBJECT(dev), 
> "sd-bus");
> +
>          di = drive_get(IF_SD, 0, n);
>          blk = di ? blk_by_legacy_dinfo(di) : NULL;
>          carddev = qdev_new(TYPE_SD_CARD);
> --
> 2.26.2
>
>



reply via email to

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