Commit 9b9ff2e1 authored by Grant Grundler's avatar Grant Grundler Committed by Kyle McMartin

[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: default avatarGrant Grundler <grundler@parisc-linux.org>
Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent 7c0b67ef
...@@ -84,11 +84,17 @@ static __inline__ int pci_is_lmmio(struct pci_hba_data *hba, unsigned long a) ...@@ -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. ** Convert between PCI (IO_VIEW) addresses and processor (PA_VIEW) addresses.
** See pcibios.c for more conversions used by Generic PCI code. ** 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) \ #define PCI_BUS_ADDR(hba,a) (PCI_IS_LMMIO(hba,a) \
? ((a) - hba->lmmio_space_offset) /* mangle LMMIO */ \ ? ((a) - hba->lmmio_space_offset) /* mangle LMMIO */ \
: (a)) /* GMMIO */ : (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 */ #else /* !CONFIG_64BIT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment