]> Git Repo - qemu.git/commitdiff
lsi: symbolic names for pci registers
authorMichael S. Tsirkin <[email protected]>
Thu, 10 Dec 2009 16:56:42 +0000 (18:56 +0200)
committerMichael S. Tsirkin <[email protected]>
Wed, 23 Dec 2009 14:35:00 +0000 (16:35 +0200)
No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <[email protected]>
Acked-by: Juan Quintela <[email protected]>
Acked-by: Glauber Costa <[email protected]>
hw/lsi53c895a.c

index 014c85dbda20a7ad7782a37b84c2d587f0ef3143..463a889d6fc45619872c96afdd6a9a0a508d1518 100644 (file)
@@ -2120,18 +2120,20 @@ static int lsi_scsi_init(PCIDevice *dev)
     /* PCI base class code */
     pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_SCSI);
     /* PCI subsystem ID */
-    pci_conf[0x2e] = 0x00;
-    pci_conf[0x2f] = 0x10;
+    pci_conf[PCI_SUBSYSTEM_ID] = 0x00;
+    pci_conf[PCI_SUBSYSTEM_ID + 1] = 0x10;
     /* PCI latency timer = 255 */
-    pci_conf[0x0d] = 0xff;
+    pci_conf[PCI_LATENCY_TIMER] = 0xff;
+    /* TODO: RST# value should be 0 */
     /* Interrupt pin 1 */
-    pci_conf[0x3d] = 0x01;
+    pci_conf[PCI_INTERRUPT_PIN] = 0x01;
 
     s->mmio_io_addr = cpu_register_io_memory(lsi_mmio_readfn,
                                              lsi_mmio_writefn, s);
     s->ram_io_addr = cpu_register_io_memory(lsi_ram_readfn,
                                             lsi_ram_writefn, s);
 
+    /* TODO: use dev and get rid of cast below */
     pci_register_bar((struct PCIDevice *)s, 0, 256,
                            PCI_BASE_ADDRESS_SPACE_IO, lsi_io_mapfunc);
     pci_register_bar((struct PCIDevice *)s, 1, 0x400,
This page took 0.029625 seconds and 4 git commands to generate.