This patch clarifies comments and changes a little whitespace in device/device.c

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Myles Watson <mylesgw@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@966 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Myles Watson 2008-10-31 17:57:42 +00:00
parent cfa4c50225
commit 7741b2273c

View file

@ -476,7 +476,7 @@ void compute_allocate_resource(struct bus *bus, struct resource *bridge,
align = min_align;
}
/* Propogate the resource alignment to the bridge register */
/* Propagate the resource alignment to the bridge register */
if (align > bridge->align) {
bridge->align = align;
}
@ -653,13 +653,13 @@ void phase4_assign_resources(struct bus *bus)
}
if (!curdev->ops->phase4_set_resources) {
printk(BIOS_WARNING,
"%s(%s) ops has no missing phase4_set_resources\n",
"%s(%s) ops has no phase4_set_resources\n",
curdev->dtsname, dev_path(curdev));
continue;
}
curdev->ops->phase4_set_resources(curdev);
}
printk(BIOS_SPEW, "%s(%s) assign_resources, bus %d link: %d\n",
printk(BIOS_SPEW, "%s(%s) assign_resources done, bus %d link: %d\n",
bus->dev->dtsname, dev_path(bus->dev), bus->secondary,
bus->link);
}
@ -913,13 +913,16 @@ void dev_phase4(void)
root->ops->phase4_read_resources(root);
printk(BIOS_INFO, "Phase 4: Done reading resources.\n");
/* we have read the resources. We now compute the global allocation of resources.
* We have to create a root resource for the base of the tree. The root resource should contain the entire
* address space for IO and MEM resources. The allocation of device resources will be done from this
* resource address space.
/* We have read the resources. We now compute the global allocation of
* resources. We have to create a root resource for the base of the
* tree. The root resource should contain the entire address space for
* IO and MEM resources. The allocation of device resources will be done
* from this resource address space.
*/
/* Allocate a resource from the root device resource pool and initialize the system wide I/O space constraints. */
/* Allocate a resource from the root device resource pool and initialize
* the system-wide I/O space constraints.
*/
io = new_resource(root, 0);
io->base = 0x400;
io->size = 0;
@ -928,8 +931,8 @@ void dev_phase4(void)
io->limit = 0xffffUL;
io->flags = IORESOURCE_IO;
/* Allocate a resource from the root device resource pool and initialize the system wide
* memory resources constraints.
/* Allocate a resource from the root device resource pool and initialize
* the system-wide memory resources constraints.
*/
mem = new_resource(root, 1);
mem->base = 0;
@ -945,10 +948,9 @@ void dev_phase4(void)
compute_allocate_resource(&root->link[0], mem,
IORESOURCE_MEM, IORESOURCE_MEM);
/* Now we need to adjust the resources. The issue is that mem grows downward.
io = &root->resource[0];
mem = &root->resource[1];
/* Now we need to adjust the resources. The issue is that mem grows
* downward.
*/
/* Make certain the I/O devices are allocated somewhere safe. */
io->base = DEVICE_IO_START;
io->flags |= IORESOURCE_ASSIGNED;