usb/uhci: Add UHCI sysbus support, and enable for AST machines
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v1 Latest posting 2/210 patches 3 repliesIn review
- v1 posting 1/29 of 10 patches 0 repliesSuperseded
Changes since RFC from the cover letter
- Rebased to v9.1.0-1673-g134b443512
- Added Reviewed-by: tags
- Fixed bug in interrupt initialization of vt82c686-uhci-pci.c which if instantiated caused a machine crash
- Instantiate UHCI controllers as companion devices on AST2600 machines
Patches in v1 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | usb/uhci: checkpatch cleanuphw/ | +56 | 0 replies | |
| 2/10 | usb/uhci: Introduce and use register defineshw/ include/ | +27 | 0 replies | |
| 3/10 | usb/uhci: Move PCI-related code into a separate filehw/ hw/ hw/ +7 more | +386 | 0 replies | |
| 4/10 | usb/uhci: enlarge uhci memory spacehw/ | +1 | 0 replies | |
| 5/10 | usb/uhci: Add support for usb-uhci-sysbushw/ hw/ hw/ +2 more | +129 | 0 replies | |
| 6/10 | usb/uhci: Add aspeed specific read and write functionshw/ hw/ | +114 | 0 replies | |
| 7/10 | aspeed: Add uhci support for ast2600hw/ include/ | +23 | 0 replies | |
| 8/10 | aspeed: Add uhci support for ast2400 and ast2500hw/ | +14 | 0 replies | |
| 9/10 | usb-hub: Add support for v2.0 hubshw/ | +76 | 0 replies | |
| 10/10 | usb-hub: Fix handling port power control messageshw/ | +1 | 3 replies |
Reviews trailers per patch
4 of 10 patches have a Reviewed-by or Acked-by.
| Patch | Cédric Le Goater | Philippe Mathieu-Daudé |
|---|---|---|
| 1/10 | R-b | |
| 2/10 | R-b | |
| 3/10 | ||
| 4/10 | ||
| 5/10 | ||
| 6/10 | ||
| 7/10 | ||
| 8/10 | R-b | |
| 9/10 | ||
| 10/10 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RESEND PATCH 00/10] usb/uhci: Add UHCI sysbus support, and enable for AST machines
[ Trying again, with updated subject ]
Some machines (like Aspeed ARM) only support a sysbus UHCI controller. The current UHCI implementation in qemu only supports PCI based UHCI controllers.
This patch series separates basic and PCI functionality from the hcd-uhci implementation and then adds uhci-sysbus support. This is then used to implement and enable sysbus based UHCI support for Aspeed machines.
The series is submitted as RFC since I am quite sure that I didn't get everything right. All code surrounding VMStates deserves special scrutiny, as well as the changes outside hw/usb/ and hw/arm/.
A side effect of this patch series is that Aspeed AST2400/2500 machines will now instantiate UHCI, even if the machine does not actually support it (it also always instantiates both EHCI ports, so that is not really different). This means that the default USB bus is now the UHCI bus, not the second EHCI bus. The bus number must therefore now be specified explicitly when attaching a device unless attaching it to the UHCI port is ok. I don't know if it is possible to avoid that and to ensure that the default USB port is still the second EHCI port.
The code was tested on x86 machines to ensure that the existing UHCI implementation still works. It was also tested on various Aspeed machines with enabled UHCI ports (ast2500-evb, ast2600-evb, and rainier-bmc).
Changes since RFC:
- Rebased to v9.1.0-1673-g134b443512
- Added Reviewed-by: tags
- Fixed bug in interrupt initialization of vt82c686-uhci-pci.c which if instantiated caused a machine crash
- Instantiate UHCI controllers as companion devices on AST2600 machines
----------------------------------------------------------------
Guenter Roeck (10):
usb/uhci: checkpatch cleanup
usb/uhci: Introduce and use register defines usb/uhci: Move PCI-related code into a separate file usb/uhci: enlarge uhci memory space usb/uhci: Add support for usb-uhci-sysbus usb/uhci: Add aspeed specific read and write functions
aspeed: Add uhci support for ast2600
aspeed: Add uhci support for ast2400 and ast2500
usb-hub: Add support for v2.0 hubs
usb-hub: Fix handling port power control messages
hw/arm/Kconfig | 1 + hw/arm/aspeed_ast2400.c | 14 ++ hw/arm/aspeed_ast2600.c | 20 +++ hw/isa/Kconfig | 4 +- hw/isa/vt82c686.c | 4 +- hw/usb/Kconfig | 10 +- hw/usb/dev-hub.c | 85 ++++++++++- hw/usb/hcd-uhci-pci.c | 255 ++++++++++++++++++++++++++++++++ hw/usb/hcd-uhci-pci.h | 63 ++++++++ hw/usb/hcd-uhci-sysbus.c | 202 +++++++++++++++++++++++++ hw/usb/hcd-uhci-sysbus.h | 34 +++++ hw/usb/hcd-uhci.c | 337 +++++++++++++----------------------------- hw/usb/hcd-uhci.h | 30 ++-- hw/usb/meson.build | 2 + hw/usb/vt82c686-uhci-pci.c | 18 +-- include/hw/arm/aspeed_soc.h | 3 + include/hw/southbridge/piix.h | 4 +- include/hw/usb/uhci-regs.h | 11 ++ 18 files changed, 822 insertions(+), 275 deletions(-) create mode 100644 hw/usb/hcd-uhci-pci.c create mode 100644 hw/usb/hcd-uhci-pci.h create mode 100644 hw/usb/hcd-uhci-sysbus.c create mode 100644 hw/usb/hcd-uhci-sysbus.h