summary refs log tree commit diff stats
path: root/hw/pci-host/raven.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-01-05 18:37:02 +0100
committerMichael S. Tsirkin <mst@redhat.com>2023-01-27 11:47:02 -0500
commit8a8c9c3a747f77e664fa2288735b45a9d750be75 (patch)
tree7f63aa836dd42c325aa3acc889c7d6ac959b342d /hw/pci-host/raven.c
parent744734ccc9eff28394a453de462b2a155f364118 (diff)
downloadfocaccia-qemu-8a8c9c3a747f77e664fa2288735b45a9d750be75.tar.gz
focaccia-qemu-8a8c9c3a747f77e664fa2288735b45a9d750be75.zip
hw/pci-host: Use register definitions from PCI standard
No need to document magic values when the definition names
from "standard-headers/linux/pci_regs.h" are self-explicit.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230105173702.56610-1-philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Diffstat (limited to 'hw/pci-host/raven.c')
-rw-r--r--hw/pci-host/raven.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c
index 5b00b4e462..cdfb62ac2e 100644
--- a/hw/pci-host/raven.c
+++ b/hw/pci-host/raven.c
@@ -330,9 +330,9 @@ static void raven_realize(PCIDevice *d, Error **errp)
     char *filename;
     int bios_size = -1;
 
-    d->config[0x0C] = 0x08; // cache_line_size
-    d->config[0x0D] = 0x10; // latency_timer
-    d->config[0x34] = 0x00; // capabilities_pointer
+    d->config[PCI_CACHE_LINE_SIZE] = 0x08;
+    d->config[PCI_LATENCY_TIMER] = 0x10;
+    d->config[PCI_CAPABILITY_LIST] = 0x00;
 
     memory_region_init_rom_nomigrate(&s->bios, OBJECT(s), "bios", BIOS_SIZE,
                                      &error_fatal);