changeset 1804:3f880cd73997

Add CYGPKG_IO_PCI_CONFIGURE_INTLINE option
author msalter
date Tue, 12 Oct 2004 13:33:56 +0000
parents 4028c3fff75e
children 73d430b9b0ca
files packages/io/pci/current/ChangeLog packages/io/pci/current/cdl/io_pci.cdl packages/io/pci/current/src/pci.c
diffstat 3 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/packages/io/pci/current/ChangeLog
+++ b/packages/io/pci/current/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-12  Mark Salter  <msalter@redhat.com>
+
+	* cdl/io_pci.cdl (CYGPKG_IO_PCI_CONFIGURE_INTLINE): New option.
+	* src/pci.c (cyg_pci_translate_interrupt): Don't write INT LINE
+	register unless CYGPKG_IO_PCI_CONFIGURE_INTLINE defined.
+
 2004-08-31  Mark Salter  <msalter@redhat.com>
 
 	* src/pci.c (cyg_pci_translate_interrupt): Write vector number into
--- a/packages/io/pci/current/cdl/io_pci.cdl
+++ b/packages/io/pci/current/cdl/io_pci.cdl
@@ -109,5 +109,17 @@ cdl_package CYGPKG_IO_PCI {
             description   "
                 This option specifies the set of tests for the PCI configuration library."
         }
+
+        cdl_option CYGPKG_IO_PCI_CONFIGURE_INTLINE {
+            display "Writeback Interrupt Line register."
+            flavor  bool
+            default_value 0
+            description   "
+                This option causes a PCI device interrupt vector to be
+                written to the Interrupt Line register in config space.
+                This is traditionally done by a BIOS so that device
+                drivers can read the interrupt vector directly from
+                device configuration space."
+        }
     }
 }
--- a/packages/io/pci/current/src/pci.c
+++ b/packages/io/pci/current/src/pci.c
@@ -871,11 +871,13 @@ cyg_pci_translate_interrupt( cyg_pci_dev
     cyg_uint8 devfn = CYG_PCI_DEV_GET_DEVFN(dev_info->devid);
 
     if (cyg_pcihw_translate_interrupt(bus, devfn, vec)) {
+#ifdef CYGPKG_IO_PCI_CONFIGURE_INTLINE
         // Fill in interrupt line info. This only really works for
         // platforms where assigned PCI irq numbers are less than 255.
         cyg_pcihw_write_config_uint8(bus, devfn,
                                      CYG_PCI_CFG_INT_LINE, 
                                      *vec & 0xff);
+#endif
         return true;
     }
     return false;