diff options
author | Grant Grundler <grundler@parisc-linux.org> | 2006-01-10 20:48:00 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@duet.int.mcmartin.ca> | 2006-01-10 21:52:30 -0500 |
commit | 9b9ff2e16a4609a7ab39b12e67fc56b51c8cd1f4 (patch) | |
tree | 1f0be3d7ba0739d5f526af792c9b02c58185ad07 /include/asm-parisc/pci.h | |
parent | 7c0b67efe9e15fa81cfa332a9a6f6cd5f7941bbc (diff) | |
download | blackbird-op-linux-9b9ff2e16a4609a7ab39b12e67fc56b51c8cd1f4.tar.gz blackbird-op-linux-9b9ff2e16a4609a7ab39b12e67fc56b51c8cd1f4.zip |
[PARISC] Make PCI_HOST_ADDR and PCI_BUS_ADDR symmetrical
Change to asm-parisc/pci.h makes the define of PCI_HOST_ADDR symmetrical
with PCI_BUS_ADDR. Also add a comment about PA_VIEW and LMMIO/ELMMIO/GMMIO.
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'include/asm-parisc/pci.h')
-rw-r--r-- | include/asm-parisc/pci.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-parisc/pci.h b/include/asm-parisc/pci.h index fa39d07d49e9..f277254159b7 100644 --- a/include/asm-parisc/pci.h +++ b/include/asm-parisc/pci.h @@ -84,11 +84,17 @@ static __inline__ int pci_is_lmmio(struct pci_hba_data *hba, unsigned long a) /* ** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses. ** See pcibios.c for more conversions used by Generic PCI code. +** +** Platform characteristics/firmware guarantee that +** (1) PA_VIEW - IO_VIEW = lmmio_offset for both LMMIO and ELMMIO +** (2) PA_VIEW == IO_VIEW for GMMIO */ #define PCI_BUS_ADDR(hba,a) (PCI_IS_LMMIO(hba,a) \ ? ((a) - hba->lmmio_space_offset) /* mangle LMMIO */ \ : (a)) /* GMMIO */ -#define PCI_HOST_ADDR(hba,a) ((a) + hba->lmmio_space_offset) +#define PCI_HOST_ADDR(hba,a) (((a) & PCI_F_EXTEND) == 0 \ + ? (a) + hba->lmmio_space_offset \ + : (a)) #else /* !CONFIG_64BIT */ |