Mercurial > ecos
changeset 1161:e8588368a458
Add CPU/PCI mapping macro
| author | gthomas |
|---|---|
| date | Fri, 08 Aug 2003 19:28:23 +0000 |
| parents | 71746e7a1cdc |
| children | 99158cb29a49 |
| files | packages/io/pci/current/ChangeLog packages/io/pci/current/include/pci.h |
| diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/pci/current/ChangeLog +++ b/packages/io/pci/current/ChangeLog @@ -1,3 +1,8 @@ +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.
--- a/packages/io/pci/current/include/pci.h +++ b/packages/io/pci/current/include/pci.h @@ -68,6 +68,15 @@ #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;
