diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-26 15:37:35 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-26 15:37:35 +0000 |
commit | deb54399df163e782aff00beb106f3b6a7cc9663 (patch) | |
tree | 00f99dbd1adbf0f2c7ac75befc848a454c77aefa /hw/usb-ohci.c | |
parent | vnc fixes and improvements (Stefano Stabellini) (diff) | |
download | qemu-kvm-deb54399df163e782aff00beb106f3b6a7cc9663.tar.gz qemu-kvm-deb54399df163e782aff00beb106f3b6a7cc9663.tar.bz2 qemu-kvm-deb54399df163e782aff00beb106f3b6a7cc9663.zip |
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching those
from Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1:
Introduces pci_config_set_vendor_id() / pci_config_set_device_id()
accessors as suggested by Anthony Liguori.
Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6442 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb-ohci.c')
-rw-r--r-- | hw/usb-ohci.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index f35685dfd..e3d8db650 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -1671,8 +1671,6 @@ static void ohci_mapfunc(PCIDevice *pci_dev, int i, void usb_ohci_init_pci(struct PCIBus *bus, int num_ports, int devfn) { OHCIPCIState *ohci; - int vid = 0x106b; - int did = 0x003f; ohci = (OHCIPCIState *)pci_register_device(bus, "OHCI USB", sizeof(*ohci), devfn, NULL, NULL); @@ -1681,10 +1679,8 @@ void usb_ohci_init_pci(struct PCIBus *bus, int num_ports, int devfn) return; } - ohci->pci_dev.config[0x00] = vid & 0xff; - ohci->pci_dev.config[0x01] = (vid >> 8) & 0xff; - ohci->pci_dev.config[0x02] = did & 0xff; - ohci->pci_dev.config[0x03] = (did >> 8) & 0xff; + pci_config_set_vendor_id(ohci->pci_dev.config, PCI_VENDOR_ID_APPLE); + pci_config_set_device_id(ohci->pci_dev.config, 0x003f); // device_id ohci->pci_dev.config[0x09] = 0x10; /* OHCI */ ohci->pci_dev.config[0x0a] = 0x3; ohci->pci_dev.config[0x0b] = 0xc; |