diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2005-12-14 23:00:57 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 23:05:56 -0500 |
commit | f2c4583a381c584c8c025048071a120cc9562ded (patch) | |
tree | 53d6a1d30a3be72f021738c97853cff55a800070 /include | |
parent | a04c8780fd234aeeba5e87f7e37beffd05ef21ae (diff) |
[PATCH] powerpc: pci_address_to_pio fix
This fixes pci_address_to_pio() to return an unsigned long (to be safe)
and fixes a bug in the implementation that caused it to return a bogus
IO port number
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/pci-bridge.h | 6 | ||||
-rw-r--r-- | include/asm-ppc/pci-bridge.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index 3d94e55f25d6..443c75a16571 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -158,11 +158,11 @@ pcibios_alloc_controller(struct device_node *dev); | |||
158 | extern void pcibios_free_controller(struct pci_controller *phb); | 158 | extern void pcibios_free_controller(struct pci_controller *phb); |
159 | 159 | ||
160 | #ifdef CONFIG_PCI | 160 | #ifdef CONFIG_PCI |
161 | extern unsigned int pci_address_to_pio(phys_addr_t address); | 161 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
162 | #else | 162 | #else |
163 | static inline unsigned int pci_address_to_pio(phys_addr_t address) | 163 | static inline unsigned long pci_address_to_pio(phys_addr_t address) |
164 | { | 164 | { |
165 | return (unsigned int)-1; | 165 | return (unsigned long)-1; |
166 | } | 166 | } |
167 | #endif | 167 | #endif |
168 | 168 | ||
diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h index 95672ddfe528..9d5230689b31 100644 --- a/include/asm-ppc/pci-bridge.h +++ b/include/asm-ppc/pci-bridge.h | |||
@@ -138,11 +138,11 @@ static inline unsigned char bridge_swizzle(unsigned char pin, | |||
138 | extern int pciauto_bus_scan(struct pci_controller *, int); | 138 | extern int pciauto_bus_scan(struct pci_controller *, int); |
139 | 139 | ||
140 | #ifdef CONFIG_PCI | 140 | #ifdef CONFIG_PCI |
141 | extern unsigned int pci_address_to_pio(phys_addr_t address); | 141 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
142 | #else | 142 | #else |
143 | static inline unsigned int pci_address_to_pio(phys_addr_t address) | 143 | static inline unsigned long pci_address_to_pio(phys_addr_t address) |
144 | { | 144 | { |
145 | return (unsigned int)-1; | 145 | return (unsigned long)-1; |
146 | } | 146 | } |
147 | #endif | 147 | #endif |
148 | 148 | ||