422a6e8075
According to the PCI specification, PCI_INTERRUPT_LINE shall have no effect on hardware operations. Now that the VIA south bridges implement the internal PCI interrupt router let's be more conformant to the PCI specification. Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Rene Engel <ReneEngel80@emailn.de> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-Id: <9fb86a74d16db65e3aafbb154238d55e123053eb.1678188711.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
#include "qemu/osdep.h"
|
|
#include "hw/isa/vt82c686.h"
|
|
#include "hcd-uhci.h"
|
|
|
|
static void usb_uhci_vt82c686b_realize(PCIDevice *dev, Error **errp)
|
|
{
|
|
UHCIState *s = UHCI(dev);
|
|
uint8_t *pci_conf = s->dev.config;
|
|
|
|
/* USB misc control 1/2 */
|
|
pci_set_long(pci_conf + 0x40, 0x00001000);
|
|
/* PM capability */
|
|
pci_set_long(pci_conf + 0x80, 0x00020001);
|
|
/* USB legacy support */
|
|
pci_set_long(pci_conf + 0xc0, 0x00002000);
|
|
|
|
usb_uhci_common_realize(dev, errp);
|
|
}
|
|
|
|
static UHCIInfo uhci_info[] = {
|
|
{
|
|
.name = TYPE_VT82C686B_USB_UHCI,
|
|
.vendor_id = PCI_VENDOR_ID_VIA,
|
|
.device_id = PCI_DEVICE_ID_VIA_UHCI,
|
|
.revision = 0x01,
|
|
.irq_pin = 3,
|
|
.realize = usb_uhci_vt82c686b_realize,
|
|
.unplug = true,
|
|
/* Reason: only works as USB function of VT82xx superio chips */
|
|
.notuser = true,
|
|
}
|
|
};
|
|
|
|
static const TypeInfo vt82c686b_usb_uhci_type_info = {
|
|
.parent = TYPE_UHCI,
|
|
.name = TYPE_VT82C686B_USB_UHCI,
|
|
.class_init = uhci_data_class_init,
|
|
.class_data = uhci_info,
|
|
};
|
|
|
|
static void vt82c686b_usb_uhci_register_types(void)
|
|
{
|
|
type_register_static(&vt82c686b_usb_uhci_type_info);
|
|
}
|
|
|
|
type_init(vt82c686b_usb_uhci_register_types)
|