[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model |
Date: |
Mon, 29 Jun 2020 21:38:43 +0200 |
Hi,
> > >> Do you intend to add a "sysbus model" in a future patch?
> > > [Sai Pavan Boddu] Yes. I would be sending it along with that a device
> > > which would be using it. (i.e for zynqmp soc ) Let me know, if its good to
> > include hcd-xhci-sysbus.c here ?
I think this would be useful, to see how the code separation plays out
on the sysbus side.
> > Here's a clean way to provide different bus connectors (say PCI and
> > sysbus) for the same core device:
> >
> > Make the core device a TYPE_DEVICE.
> >
> > For each desired bus, have a bus-specific device that contains a core
> > device.
> > Use object_initialize_child() for the component.
> This was my V1 implementation.
> Changed it to non-qom structure after some feedback from @Gred. Felt like
> XHCIState will not be used standalone.
> > Example: core device TYPE_SERIAL, PCI device TYPE_PCI_SERIAL, ISA device
> > TYPE_ISA_SERIAL, sysbus devices TYPE_SERIAL_IO. TYPE_SERIAL_MM.
/me goes check out the serial code ...
For reference: commit which transforms serial into the structure
above is this:
commit 7781b88ee458ff933459503ade0b0a6ddaad08de
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
Date: Mon Oct 21 23:32:12 2019 +0200
serial: initial qom-ification
Note that this patch doesn't change structs, so ISASerialState still
looks this way:
struct ISASerialState {
ISADevice parent_obj;
[ ... ]
SerialState state;
};
So you can likewise keep your current "struct XHCIPciState" struct
layout and still turn XHCIState into a device object. Which is nice to
have as it better models the hardware (xhci core behind pci connector).
take care,
Gerd
- Re: [PATCH v2 2/3] usb/hcd-xhci: Move qemu-xhci device to hcd-xhci-pci.c, (continued)
- [PATCH v2 1/3] usb/hcd-xhci: Make dma read/writes hooks pci free, Sai Pavan Boddu, 2020/06/24
- [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model, Sai Pavan Boddu, 2020/06/24
- Re: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model, Markus Armbruster, 2020/06/25
- RE: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model, Sai Pavan Boddu, 2020/06/25
- Re: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model, Markus Armbruster, 2020/06/26
- RE: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model, Sai Pavan Boddu, 2020/06/26
- Re: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model, Markus Armbruster, 2020/06/27
- Re: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model,
Gerd Hoffmann <=
- RE: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model, Sai Pavan Boddu, 2020/06/30