aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexey Korolev <alexey.korolev@endace.com>2012-04-18 17:26:43 +1200
committerKevin O'Connor <kevin@koconnor.net>2012-04-26 21:52:30 -0400
commitf3c2b06e69e79078b964cb6bbc497260c809aee1 (patch)
treec9eefd1e14e038bba9d2229286561b97ea5ceea5 /src
parent3a29716fd43a9be1e88182e288dd4931bb662897 (diff)
downloadseabios-hppa-f3c2b06e69e79078b964cb6bbc497260c809aee1.zip
seabios-hppa-f3c2b06e69e79078b964cb6bbc497260c809aee1.tar.gz
seabios-hppa-f3c2b06e69e79078b964cb6bbc497260c809aee1.tar.bz2
pciinit: Remove size element from pci_bus->r structure
The 'size' element of pci_bus->r structure is no longer need as the information about bridge region size is already stored in pci_region_entry structure. Signed-off-by: Alexey Korolev <alexey.korolev@endace.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r--src/pciinit.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/pciinit.c b/src/pciinit.c
index 74ade52..4617793 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -45,8 +45,6 @@ struct pci_bus {
/* pci region stats */
u32 count[32 - PCI_MEM_INDEX_SHIFT];
u32 sum, max;
- /* seconday bus region sizes */
- u32 size;
/* pci region assignments */
u32 bases[32 - PCI_MEM_INDEX_SHIFT];
u32 base;
@@ -439,21 +437,19 @@ static int pci_bios_check_devices(struct pci_bus *busses)
for (type = 0; type < PCI_REGION_TYPE_COUNT; type++) {
u32 limit = (type == PCI_REGION_TYPE_IO) ?
PCI_BRIDGE_IO_MIN : PCI_BRIDGE_MEM_MIN;
- s->r[type].size = s->r[type].sum;
- if (s->r[type].size < limit)
- s->r[type].size = limit;
- s->r[type].size = pci_size_roundup(s->r[type].size);
+ u32 size = s->r[type].sum;
+ if (size < limit)
+ size = limit;
+ size = pci_size_roundup(size);
// entry->bar is -1 if the entry represents a bridge region
struct pci_region_entry *entry = pci_region_create_entry(
- parent, s->bus_dev, -1, s->r[type].size, type, 0);
+ parent, s->bus_dev, -1, size, type, 0);
if (!entry)
return -1;
+ dprintf(1, "PCI: secondary bus %d size %x type %s\n",
+ entry->dev->secondary_bus, size,
+ region_type_name[entry->type]);
}
- dprintf(1, "PCI: secondary bus %d sizes: io %x, mem %x, prefmem %x\n",
- secondary_bus,
- s->r[PCI_REGION_TYPE_IO].size,
- s->r[PCI_REGION_TYPE_MEM].size,
- s->r[PCI_REGION_TYPE_PREFMEM].size);
}
return 0;
}