]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/sh/drivers/pci/pcie-sh7786.h
sh: pci: Use I/O accessors consistently in SH7786 PCIe init code.
[net-next-2.6.git] / arch / sh / drivers / pci / pcie-sh7786.h
index 1ee054e47eae5ffcf289bd03fa5b06ee74c73626..a2a0ca6e7cca1616dacb6d997a4cdf0457dca14c 100644 (file)
 
 #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)
 {