summaryrefslogtreecommitdiff
path: root/hw/es1370.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2009-12-10 19:04:25 +0200
committerMichael S. Tsirkin <mst@redhat.com>2009-12-23 16:35:00 +0200
commitd3e2f1353e8d467130a33e3bf245fb679f0fb8a8 (patch)
tree1334453fc0415aab447378db902d0a2a92bc1cc5 /hw/es1370.c
parent5d89715b00d2df74caf109127edb9ccc813a2628 (diff)
downloadqemu-d3e2f1353e8d467130a33e3bf245fb679f0fb8a8.tar.gz
es1370: symbolic names for pci registers
No functional changes. I verified that the generated binary does not change. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Glauber Costa <glommer@gmail.com>
Diffstat (limited to 'hw/es1370.c')
-rw-r--r--hw/es1370.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/hw/es1370.c b/hw/es1370.c
index c3582539d5..40cb48cbb8 100644
--- a/hw/es1370.c
+++ b/hw/es1370.c
@@ -1000,27 +1000,28 @@ static int es1370_initfn (PCIDevice *dev)
pci_config_set_vendor_id (c, PCI_VENDOR_ID_ENSONIQ);
pci_config_set_device_id (c, PCI_DEVICE_ID_ENSONIQ_ES1370);
- c[0x07] = 2 << 1;
+ c[PCI_STATUS + 1] = PCI_STATUS_DEVSEL_SLOW >> 8;
pci_config_set_class (c, PCI_CLASS_MULTIMEDIA_AUDIO);
#if 1
- c[0x2c] = 0x42;
- c[0x2d] = 0x49;
- c[0x2e] = 0x4c;
- c[0x2f] = 0x4c;
+ c[PCI_SUBSYSTEM_VENDOR_ID] = 0x42;
+ c[PCI_SUBSYSTEM_VENDOR_ID + 1] = 0x49;
+ c[PCI_SUBSYSTEM_ID] = 0x4c;
+ c[PCI_SUBSYSTEM_ID + 1] = 0x4c;
#else
- c[0x2c] = 0x74;
- c[0x2d] = 0x12;
- c[0x2e] = 0x71;
- c[0x2f] = 0x13;
- c[0x34] = 0xdc;
- c[0x3c] = 10;
+ c[PCI_SUBSYSTEM_VENDOR_ID] = 0x74;
+ c[PCI_SUBSYSTEM_VENDOR_ID + 1] = 0x12;
+ c[PCI_SUBSYSTEM_ID] = 0x71;
+ c[PCI_SUBSYSTEM_ID + 1] = 0x13;
+ c[PCI_CAPABILITY_LIST] = 0xdc;
+ c[PCI_INTERRUPT_LINE] = 10;
c[0xdc] = 0x00;
#endif
- c[0x3d] = 1;
- c[0x3e] = 0x0c;
- c[0x3f] = 0x80;
+ /* TODO: RST# value should be 0. */
+ c[PCI_INTERRUPT_PIN] = 1;
+ c[PCI_MIN_GNT] = 0x0c;
+ c[PCI_MAX_LAT] = 0x80;
pci_register_bar (&s->dev, 0, 256, PCI_BASE_ADDRESS_SPACE_IO, es1370_map);
qemu_register_reset (es1370_on_reset, s);