diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-09-20 12:10:02 +0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-09-20 12:10:02 +0400 |
commit | cecf48e23fd9270053850643a56e8e791322e3d5 (patch) | |
tree | cf6d0e8ef8414f9919ac4fa1acd33e41591be4f1 /arch/sh/drivers/pci/pcie-sh7786.h | |
parent | bd792aea441a3dcdede462486ab8c63045803844 (diff) | |
download | linux-cecf48e23fd9270053850643a56e8e791322e3d5.tar.xz |
sh: pci: Use I/O accessors consistently in SH7786 PCIe init code.
Some of the existing code is flipping between __raw_xxx() and
pci_{read,write}_reg(). As the latter are just wrappers for the former,
flip over to using them consistently.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/drivers/pci/pcie-sh7786.h')
-rw-r--r-- | arch/sh/drivers/pci/pcie-sh7786.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sh/drivers/pci/pcie-sh7786.h b/arch/sh/drivers/pci/pcie-sh7786.h index 1ee054e47eae..a2a0ca6e7cca 100644 --- a/arch/sh/drivers/pci/pcie-sh7786.h +++ b/arch/sh/drivers/pci/pcie-sh7786.h @@ -568,6 +568,13 @@ #define PCI_REG(x) ((x) + 0x40000) +#define U64_TO_U32_LOW(val) ((u32)((val) & 0x00000000ffffffffULL)) +#define U64_TO_U32_HIGH(val) ((u32)((val) >> 32)) +#define RES_TO_U32_LOW(val) \ + ((sizeof(resource_size_t) > sizeof(u32)) ? U64_TO_U32_LOW(val) : (val)) +#define RES_TO_U32_HIGH(val) \ + ((sizeof(resource_size_t) > sizeof(u32)) ? U64_TO_U32_HIGH(val) : (0)) + static inline void pci_write_reg(struct pci_channel *chan, unsigned long val, unsigned long reg) { |