|
Hans de Goede |
3f1f29 |
From 8fe1c377cf894b7071e36e64a206f3b52ea0ab68 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
3f1f29 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
3f1f29 |
Date: Fri, 1 Jul 2011 11:51:02 +0200
|
|
Hans de Goede |
3f1f29 |
Subject: [PATCH 18/35] ehci: add ich9 controller.
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
3f1f29 |
---
|
|
Hans de Goede |
3f1f29 |
hw/usb-ehci.c | 43 +++++++++++++++++++++++++++++--------------
|
|
Hans de Goede |
3f1f29 |
1 files changed, 29 insertions(+), 14 deletions(-)
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
|
|
Hans de Goede |
3f1f29 |
index 0b959ca..a4758f9 100644
|
|
Hans de Goede |
3f1f29 |
--- a/hw/usb-ehci.c
|
|
Hans de Goede |
3f1f29 |
+++ b/hw/usb-ehci.c
|
|
Hans de Goede |
3f1f29 |
@@ -2244,19 +2244,34 @@ static USBBusOps ehci_bus_ops = {
|
|
Hans de Goede |
3f1f29 |
.register_companion = ehci_register_companion,
|
|
Hans de Goede |
3f1f29 |
};
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
-static PCIDeviceInfo ehci_info = {
|
|
Hans de Goede |
3f1f29 |
- .qdev.name = "usb-ehci",
|
|
Hans de Goede |
3f1f29 |
- .qdev.size = sizeof(EHCIState),
|
|
Hans de Goede |
3f1f29 |
- .init = usb_ehci_initfn,
|
|
Hans de Goede |
3f1f29 |
- .vendor_id = PCI_VENDOR_ID_INTEL,
|
|
Hans de Goede |
3f1f29 |
- .device_id = PCI_DEVICE_ID_INTEL_82801D,
|
|
Hans de Goede |
3f1f29 |
- .revision = 0x10,
|
|
Hans de Goede |
3f1f29 |
- .class_id = PCI_CLASS_SERIAL_USB,
|
|
Hans de Goede |
3f1f29 |
- .qdev.props = (Property[]) {
|
|
Hans de Goede |
3f1f29 |
- DEFINE_PROP_UINT32("freq", EHCIState, freq, FRAME_TIMER_FREQ),
|
|
Hans de Goede |
3f1f29 |
- DEFINE_PROP_UINT32("maxframes", EHCIState, maxframes, 128),
|
|
Hans de Goede |
3f1f29 |
- DEFINE_PROP_END_OF_LIST(),
|
|
Hans de Goede |
3f1f29 |
- },
|
|
Hans de Goede |
3f1f29 |
+static Property ehci_properties[] = {
|
|
Hans de Goede |
3f1f29 |
+ DEFINE_PROP_UINT32("freq", EHCIState, freq, FRAME_TIMER_FREQ),
|
|
Hans de Goede |
3f1f29 |
+ DEFINE_PROP_UINT32("maxframes", EHCIState, maxframes, 128),
|
|
Hans de Goede |
3f1f29 |
+ DEFINE_PROP_END_OF_LIST(),
|
|
Hans de Goede |
3f1f29 |
+};
|
|
Hans de Goede |
3f1f29 |
+
|
|
Hans de Goede |
3f1f29 |
+static PCIDeviceInfo ehci_info[] = {
|
|
Hans de Goede |
3f1f29 |
+ {
|
|
Hans de Goede |
3f1f29 |
+ .qdev.name = "usb-ehci",
|
|
Hans de Goede |
3f1f29 |
+ .qdev.size = sizeof(EHCIState),
|
|
Hans de Goede |
3f1f29 |
+ .init = usb_ehci_initfn,
|
|
Hans de Goede |
3f1f29 |
+ .vendor_id = PCI_VENDOR_ID_INTEL,
|
|
Hans de Goede |
3f1f29 |
+ .device_id = PCI_DEVICE_ID_INTEL_82801D, /* ich4 */
|
|
Hans de Goede |
3f1f29 |
+ .revision = 0x10,
|
|
Hans de Goede |
3f1f29 |
+ .class_id = PCI_CLASS_SERIAL_USB,
|
|
Hans de Goede |
3f1f29 |
+ .qdev.props = ehci_properties,
|
|
Hans de Goede |
3f1f29 |
+ },{
|
|
Hans de Goede |
3f1f29 |
+ .qdev.name = "ich9-usb-ehci1",
|
|
Hans de Goede |
3f1f29 |
+ .qdev.size = sizeof(EHCIState),
|
|
Hans de Goede |
3f1f29 |
+ .init = usb_ehci_initfn,
|
|
Hans de Goede |
3f1f29 |
+ .vendor_id = PCI_VENDOR_ID_INTEL,
|
|
Hans de Goede |
3f1f29 |
+ .device_id = PCI_DEVICE_ID_INTEL_82801I_EHCI1,
|
|
Hans de Goede |
3f1f29 |
+ .revision = 0x03,
|
|
Hans de Goede |
3f1f29 |
+ .class_id = PCI_CLASS_SERIAL_USB,
|
|
Hans de Goede |
3f1f29 |
+ .qdev.props = ehci_properties,
|
|
Hans de Goede |
3f1f29 |
+ },{
|
|
Hans de Goede |
3f1f29 |
+ /* end of list */
|
|
Hans de Goede |
3f1f29 |
+ }
|
|
Hans de Goede |
3f1f29 |
};
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
static int usb_ehci_initfn(PCIDevice *dev)
|
|
Hans de Goede |
3f1f29 |
@@ -2335,7 +2350,7 @@ static int usb_ehci_initfn(PCIDevice *dev)
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
static void ehci_register(void)
|
|
Hans de Goede |
3f1f29 |
{
|
|
Hans de Goede |
3f1f29 |
- pci_qdev_register(&ehci_info);
|
|
Hans de Goede |
3f1f29 |
+ pci_qdev_register_many(ehci_info);
|
|
Hans de Goede |
3f1f29 |
}
|
|
Hans de Goede |
3f1f29 |
device_init(ehci_register);
|
|
Hans de Goede |
3f1f29 |
|
|
Hans de Goede |
3f1f29 |
--
|
|
Hans de Goede |
3f1f29 |
1.7.5.1
|
|
Hans de Goede |
3f1f29 |
|