summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2009-07-02 19:02:33 +0000
committerMyles Watson <mylesgw@gmail.com>2009-07-02 19:02:33 +0000
commitc7233e089923870cb4dc483034f7e9c9334c9128 (patch)
tree9731134e5ac73f8a9762b7dae5bc64111d93a9af /src/devices
parent29cc9eda2021a87396ef31a6fc81daff6fd1be7a (diff)
Update the k8 code for the v3 resource allocator.
The major change is that the K8 registers don't get touched until the end of resource allocation. Fam10 code could be updated the same way. Move VGA code before resource allocation but after device enumeration. Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4395 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/device.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/devices/device.c b/src/devices/device.c
index 123d22a971..64b3c106a0 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -663,9 +663,9 @@ static void avoid_fixed_resources(struct device *dev)
#if CONFIG_CONSOLE_VGA == 1
device_t vga_pri = 0;
-static void allocate_vga_resource(void)
+static void set_vga_bridge_bits(void)
{
-#warning "FIXME modify allocate_vga_resource so it is less pci centric!"
+#warning "FIXME modify set_vga_bridge so it is less pci centric!"
#warning "This function knows too much about PCI stuff, it should be just a iterator/visitor."
/* FIXME: Handle the VGA palette snooping. */
@@ -716,7 +716,7 @@ static void allocate_vga_resource(void)
if (vga) {
/* VGA is first add on card or the only onboard VGA. */
- printk_debug("Allocating VGA resource %s\n", dev_path(vga));
+ printk_debug("Setting up VGA for %s\n", dev_path(vga));
/* All legacy VGA cards have MEM & I/O space registers. */
vga->command |= (PCI_COMMAND_MEMORY | PCI_COMMAND_IO);
vga_pri = vga;
@@ -921,6 +921,10 @@ void dev_configure(void)
struct device *child;
int i;
+#if CONFIG_CONSOLE_VGA == 1
+ set_vga_bridge_bits();
+#endif
+
printk_info("Allocating resources...\n");
root = &dev_root;
@@ -984,12 +988,6 @@ void dev_configure(void)
}
}
-#if CONFIG_CONSOLE_VGA == 1
- /* Allocate the VGA I/O resource. */
- allocate_vga_resource();
- print_resource_tree(root, BIOS_DEBUG, "After VGA.");
-#endif
-
/* Store the computed resource allocations into device registers ... */
printk_info("Setting resources...\n");
for (child = root->link[0].children; child; child = child->sibling) {