From 817e0b6fe8324de8dbd4bec9184c207754618365 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Sun, 11 Sep 2011 13:40:23 +0300 Subject: pci: interrupt pin documentation update Fix up some erroneous comments in code: interrupt pins are named A-D, the interrupt pin register is always readonly and isn't zeroed out on reset. Signed-off-by: Michael S. Tsirkin --- hw/ac97.c | 1 - hw/e1000.c | 3 +-- hw/es1370.c | 1 - hw/lsi53c895a.c | 3 +-- hw/ne2000.c | 3 +-- hw/pcnet-pci.c | 2 +- hw/rtl8139.c | 2 +- hw/usb-ehci.c | 2 +- hw/usb-ohci.c | 3 +-- hw/usb-uhci.c | 2 +- 10 files changed, 8 insertions(+), 14 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 541d9a4b97..bc69d4e345 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -1311,7 +1311,6 @@ static int ac97_initfn (PCIDevice *dev) c[PCI_SUBSYSTEM_ID + 1] = 0x00; c[PCI_INTERRUPT_LINE] = 0x00; /* intr_ln interrupt line rw */ - /* TODO: RST# value should be 0. */ c[PCI_INTERRUPT_PIN] = 0x01; /* intr_pn interrupt pin ro */ memory_region_init_io (&s->io_nam, &ac97_io_nam_ops, s, "ac97-nam", 1024); diff --git a/hw/e1000.c b/hw/e1000.c index a6d12c55fb..6a3a941488 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -1156,8 +1156,7 @@ static int pci_e1000_init(PCIDevice *pci_dev) /* TODO: RST# value should be 0, PCI spec 6.2.4 */ pci_conf[PCI_CACHE_LINE_SIZE] = 0x10; - /* TODO: RST# value should be 0 if programmable, PCI spec 6.2.4 */ - pci_conf[PCI_INTERRUPT_PIN] = 1; // interrupt pin 0 + pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */ e1000_mmio_setup(d); diff --git a/hw/es1370.c b/hw/es1370.c index a9387d15cc..2daadde0e6 100644 --- a/hw/es1370.c +++ b/hw/es1370.c @@ -1003,7 +1003,6 @@ static int es1370_initfn (PCIDevice *dev) c[0xdc] = 0x00; #endif - /* TODO: RST# value should be 0. */ c[PCI_INTERRUPT_PIN] = 1; c[PCI_MIN_GNT] = 0x0c; c[PCI_MAX_LAT] = 0x80; diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index dbb3bdf2ce..75a03a74b9 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -2106,8 +2106,7 @@ static int lsi_scsi_init(PCIDevice *dev) /* PCI latency timer = 255 */ pci_conf[PCI_LATENCY_TIMER] = 0xff; - /* TODO: RST# value should be 0 */ - /* Interrupt pin 1 */ + /* Interrupt pin A */ pci_conf[PCI_INTERRUPT_PIN] = 0x01; memory_region_init_io(&s->mmio_io, &lsi_mmio_ops, s, "lsi-mmio", 0x400); diff --git a/hw/ne2000.c b/hw/ne2000.c index a035a85244..62e082f8a9 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -749,8 +749,7 @@ static int pci_ne2000_init(PCIDevice *pci_dev) uint8_t *pci_conf; pci_conf = d->dev.config; - /* TODO: RST# value should be 0. PCI spec 6.2.4 */ - pci_conf[PCI_INTERRUPT_PIN] = 1; // interrupt pin 0 + pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */ s = &d->ne2000; ne2000_setup_io(s, 0x100); diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c index 51e132050f..fb2a00caad 100644 --- a/hw/pcnet-pci.c +++ b/hw/pcnet-pci.c @@ -285,7 +285,7 @@ static int pci_pcnet_init(PCIDevice *pci_dev) pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, 0x0); pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, 0x0); - pci_conf[PCI_INTERRUPT_PIN] = 1; // interrupt pin 0 + pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */ pci_conf[PCI_MIN_GNT] = 0x06; pci_conf[PCI_MAX_LAT] = 0xff; diff --git a/hw/rtl8139.c b/hw/rtl8139.c index c5de5b48ba..37539508c5 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -3464,7 +3464,7 @@ static int pci_rtl8139_init(PCIDevice *dev) uint8_t *pci_conf; pci_conf = s->dev.config; - pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin 0 */ + pci_conf[PCI_INTERRUPT_PIN] = 1; /* interrupt pin A */ /* TODO: start of capability list, but no capability * list bit in status register, and offset 0xdc seems unused. */ pci_conf[PCI_CAPABILITY_LIST] = 0xdc; diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index e9e0789795..27376a2351 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -2291,7 +2291,7 @@ static int usb_ehci_initfn(PCIDevice *dev) pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x00); //pci_set_byte(&pci_conf[PCI_CAPABILITY_LIST], 0x50); - pci_set_byte(&pci_conf[PCI_INTERRUPT_PIN], 4); // interrupt pin 3 + pci_set_byte(&pci_conf[PCI_INTERRUPT_PIN], 4); /* interrupt pin D */ pci_set_byte(&pci_conf[PCI_MIN_GNT], 0); pci_set_byte(&pci_conf[PCI_MAX_LAT], 0); diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c index 503ca2d31f..c3be65a2e9 100644 --- a/hw/usb-ohci.c +++ b/hw/usb-ohci.c @@ -1780,8 +1780,7 @@ static int usb_ohci_initfn_pci(struct PCIDevice *dev) OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, dev); ohci->pci_dev.config[PCI_CLASS_PROG] = 0x10; /* OHCI */ - /* TODO: RST# value should be 0. */ - ohci->pci_dev.config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin 1 */ + ohci->pci_dev.config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */ if (usb_ohci_init(&ohci->state, &dev->qdev, ohci->num_ports, 0, ohci->masterbus, ohci->firstport) != 0) { diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 64f7b36c00..17992cf003 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -1131,7 +1131,7 @@ static int usb_uhci_common_initfn(PCIDevice *dev) pci_conf[PCI_CLASS_PROG] = 0x00; /* TODO: reset value should be 0. */ - pci_conf[PCI_INTERRUPT_PIN] = 4; // interrupt pin 3 + pci_conf[PCI_INTERRUPT_PIN] = 4; /* interrupt pin D */ pci_conf[USB_SBRN] = USB_RELEASE_1; // release number if (s->masterbus) { -- cgit v1.2.1