/*
- * This file is part of the LinuxBIOS project.
+ * This file is part of the coreboot project.
*
* Copyright (C) 2003-2004 Linux Networx
* (Written by Eric Biederman <ebiederman@lnxi.com> for Linux Networx)
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
-#include <part/hard_reset.h>
+#include <reset.h>
/**
* Read the resources for the root device,
*/
void root_dev_read_resources(device_t root)
{
- struct resource *resource;
-
- /* Initialize the system wide io space constraints */
- resource = new_resource(root, 0);
- resource->base = 0x400;
- resource->size = 0;
- resource->align = 0;
- resource->gran = 0;
- resource->limit = 0xffffUL;
- resource->flags = IORESOURCE_IO;
- compute_allocate_resource(&root->link[0], resource,
- IORESOURCE_IO, IORESOURCE_IO);
-
- /* Initialize the system wide memory resources constraints */
- resource = new_resource(root, 1);
- resource->base = 0;
- resource->size = 0;
- resource->align = 0;
- resource->gran = 0;
- resource->limit = 0xffffffffUL;
- resource->flags = IORESOURCE_MEM;
- compute_allocate_resource(&root->link[0], resource,
- IORESOURCE_MEM, IORESOURCE_MEM);
+ printk(BIOS_ERR, "%s should never be called.\n", __func__);
}
/**
*/
void root_dev_set_resources(device_t root)
{
- struct bus *bus;
-
- bus = &root->link[0];
- compute_allocate_resource(bus,
- &root->resource[0], IORESOURCE_IO, IORESOURCE_IO);
- compute_allocate_resource(bus,
- &root->resource[1], IORESOURCE_MEM, IORESOURCE_MEM);
- assign_resources(bus);
+ printk(BIOS_ERR, "%s should never be called.\n", __func__);
}
/**
device_t child;
unsigned link;
- printk_spew("%s for %s\n", __func__, dev_path(bus));
+ printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
for(link = 0; link < bus->links; link++) {
/* for smbus bus enumerate */
child->ops->enable(child);
}
if (child->path.type == DEVICE_PATH_I2C) {
- printk_debug("smbus: %s[%d]->",
+ printk(BIOS_DEBUG, "smbus: %s[%d]->",
dev_path(child->bus->dev), child->bus->link );
}
- printk_debug("%s %s\n",
+ printk(BIOS_DEBUG, "%s %s\n",
dev_path(child),
child->enabled?"enabled": "disabled");
}
for(child = bus->link[link].children; child; child = child->sibling) {
if (!child->ops || !child->ops->scan_bus)
continue;
- printk_spew("%s scanning...\n", dev_path(child));
+ printk(BIOS_SPEW, "%s scanning...\n", dev_path(child));
max = scan_bus(child, max);
}
}
- printk_spew("%s for %s done\n", __func__, dev_path(bus));
+ printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus));
return max;
}
void root_dev_reset(struct bus *bus)
{
- printk_info("Reseting board...\n");
+ printk(BIOS_INFO, "Reseting board...\n");
hard_reset();
}
.scan_bus = root_dev_scan_bus,
.reset_bus = root_dev_reset,
};
-
-/**
- * @brief The root of device tree.
- *
- * This is the root of the device tree. The device tree is defined in the
- * static.c file and is generated by config tool during compile time.
- */
-extern struct device dev_root;