# HG changeset patch # User gthomas # Date 1060370903 0 # Node ID e8588368a458d74d698e976e060750935138d2b5 # Parent 71746e7a1cdcf699ef4f195dff798ef0a01fd954 Add CPU/PCI mapping macro 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,8 @@ +2003-08-08 Gary Thomas + + * 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 * cdl/io_pci.cdl: Fix doc link. diff --git a/packages/io/pci/current/include/pci.h b/packages/io/pci/current/include/pci.h --- a/packages/io/pci/current/include/pci.h +++ b/packages/io/pci/current/include/pci.h @@ -68,6 +68,15 @@ #include //------------------------------------------------------------------ +// 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;