Commit 36f32675f40292002ee1fed252c180a43022d2d4
Committed by
Wolfgang Denk
1 parent
91a616741f
Exists in
master
and in
54 other branches
Update pci code to use phys_addr_t
Physical addrs need to be represented by phys_addr_t, not unsigned long. Otherwise, systems that use CONFIG_PHYS_64BIT are going to fail mightily. Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Showing 2 changed files with 9 additions and 9 deletions Side-by-side Diff
drivers/pci/pci.c
... | ... | @@ -221,7 +221,7 @@ |
221 | 221 | */ |
222 | 222 | |
223 | 223 | unsigned long pci_hose_phys_to_bus (struct pci_controller *hose, |
224 | - unsigned long phys_addr, | |
224 | + phys_addr_t phys_addr, | |
225 | 225 | unsigned long flags) |
226 | 226 | { |
227 | 227 | struct pci_region *res; |
... | ... | @@ -253,9 +253,9 @@ |
253 | 253 | return 0; |
254 | 254 | } |
255 | 255 | |
256 | -unsigned long pci_hose_bus_to_phys(struct pci_controller* hose, | |
257 | - unsigned long bus_addr, | |
258 | - unsigned long flags) | |
256 | +phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose, | |
257 | + unsigned long bus_addr, | |
258 | + unsigned long flags) | |
259 | 259 | { |
260 | 260 | struct pci_region *res; |
261 | 261 | int i; |
include/pci.h
... | ... | @@ -314,7 +314,7 @@ |
314 | 314 | |
315 | 315 | struct pci_region { |
316 | 316 | unsigned long bus_start; /* Start on the bus */ |
317 | - unsigned long phys_start; /* Start in physical address space */ | |
317 | + phys_addr_t phys_start; /* Start in physical address space */ | |
318 | 318 | unsigned long size; /* Size */ |
319 | 319 | unsigned long flags; /* Resource flags */ |
320 | 320 | |
... | ... | @@ -331,7 +331,7 @@ |
331 | 331 | |
332 | 332 | extern __inline__ void pci_set_region(struct pci_region *reg, |
333 | 333 | unsigned long bus_start, |
334 | - unsigned long phys_start, | |
334 | + phys_addr_t phys_start, | |
335 | 335 | unsigned long size, |
336 | 336 | unsigned long flags) { |
337 | 337 | reg->bus_start = bus_start; |
338 | 338 | |
... | ... | @@ -432,10 +432,10 @@ |
432 | 432 | |
433 | 433 | extern void pci_setup_indirect(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data); |
434 | 434 | |
435 | -extern unsigned long pci_hose_bus_to_phys(struct pci_controller* hose, | |
436 | - unsigned long addr, unsigned long flags); | |
435 | +extern phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose, | |
436 | + unsigned long addr, unsigned long flags); | |
437 | 437 | extern unsigned long pci_hose_phys_to_bus(struct pci_controller* hose, |
438 | - unsigned long addr, unsigned long flags); | |
438 | + phys_addr_t addr, unsigned long flags); | |
439 | 439 | |
440 | 440 | #define pci_phys_to_bus(dev, addr, flags) \ |
441 | 441 | pci_hose_phys_to_bus(pci_bus_to_hose(PCI_BUS(dev)), (addr), (flags)) |