[coreboot] r669 - coreboot-v3/device
svn at coreboot.org
svn at coreboot.org
Tue Apr 29 05:52:58 CEST 2008
Author: rminnich
Date: 2008-04-29 05:52:57 +0200 (Tue, 29 Apr 2008)
New Revision: 669
Modified:
coreboot-v3/device/device.c
Log:
properly align bridge resources.
Signed-off-by: Aaron Lwe <aaron.lwe at gmail.com>
Acked-by: Joseph Smith <joe at settoplinux.org>
Tested on v3 and
Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>
This patch also (accidently) includes
a simple fix for the null pointer reference problem. I had forgotten that
the fix was in there, but I will include it here and hope no one is too upset about
its inclusion.
Modified: coreboot-v3/device/device.c
===================================================================
--- coreboot-v3/device/device.c 2008-04-27 02:50:07 UTC (rev 668)
+++ coreboot-v3/device/device.c 2008-04-29 03:52:57 UTC (rev 669)
@@ -292,9 +292,10 @@
int i;
printk(BIOS_SPEW,
"%s: %s(%s) dtsname %s have_resources %d enabled %d\n",
- __func__, bus->dev->dtsname, dev_path(bus->dev),
- curdev->dtsname,
- curdev->have_resources, curdev->enabled);
+ __func__, bus->dev? bus->dev->dtsname : "NOBUSDEV",
+ bus->dev ? dev_path(bus->dev) : "NOBUSDEV",
+ curdev->dtsname,
+ curdev->have_resources, curdev->enabled);
if (curdev->have_resources) {
continue;
}
@@ -469,10 +470,6 @@
* they have no size. PCI bridge resources are a good example
* of this.
*/
- /* Propagate the resource alignment to the bridge register. */
- if (resource->align > bridge->align) {
- bridge->align = resource->align;
- }
/* Make certain we are dealing with a good minimum size. */
size = resource->size;
@@ -481,6 +478,11 @@
align = min_align;
}
+ /* Propogate the resource alignment to the bridge register */
+ if (align > bridge->align) {
+ bridge->align = align;
+ }
+
if (resource->flags & IORESOURCE_FIXED) {
continue;
}
More information about the coreboot
mailing list