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 - Mapping macro


There was no standard macro to express how a PCI bus master
sees a CPU local address.  While this is simple on most platforms,
some require actual mapping of the address.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: io/pci/current/ChangeLog
===================================================================
RCS file: /home/gthomas/my_cvs/develop/ecos/packages/io/pci/current/ChangeLog,v
retrieving revision 1.3
diff -u -5 -p -r1.3 ChangeLog
--- io/pci/current/ChangeLog	27 Feb 2003 20:59:46 -0000	1.3
+++ io/pci/current/ChangeLog	8 Aug 2003 19:19:18 -0000
@@ -1,5 +1,10 @@
+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.
+
 2003-02-24  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* cdl/io_pci.cdl: Fix doc link.
 
 2003-02-21  Gary Thomas  <gary@mlbassoc.com>
Index: io/pci/current/include/pci.h
===================================================================
RCS file: /home/gthomas/my_cvs/develop/ecos/packages/io/pci/current/include/pci.h,v
retrieving revision 1.1.1.1
diff -u -5 -p -r1.1.1.1 pci.h
--- io/pci/current/include/pci.h	15 Jul 2002 14:21:59 -0000	1.1.1.1
+++ io/pci/current/include/pci.h	8 Aug 2003 19:11:25 -0000
@@ -66,10 +66,19 @@
 #include <cyg/infra/cyg_type.h>
 #include <cyg/io/pci_cfg.h>
 #include <cyg/io/pci_hw.h>
 
 //------------------------------------------------------------------
+// Map a logical (CPU local) address to one used by a PCI master
+// Normally, this is just the physical address of the object, but
+// it may differ if the platform has different address maps from 
+// the CPU side vs. the PCI side
+#ifndef CYGARC_PCI_DMA_ADDRESS
+#define CYGARC_PCI_DMA_ADDRESS(_x_) CYGARC_PHYSICAL_ADDRESS(_x_)
+#endif
+
+//------------------------------------------------------------------
 // The PCI memory space can span 64 bits, IO space only 32 bits
 typedef CYG_WORD64 CYG_PCI_ADDRESS64;
 typedef CYG_WORD32 CYG_PCI_ADDRESS32;
 
 //------------------------------------------------------------------

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