diff options
author | Avi Kivity <avi@redhat.com> | 2009-12-07 10:46:09 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-07 10:46:09 +0200 |
commit | 989e2cd2f9db2edcd347c380dddfeb5b64327b76 (patch) | |
tree | f803f84b6d6393b6869b36c07bbe3760e7676fe5 /hw/pci.c | |
parent | Fix mismerge in cpu_post_load (diff) | |
parent | monitor: QError support (diff) | |
download | qemu-kvm-989e2cd2f9db2edcd347c380dddfeb5b64327b76.tar.gz qemu-kvm-989e2cd2f9db2edcd347c380dddfeb5b64327b76.tar.bz2 qemu-kvm-989e2cd2f9db2edcd347c380dddfeb5b64327b76.zip |
Merge commit '8204a9180c5f456d30cbd29fddf734e97f7c74fa' into upstream-merge
* commit '8204a9180c5f456d30cbd29fddf734e97f7c74fa': (22 commits)
monitor: QError support
Introduce QError
utests: Add qstring_from_substr() unit-test
utests: Add qstring_append_chr() unit-test
QString: Introduce qstring_from_substr()
QString: Introduce qstring_append_int()
QString: Introduce qstring_append_chr()
QJSON: Introduce qobject_from_jsonv()
fix I2C slave addressing
Fix qdev property type definition for isa serial/parallel devices
Fix qemu_malloc/qemu_free use in rtl8139.c
Fix free use in xen_backend.c
Fix qemu_free use in scsi-generic.c
Fix qemu_free use in nseries.c
Fix qemu_free use in bt-l2cap.c
Fix qemu_free use in nand.c
Fix qemu_free use in baum.c
Fix qemu_free use in acpi.c
pci: move apb specific stuff to apb_pci.c
configure: use correct cflags in compiler checks
...
Conflicts:
monitor.c
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r-- | hw/pci.c | 26 |
1 files changed, 6 insertions, 20 deletions
@@ -1333,29 +1333,10 @@ static int pci_bridge_initfn(PCIDevice *dev) pci_config_set_vendor_id(s->dev.config, s->vid); pci_config_set_device_id(s->dev.config, s->did); - /* TODO: intial value - * command register: - * According to PCI bridge spec, after reset - * bus master bit is off - * memory space enable bit is off - * According to manual (805-1251.pdf).(See abp_pbi.c for its links.) - * the reset value should be zero unless the boot pin is tied high - * (which is tru) and thus it should be PCI_COMMAND_MEMORY. - * - * For now, don't touch the value. - * Later command register will be set to zero and apb_pci.c will - * override the value. - * Same for latency timer, and multi function bit of header type. - */ - pci_set_word(dev->config + PCI_COMMAND, - PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); - pci_set_word(dev->config + PCI_STATUS, PCI_STATUS_66MHZ | PCI_STATUS_FAST_BACK); pci_config_set_class(dev->config, PCI_CLASS_BRIDGE_PCI); - dev->config[PCI_LATENCY_TIMER] = 0x10; - dev->config[PCI_HEADER_TYPE] = - PCI_HEADER_TYPE_MULTI_FUNCTION | PCI_HEADER_TYPE_BRIDGE; + dev->config[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_BRIDGE; pci_set_word(dev->config + PCI_SEC_STATUS, PCI_STATUS_66MHZ | PCI_STATUS_FAST_BACK); return 0; @@ -1385,6 +1366,11 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did, return &s->bus; } +PCIDevice *pci_bridge_get_device(PCIBus *bus) +{ + return bus->parent_dev; +} + static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base) { PCIDevice *pci_dev = (PCIDevice *)qdev; |