# HG changeset patch # User msalter # Date 1097588036 0 # Node ID 3f880cd73997f4c19d1aebd2b8674ace4e5a66d8 # Parent 4028c3fff75e9727a06742c81ef5c62da89f8ec7 Add CYGPKG_IO_PCI_CONFIGURE_INTLINE option diff --git a/packages/io/pci/current/ChangeLog b/packages/io/pci/current/ChangeLog --- a/packages/io/pci/current/ChangeLog +++ b/packages/io/pci/current/ChangeLog @@ -1,3 +1,9 @@ +2004-10-12 Mark Salter + + * 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 * src/pci.c (cyg_pci_translate_interrupt): Write vector number into diff --git a/packages/io/pci/current/cdl/io_pci.cdl b/packages/io/pci/current/cdl/io_pci.cdl --- 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." + } } } diff --git a/packages/io/pci/current/src/pci.c b/packages/io/pci/current/src/pci.c --- 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;