diff options
Diffstat (limited to 'arch/frv/mb93090-mb00/pci-frv.c')
-rw-r--r-- | arch/frv/mb93090-mb00/pci-frv.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/frv/mb93090-mb00/pci-frv.c b/arch/frv/mb93090-mb00/pci-frv.c index 566bdeb499d1..6b4fb28e9f99 100644 --- a/arch/frv/mb93090-mb00/pci-frv.c +++ b/arch/frv/mb93090-mb00/pci-frv.c | |||
@@ -32,18 +32,16 @@ | |||
32 | * but we want to try to avoid allocating at 0x2900-0x2bff | 32 | * but we want to try to avoid allocating at 0x2900-0x2bff |
33 | * which might have be mirrored at 0x0100-0x03ff.. | 33 | * which might have be mirrored at 0x0100-0x03ff.. |
34 | */ | 34 | */ |
35 | void | 35 | resource_size_t |
36 | pcibios_align_resource(void *data, struct resource *res, | 36 | pcibios_align_resource(void *data, const struct resource *res, |
37 | resource_size_t size, resource_size_t align) | 37 | resource_size_t size, resource_size_t align) |
38 | { | 38 | { |
39 | if (res->flags & IORESOURCE_IO) { | 39 | resource_size_t start = res->start; |
40 | resource_size_t start = res->start; | ||
41 | 40 | ||
42 | if (start & 0x300) { | 41 | if ((res->flags & IORESOURCE_IO) && (start & 0x300)) |
43 | start = (start + 0x3ff) & ~0x3ff; | 42 | start = (start + 0x3ff) & ~0x3ff; |
44 | res->start = start; | 43 | |
45 | } | 44 | return start; |
46 | } | ||
47 | } | 45 | } |
48 | 46 | ||
49 | 47 | ||
@@ -96,8 +94,7 @@ static void __init pcibios_allocate_bus_resources(struct list_head *bus_list) | |||
96 | r = &dev->resource[idx]; | 94 | r = &dev->resource[idx]; |
97 | if (!r->start) | 95 | if (!r->start) |
98 | continue; | 96 | continue; |
99 | if (pci_claim_resource(dev, idx) < 0) | 97 | pci_claim_resource(dev, idx); |
100 | printk(KERN_ERR "PCI: Cannot allocate resource region %d of bridge %s\n", idx, pci_name(dev)); | ||
101 | } | 98 | } |
102 | } | 99 | } |
103 | pcibios_allocate_bus_resources(&bus->children); | 100 | pcibios_allocate_bus_resources(&bus->children); |
@@ -127,7 +124,6 @@ static void __init pcibios_allocate_resources(int pass) | |||
127 | DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n", | 124 | DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n", |
128 | r->start, r->end, r->flags, disabled, pass); | 125 | r->start, r->end, r->flags, disabled, pass); |
129 | if (pci_claim_resource(dev, idx) < 0) { | 126 | if (pci_claim_resource(dev, idx) < 0) { |
130 | printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev)); | ||
131 | /* We'll assign a new address later */ | 127 | /* We'll assign a new address later */ |
132 | r->end -= r->start; | 128 | r->end -= r->start; |
133 | r->start = 0; | 129 | r->start = 0; |