aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh64/kernel/pci_sh5.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh64/kernel/pci_sh5.c')
-rw-r--r--arch/sh64/kernel/pci_sh5.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c
index 49862e165c06..649b33667748 100644
--- a/arch/sh64/kernel/pci_sh5.c
+++ b/arch/sh64/kernel/pci_sh5.c
@@ -375,8 +375,6 @@ irqreturn_t pcish5_serr_irq(int irq, void *dev_id, struct pt_regs *regs)
375 return IRQ_NONE; 375 return IRQ_NONE;
376} 376}
377 377
378#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
379
380static void __init 378static void __init
381pcibios_size_bridge(struct pci_bus *bus, struct resource *ior, 379pcibios_size_bridge(struct pci_bus *bus, struct resource *ior,
382 struct resource *memr) 380 struct resource *memr)
@@ -433,8 +431,8 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior,
433 mem_res.end -= mem_res.start; 431 mem_res.end -= mem_res.start;
434 432
435 /* Align the sizes up by bridge rules */ 433 /* Align the sizes up by bridge rules */
436 io_res.end = ROUND_UP(io_res.end, 4*1024) - 1; 434 io_res.end = ALIGN(io_res.end, 4*1024) - 1;
437 mem_res.end = ROUND_UP(mem_res.end, 1*1024*1024) - 1; 435 mem_res.end = ALIGN(mem_res.end, 1*1024*1024) - 1;
438 436
439 /* Adjust the bridge's allocation requirements */ 437 /* Adjust the bridge's allocation requirements */
440 bridge->resource[0].end = bridge->resource[0].start + io_res.end; 438 bridge->resource[0].end = bridge->resource[0].start + io_res.end;
@@ -447,18 +445,16 @@ pcibios_size_bridge(struct pci_bus *bus, struct resource *ior,
447 445
448 /* adjust parent's resource requirements */ 446 /* adjust parent's resource requirements */
449 if (ior) { 447 if (ior) {
450 ior->end = ROUND_UP(ior->end, 4*1024); 448 ior->end = ALIGN(ior->end, 4*1024);
451 ior->end += io_res.end; 449 ior->end += io_res.end;
452 } 450 }
453 451
454 if (memr) { 452 if (memr) {
455 memr->end = ROUND_UP(memr->end, 1*1024*1024); 453 memr->end = ALIGN(memr->end, 1*1024*1024);
456 memr->end += mem_res.end; 454 memr->end += mem_res.end;
457 } 455 }
458} 456}
459 457
460#undef ROUND_UP
461
462static void __init pcibios_size_bridges(void) 458static void __init pcibios_size_bridges(void)
463{ 459{
464 struct resource io_res, mem_res; 460 struct resource io_res, mem_res;