[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] hw/pci-host/raven: Manually reset the OR_IRQ device
From: |
David Gibson |
Subject: |
Re: [PATCH 4/5] hw/pci-host/raven: Manually reset the OR_IRQ device |
Date: |
Tue, 27 Apr 2021 11:47:12 +1000 |
On Sat, Apr 24, 2021 at 06:22:28PM +0200, Philippe Mathieu-Daudé wrote:
> The OR_IRQ device is bus-less, thus isn't reset automatically.
> Add the raven_pcihost_reset() handler to manually reset the OR IRQ.
>
> Fixes: f40b83a4e31 ("40p: use OR gate to wire up raven PCI interrupts")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/pci-host/prep.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
> index 0a9162fba97..275379e4c78 100644
> --- a/hw/pci-host/prep.c
> +++ b/hw/pci-host/prep.c
> @@ -230,6 +230,15 @@ static void raven_change_gpio(void *opaque, int n, int
> level)
> s->contiguous_map = level;
> }
>
> +static void raven_pcihost_reset(DeviceState *dev)
> +{
> + PREPPCIState *s = RAVEN_PCI_HOST_BRIDGE(dev);
> +
> + if (!s->is_legacy_prep) {
> + device_legacy_reset(DEVICE(&s->or_irq));
> + }
> +}
> +
> static void raven_pcihost_realizefn(DeviceState *d, Error **errp)
> {
> SysBusDevice *dev = SYS_BUS_DEVICE(d);
> @@ -422,6 +431,7 @@ static void raven_pcihost_class_init(ObjectClass *klass,
> void *data)
>
> set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
> dc->realize = raven_pcihost_realizefn;
> + dc->reset = raven_pcihost_reset;
> device_class_set_props(dc, raven_pcihost_properties);
> dc->fw_name = "pci";
> }
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [PATCH 1/5] hw/ppc/spapr_iommu: Register machine reset handler, (continued)
- [PATCH 2/5] hw/pcmcia/microdrive: Register machine reset handler, Philippe Mathieu-Daudé, 2021/04/24
- [PATCH 3/5] hw/block/nand: Register machine reset handler, Philippe Mathieu-Daudé, 2021/04/24
- [PATCH 4/5] hw/pci-host/raven: Manually reset the OR_IRQ device, Philippe Mathieu-Daudé, 2021/04/24
- Re: [PATCH 4/5] hw/pci-host/raven: Manually reset the OR_IRQ device,
David Gibson <=
- [PATCH 5/5] hw/arm/armsse: Manually reset the OR_IRQ devices, Philippe Mathieu-Daudé, 2021/04/24