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]

CSB281 - PCI bus display


Just for diagnostic - must be manually enabled like most other HAL's. 

Index: hal/powerpc/csb281/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/csb281/current/ChangeLog,v
retrieving revision 1.8
diff -u -5 -p -r1.8 ChangeLog
--- hal/powerpc/csb281/current/ChangeLog	11 Mar 2003 17:14:14 -0000	1.8
+++ hal/powerpc/csb281/current/ChangeLog	18 Mar 2003 17:08:26 -0000
@@ -1,5 +1,9 @@
+2003-03-18  Gary Thomas  <gary at mlbassoc dot com>
+
+	* src/hal_aux.c (_csb281_pci_init): Display PCI bus - disabled.
+
 2003-03-11  Mark Salter  <msalter at redhat dot com>
 
 	* src/redboot_linux_exec.c (do_exec): Call eth_drv_stop as necessary.
 
 2003-02-26  Gary Thomas  <gary at mlbassoc dot com>
Index: hal/powerpc/csb281/current/src/hal_aux.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/csb281/current/src/hal_aux.c,v
retrieving revision 1.3
diff -u -5 -p -r1.3 hal_aux.c
--- hal/powerpc/csb281/current/src/hal_aux.c	1 Feb 2003 18:31:16 -0000	1.3
+++ hal/powerpc/csb281/current/src/hal_aux.c	18 Mar 2003 17:08:02 -0000
@@ -274,10 +274,35 @@ _csb281_pci_init(void)
         // Configure PCI bus.
         next_bus = 1;
         cyg_pci_configure_bus(0, &next_bus);
     }
 
+    if (0){
+        cyg_uint8 devfn;
+        cyg_pci_device_id devid;
+        cyg_pci_device dev_info;
+        int i;
+
+        devid = CYG_PCI_DEV_MAKE_ID(next_bus-1, 0) | CYG_PCI_NULL_DEVFN;
+        while (cyg_pci_find_next(devid, &devid)) {
+            devfn = CYG_PCI_DEV_GET_DEVFN(devid);
+            cyg_pci_get_device_info(devid, &dev_info);
+
+            diag_printf("\n");
+            diag_printf("Bus:        %d\n", CYG_PCI_DEV_GET_BUS(devid));
+            diag_printf("PCI Device: %d\n", CYG_PCI_DEV_GET_DEV(devfn));
+            diag_printf("PCI Func  : %d\n", CYG_PCI_DEV_GET_FN(devfn));
+            diag_printf("Vendor Id : 0x%08X\n", dev_info.vendor);
+            diag_printf("Device Id : 0x%08X\n", dev_info.device);
+            for (i = 0; i < dev_info.num_bars; i++) {
+                diag_printf("  BAR[%d]    0x%08x /", i, dev_info.base_address[i]);
+                diag_printf(" probed size 0x%08x / CPU addr 0x%08x\n",
+                            dev_info.base_size[i], dev_info.base_map[i]);
+            }
+        }
+    }
+
     // Configure interrupts (high level)?
     HAL_INTERRUPT_CONFIGURE(CYGNUM_HAL_INTERRUPT_PCI0, 1, 1);
     HAL_INTERRUPT_CONFIGURE(CYGNUM_HAL_INTERRUPT_PCI1, 1, 1);
     HAL_INTERRUPT_CONFIGURE(CYGNUM_HAL_INTERRUPT_LAN, 1, 1);
 }


-- 
------------------------------------------------------------
Gary Thomas                 |
MLB Associates              |  Consulting for the
+1 (970) 229-1963           |    Embedded world
http://www.mlbassoc.com/    |
email: <gary at mlbassoc dot com>  |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------


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