This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PCI: examine all BARs


Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/pci/current/ChangeLog,v
retrieving revision 1.20
diff -u -5 -r1.20 ChangeLog
--- ChangeLog	8 Aug 2003 19:28:23 -0000	1.20
+++ ChangeLog	29 Sep 2003 17:12:19 -0000
@@ -1,5 +1,11 @@
+2003-09-29  Nick Garnett  <nickg@balti.calivar.com>
+
+	* src/pci.c (cyg_pci_get_device_info): Removed check for inactive
+	BARs since the requirement for the BARs to be contiguous has been
+	relaxed in more recent versions of the PCI standard.
+
 2003-08-08  Gary Thomas  <gary@mind.be>
 
 	* include/pci.h: Add CYGARC_PCI_DMA_ADDRESS() macro - used to
 	map CPU addresses to ones usable by PCI masters.
 
Index: src/pci.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/pci/current/src/pci.c,v
retrieving revision 1.13
diff -u -5 -r1.13 pci.c
--- src/pci.c	21 Feb 2003 18:10:31 -0000	1.13
+++ src/pci.c	29 Sep 2003 17:12:21 -0000
@@ -148,16 +148,10 @@
                                          CYG_PCI_CFG_BAR_BASE + 4*i,
                                          &size);
             dev_info->base_size[i] = size;
             dev_info->base_map[i] = 0xffffffff;
 
-	    // No reason to scan beyond first inactive BAR.
-	    if (size == 0) {
-		dev_info->num_bars = i;
-		break;
-	    }
-
             // Check for a 64bit memory region.
             if (CYG_PCI_CFG_BAR_SPACE_MEM == 
                 (size & CYG_PCI_CFG_BAR_SPACE_MASK)) {
                 if (size & CYG_PRI_CFG_BAR_MEM_TYPE_64) {
                     // Clear fields for next BAR - it's the upper 32 bits.
@@ -175,16 +169,10 @@
         for (i = 0; i < dev_info->num_bars; i++){
 
 	    dev_info->base_size[i] = 0;
 
             bar = dev_info->base_address[i];
-
-	    // No reason to scan beyond first inactive BAR.
-	    if ((i != 0) && (bar == 0)) {
-		dev_info->num_bars = i;
-		break;
-	    }
 
 	    if ((bar & CYG_PCI_CFG_BAR_SPACE_MASK) == CYG_PCI_CFG_BAR_SPACE_IO) {
 		dev_info->base_map[i] = (bar & CYG_PRI_CFG_BAR_IO_MASK) + HAL_PCI_PHYSICAL_IO_BASE;
 		bar &= CYG_PRI_CFG_BAR_IO_MASK;
                 if ((bar < 0xFF000000) && (bar >= cyg_pci_io_base)) {


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]