From: Thomas Huth <thuth@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>, qemu-arm@nongnu.org
Subject: Re: [PATCH v2 1/9] hw/sd/pxa2xx: Realize sysbus device before accessing it
Date: Thu, 19 Oct 2023 18:00:21 +0200 [thread overview]
Message-ID: <f72271dc-ea1c-46b7-9609-1917e6567b3a@redhat.com> (raw)
In-Reply-To: <20231019130925.18744-2-philmd@linaro.org>
On 19/10/2023 15.09, Philippe Mathieu-Daudé wrote:
> sysbus_mmio_map() and sysbus_connect_irq() should not be
> called on unrealized device.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/sd/pxa2xx_mmci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/sd/pxa2xx_mmci.c b/hw/sd/pxa2xx_mmci.c
> index 124fbf8bbd..9f7a880bac 100644
> --- a/hw/sd/pxa2xx_mmci.c
> +++ b/hw/sd/pxa2xx_mmci.c
> @@ -483,11 +483,11 @@ PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem,
>
> dev = qdev_new(TYPE_PXA2XX_MMCI);
> sbd = SYS_BUS_DEVICE(dev);
> + sysbus_realize_and_unref(sbd, &error_fatal);
> sysbus_mmio_map(sbd, 0, base);
> sysbus_connect_irq(sbd, 0, irq);
> qdev_connect_gpio_out_named(dev, "rx-dma", 0, rx_dma);
> qdev_connect_gpio_out_named(dev, "tx-dma", 0, tx_dma);
> - sysbus_realize_and_unref(sbd, &error_fatal);
>
> return PXA2XX_MMCI(dev);
> }
Signed-off-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2023-10-19 16:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 13:09 [PATCH v2 0/9] hw/arm/pxa2xx: SysBus/QDev fixes Philippe Mathieu-Daudé
2023-10-19 13:09 ` [PATCH v2 1/9] hw/sd/pxa2xx: Realize sysbus device before accessing it Philippe Mathieu-Daudé
2023-10-19 16:00 ` Thomas Huth [this message]
2023-10-19 16:01 ` Thomas Huth
2023-10-19 13:09 ` [PATCH v2 2/9] hw/sd/pxa2xx: Do not open-code sysbus_create_simple() Philippe Mathieu-Daudé
2023-10-19 16:04 ` Thomas Huth
2023-10-19 13:09 ` [PATCH v2 3/9] hw/pcmcia/pxa2xx: Realize sysbus device before accessing it Philippe Mathieu-Daudé
2023-10-19 16:05 ` Thomas Huth
2023-10-19 13:09 ` [PATCH v2 4/9] hw/pcmcia/pxa2xx: Do not open-code sysbus_create_simple() Philippe Mathieu-Daudé
2023-10-19 16:07 ` Thomas Huth
2023-10-19 13:09 ` [PATCH v2 5/9] hw/pcmcia/pxa2xx: Inline pxa2xx_pcmcia_init() Philippe Mathieu-Daudé
2023-10-19 16:09 ` Thomas Huth
2023-10-19 13:09 ` [PATCH v2 6/9] hw/intc/pxa2xx: Convert to Resettable interface Philippe Mathieu-Daudé
2023-10-19 13:09 ` [PATCH v2 7/9] hw/intc/pxa2xx: Pass CPU reference using QOM link property Philippe Mathieu-Daudé
2023-10-19 13:09 ` [PATCH v2 8/9] hw/intc/pxa2xx: Factor pxa2xx_pic_realize() out of pxa2xx_pic_init() Philippe Mathieu-Daudé
2023-10-19 13:09 ` [PATCH v2 9/9] hw/arm/pxa2xx: Realize PXA2XX_I2C device before accessing it Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f72271dc-ea1c-46b7-9609-1917e6567b3a@redhat.com \
--to=thuth@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).