diff options
Diffstat (limited to 'include/asm-ppc')
-rw-r--r-- | include/asm-ppc/pci-bridge.h | 8 | ||||
-rw-r--r-- | include/asm-ppc/pci.h | 23 |
2 files changed, 27 insertions, 4 deletions
diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h index 6c955d0c1ef0..4d35b844bc58 100644 --- a/include/asm-ppc/pci-bridge.h +++ b/include/asm-ppc/pci-bridge.h | |||
@@ -20,8 +20,8 @@ extern unsigned long pci_bus_mem_base_phys(unsigned int bus); | |||
20 | extern struct pci_controller* pcibios_alloc_controller(void); | 20 | extern struct pci_controller* pcibios_alloc_controller(void); |
21 | 21 | ||
22 | /* Helper function for setting up resources */ | 22 | /* Helper function for setting up resources */ |
23 | extern void pci_init_resource(struct resource *res, unsigned long start, | 23 | extern void pci_init_resource(struct resource *res, resource_size_t start, |
24 | unsigned long end, int flags, char *name); | 24 | resource_size_t end, int flags, char *name); |
25 | 25 | ||
26 | /* Get the PCI host controller for a bus */ | 26 | /* Get the PCI host controller for a bus */ |
27 | extern struct pci_controller* pci_bus_to_hose(int bus); | 27 | extern struct pci_controller* pci_bus_to_hose(int bus); |
@@ -50,12 +50,12 @@ struct pci_controller { | |||
50 | int bus_offset; | 50 | int bus_offset; |
51 | 51 | ||
52 | void __iomem *io_base_virt; | 52 | void __iomem *io_base_virt; |
53 | unsigned long io_base_phys; | 53 | resource_size_t io_base_phys; |
54 | 54 | ||
55 | /* Some machines (PReP) have a non 1:1 mapping of | 55 | /* Some machines (PReP) have a non 1:1 mapping of |
56 | * the PCI memory space in the CPU bus space | 56 | * the PCI memory space in the CPU bus space |
57 | */ | 57 | */ |
58 | unsigned long pci_mem_offset; | 58 | resource_size_t pci_mem_offset; |
59 | 59 | ||
60 | struct pci_ops *ops; | 60 | struct pci_ops *ops; |
61 | volatile unsigned int __iomem *cfg_addr; | 61 | volatile unsigned int __iomem *cfg_addr; |
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h index 11ffaaa5da16..9d162028dab9 100644 --- a/include/asm-ppc/pci.h +++ b/include/asm-ppc/pci.h | |||
@@ -61,6 +61,27 @@ extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr); | |||
61 | */ | 61 | */ |
62 | #define PCI_DMA_BUS_IS_PHYS (1) | 62 | #define PCI_DMA_BUS_IS_PHYS (1) |
63 | 63 | ||
64 | #ifdef CONFIG_NOT_COHERENT_CACHE | ||
65 | /* | ||
66 | * pci_unmap_{page,single} are NOPs but pci_dma_sync_single_for_cpu() | ||
67 | * and so on are not, so... | ||
68 | */ | ||
69 | |||
70 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \ | ||
71 | dma_addr_t ADDR_NAME; | ||
72 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \ | ||
73 | __u32 LEN_NAME; | ||
74 | #define pci_unmap_addr(PTR, ADDR_NAME) \ | ||
75 | ((PTR)->ADDR_NAME) | ||
76 | #define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \ | ||
77 | (((PTR)->ADDR_NAME) = (VAL)) | ||
78 | #define pci_unmap_len(PTR, LEN_NAME) \ | ||
79 | ((PTR)->LEN_NAME) | ||
80 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) \ | ||
81 | (((PTR)->LEN_NAME) = (VAL)) | ||
82 | |||
83 | #else /* coherent */ | ||
84 | |||
64 | /* pci_unmap_{page,single} is a nop so... */ | 85 | /* pci_unmap_{page,single} is a nop so... */ |
65 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | 86 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) |
66 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) | 87 | #define DECLARE_PCI_UNMAP_LEN(LEN_NAME) |
@@ -69,6 +90,8 @@ extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr); | |||
69 | #define pci_unmap_len(PTR, LEN_NAME) (0) | 90 | #define pci_unmap_len(PTR, LEN_NAME) (0) |
70 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 91 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
71 | 92 | ||
93 | #endif /* CONFIG_NOT_COHERENT_CACHE */ | ||
94 | |||
72 | #ifdef CONFIG_PCI | 95 | #ifdef CONFIG_PCI |
73 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | 96 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, |
74 | enum pci_dma_burst_strategy *strat, | 97 | enum pci_dma_burst_strategy *strat, |