aboutsummaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-03-22 11:42:32 +0000
committerStefan Reinauer <stepan@openbios.org>2010-03-22 11:42:32 +0000
commitc02b4fc9db3c3c1e263027382697b566127f66bb (patch)
tree11bd18488e360e5c1beeb9ccb852ef4489c3689a /src/devices
parent27852aba6787617ca5656995cbc7e8ef0a3ea22c (diff)
printk_foo -> printk(BIOS_FOO, ...)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5266 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/cardbus_device.c6
-rw-r--r--src/devices/device.c86
-rw-r--r--src/devices/device_util.c8
-rw-r--r--src/devices/hypertransport.c40
-rw-r--r--src/devices/pci_device.c62
-rw-r--r--src/devices/pci_ops.c4
-rw-r--r--src/devices/pci_rom.c20
-rw-r--r--src/devices/pciexp_device.c2
-rw-r--r--src/devices/pcix_device.c4
-rw-r--r--src/devices/pnp_device.c4
-rw-r--r--src/devices/root_device.c16
-rw-r--r--src/devices/smbus_ops.c8
12 files changed, 129 insertions, 131 deletions
diff --git a/src/devices/cardbus_device.c b/src/devices/cardbus_device.c
index d6dbbb578b..becdafd42f 100644
--- a/src/devices/cardbus_device.c
+++ b/src/devices/cardbus_device.c
@@ -166,7 +166,7 @@ void cardbus_enable_resources(device_t dev)
PCI_BRIDGE_CTL_MASTER_ABORT |
PCI_BRIDGE_CTL_BUS_RESET));
ctrl |= (PCI_CB_BRIDGE_CTL_PARITY + PCI_CB_BRIDGE_CTL_SERR); /* error check */
- printk_debug("%s bridge ctrl <- %04x\n", dev_path(dev), ctrl);
+ printk(BIOS_DEBUG, "%s bridge ctrl <- %04x\n", dev_path(dev), ctrl);
pci_write_config16(dev, PCI_BRIDGE_CONTROL, ctrl);
pci_dev_enable_resources(dev);
@@ -188,7 +188,7 @@ unsigned int cardbus_scan_bridge(device_t dev, unsigned int max)
uint32_t buses;
uint16_t cr;
- printk_spew("%s for %s\n", __func__, dev_path(dev));
+ printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(dev));
bus = &dev->link[0];
bus->dev = dev;
@@ -236,7 +236,7 @@ unsigned int cardbus_scan_bridge(device_t dev, unsigned int max)
pci_write_config32(dev, PCI_CB_PRIMARY_BUS, buses);
pci_write_config16(dev, PCI_COMMAND, cr);
- printk_spew("%s returns max %d\n", __func__, max);
+ printk(BIOS_SPEW, "%s returns max %d\n", __func__, max);
return max;
}
diff --git a/src/devices/device.c b/src/devices/device.c
index c337294c1f..c9788211cd 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -129,7 +129,7 @@ static void read_resources(struct bus *bus)
{
struct device *curdev;
- printk_spew("%s %s bus %x link: %d\n", dev_path(bus->dev), __func__,
+ printk(BIOS_SPEW, "%s %s bus %x link: %d\n", dev_path(bus->dev), __func__,
bus->secondary, bus->link);
/* Walk through all devices and find which resources they need. */
@@ -139,7 +139,7 @@ static void read_resources(struct bus *bus)
continue;
}
if (!curdev->ops || !curdev->ops->read_resources) {
- printk_err("%s missing read_resources\n",
+ printk(BIOS_ERR, "%s missing read_resources\n",
dev_path(curdev));
continue;
}
@@ -149,7 +149,7 @@ static void read_resources(struct bus *bus)
for (i = 0; i < curdev->links; i++)
read_resources(&curdev->link[i]);
}
- printk_spew("%s read_resources bus %d link: %d done\n",
+ printk(BIOS_SPEW, "%s read_resources bus %d link: %d done\n",
dev_path(bus->dev), bus->secondary, bus->link);
}
@@ -245,7 +245,7 @@ static void compute_resources(struct bus *bus, struct resource *bridge,
resource_t base;
base = round(bridge->base, bridge->align);
- printk_spew( "%s %s_%s: base: %llx size: %llx align: %d gran: %d limit: %llx\n",
+ printk(BIOS_SPEW, "%s %s_%s: base: %llx size: %llx align: %d gran: %d limit: %llx\n",
dev_path(bus->dev), __func__,
(type & IORESOURCE_IO) ? "io" : (type & IORESOURCE_PREFETCH) ?
"prefmem" : "mem",
@@ -309,8 +309,8 @@ static void compute_resources(struct bus *bus, struct resource *bridge,
/* Warn if it looks like APICs aren't declared. */
if ((resource->limit == 0xffffffff) &&
(resource->flags & IORESOURCE_ASSIGNED)) {
- printk_err("Resource limit looks wrong! (no APIC?)\n");
- printk_err("%s %02lx limit %08Lx\n", dev_path(dev),
+ printk(BIOS_ERR, "Resource limit looks wrong! (no APIC?)\n");
+ printk(BIOS_ERR, "%s %02lx limit %08Lx\n", dev_path(dev),
resource->index, resource->limit);
}
@@ -336,7 +336,7 @@ static void compute_resources(struct bus *bus, struct resource *bridge,
resource->base = base;
base += resource->size;
- printk_spew("%s %02lx * [0x%llx - 0x%llx] %s\n",
+ printk(BIOS_SPEW, "%s %02lx * [0x%llx - 0x%llx] %s\n",
dev_path(dev), resource->index,
resource->base,
resource->base + resource->size - 1,
@@ -353,7 +353,7 @@ static void compute_resources(struct bus *bus, struct resource *bridge,
bridge->size = round(base, bridge->gran) -
round(bridge->base, bridge->align);
- printk_spew("%s %s_%s: base: %llx size: %llx align: %d gran: %d limit: %llx done\n",
+ printk(BIOS_SPEW, "%s %s_%s: base: %llx size: %llx align: %d gran: %d limit: %llx done\n",
dev_path(bus->dev), __func__,
(bridge->flags & IORESOURCE_IO) ? "io" :
(bridge->flags & IORESOURCE_PREFETCH) ? "prefmem" : "mem",
@@ -402,7 +402,7 @@ static void allocate_resources(struct bus *bus, struct resource *bridge,
resource_t base;
base = bridge->base;
- printk_spew("%s %s_%s: base:%llx size:%llx align:%d gran:%d limit:%llx\n",
+ printk(BIOS_SPEW, "%s %s_%s: base:%llx size:%llx align:%d gran:%d limit:%llx\n",
dev_path(bus->dev), __func__,
(type & IORESOURCE_IO) ? "io" : (type & IORESOURCE_PREFETCH) ?
"prefmem" : "mem",
@@ -456,14 +456,14 @@ static void allocate_resources(struct bus *bus, struct resource *bridge,
resource->flags &= ~IORESOURCE_STORED;
base += resource->size;
} else {
- printk_err("!! Resource didn't fit !!\n");
- printk_err(" aligned base %llx size %llx limit %llx\n",
+ printk(BIOS_ERR, "!! Resource didn't fit !!\n");
+ printk(BIOS_ERR, " aligned base %llx size %llx limit %llx\n",
round(base, resource->align), resource->size,
resource->limit);
- printk_err(" %llx needs to be <= %llx (limit)\n",
+ printk(BIOS_ERR, " %llx needs to be <= %llx (limit)\n",
(round(base, resource->align) +
resource->size) - 1, resource->limit);
- printk_err(" %s%s %02lx * [0x%llx - 0x%llx] %s\n",
+ printk(BIOS_ERR, " %s%s %02lx * [0x%llx - 0x%llx] %s\n",
(resource->
flags & IORESOURCE_ASSIGNED) ? "Assigned: " :
"", dev_path(dev), resource->index,
@@ -476,7 +476,7 @@ static void allocate_resources(struct bus *bus, struct resource *bridge,
? "prefmem" : "mem");
}
- printk_spew("%s%s %02lx * [0x%llx - 0x%llx] %s\n",
+ printk(BIOS_SPEW, "%s%s %02lx * [0x%llx - 0x%llx] %s\n",
(resource->flags & IORESOURCE_ASSIGNED) ? "Assigned: "
: "",
dev_path(dev), resource->index, resource->base,
@@ -494,7 +494,7 @@ static void allocate_resources(struct bus *bus, struct resource *bridge,
bridge->flags |= IORESOURCE_ASSIGNED;
- printk_spew("%s %s_%s: next_base: %llx size: %llx align: %d gran: %d done\n",
+ printk(BIOS_SPEW, "%s %s_%s: next_base: %llx size: %llx align: %d gran: %d done\n",
dev_path(bus->dev), __func__,
(type & IORESOURCE_IO) ? "io" : (type & IORESOURCE_PREFETCH) ?
"prefmem" : "mem",
@@ -553,7 +553,7 @@ static void constrain_resources(struct device *dev, struct constraints* limits)
struct resource *lim;
int i;
- printk_spew("%s: %s\n", __func__, dev_path(dev));
+ printk(BIOS_SPEW, "%s: %s\n", __func__, dev_path(dev));
/* Constrain limits based on the fixed resources of this device. */
for (i = 0; i < dev->resources; i++) {
@@ -562,7 +562,7 @@ static void constrain_resources(struct device *dev, struct constraints* limits)
continue;
if (!res->size) {
/* It makes no sense to have 0-sized, fixed resources.*/
- printk_err("skipping %s@%lx fixed resource, size=0!\n",
+ printk(BIOS_ERR, "skipping %s@%lx fixed resource, size=0!\n",
dev_path(dev), res->index);
continue;
}
@@ -606,7 +606,7 @@ static void avoid_fixed_resources(struct device *dev)
struct resource *res;
int i;
- printk_spew("%s: %s\n", __func__, dev_path(dev));
+ printk(BIOS_SPEW, "%s: %s\n", __func__, dev_path(dev));
/* Initialize constraints to maximum size. */
limits.pref.base = 0;
@@ -621,7 +621,7 @@ static void avoid_fixed_resources(struct device *dev)
res = &dev->resource[i];
if ((res->flags & IORESOURCE_FIXED))
continue;
- printk_spew("%s:@%s %02lx limit %08Lx\n", __func__,
+ printk(BIOS_SPEW, "%s:@%s %02lx limit %08Lx\n", __func__,
dev_path(dev), res->index, res->limit);
if ((res->flags & MEM_MASK) == PREF_TYPE &&
(res->limit < limits.pref.limit))
@@ -655,9 +655,9 @@ static void avoid_fixed_resources(struct device *dev)
else
continue;
- printk_spew("%s2: %s@%02lx limit %08Lx\n", __func__,
+ printk(BIOS_SPEW, "%s2: %s@%02lx limit %08Lx\n", __func__,
dev_path(dev), res->index, res->limit);
- printk_spew("\tlim->base %08Lx lim->limit %08Lx\n",
+ printk(BIOS_SPEW, "\tlim->base %08Lx lim->limit %08Lx\n",
lim->base, lim->limit);
/* Is the resource outside the limits? */
@@ -726,7 +726,7 @@ static void set_vga_bridge_bits(void)
if (vga) {
/* VGA is first add on card or the only onboard VGA. */
- printk_debug("Setting up VGA for %s\n", dev_path(vga));
+ printk(BIOS_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;
@@ -734,7 +734,7 @@ static void set_vga_bridge_bits(void)
}
/* Now walk up the bridges setting the VGA enable. */
while (bus) {
- printk_debug("Setting PCI_BRIDGE_CTL_VGA for bridge %s\n",
+ printk(BIOS_DEBUG, "Setting PCI_BRIDGE_CTL_VGA for bridge %s\n",
dev_path(bus->dev));
bus->bridge_ctrl |= PCI_BRIDGE_CTL_VGA;
bus = (bus == bus->dev->bus) ? 0 : bus->dev->bus;
@@ -760,7 +760,7 @@ void assign_resources(struct bus *bus)
{
struct device *curdev;
- printk_spew("%s assign_resources, bus %d link: %d\n",
+ printk(BIOS_SPEW, "%s assign_resources, bus %d link: %d\n",
dev_path(bus->dev), bus->secondary, bus->link);
for (curdev = bus->children; curdev; curdev = curdev->sibling) {
@@ -768,13 +768,13 @@ void assign_resources(struct bus *bus)
continue;
}
if (!curdev->ops || !curdev->ops->set_resources) {
- printk_err("%s missing set_resources\n",
+ printk(BIOS_ERR, "%s missing set_resources\n",
dev_path(curdev));
continue;
}
curdev->ops->set_resources(curdev);
}
- printk_spew("%s assign_resources, bus %d link: %d\n",
+ printk(BIOS_SPEW, "%s assign_resources, bus %d link: %d\n",
dev_path(bus->dev), bus->secondary, bus->link);
}
@@ -802,7 +802,7 @@ void enable_resources(struct device *dev)
return;
}
if (!dev->ops || !dev->ops->enable_resources) {
- printk_err("%s missing enable_resources\n", dev_path(dev));
+ printk(BIOS_ERR, "%s missing enable_resources\n", dev_path(dev));
return;
}
dev->ops->enable_resources(dev);
@@ -891,22 +891,22 @@ unsigned int scan_bus(struct device *busdev, unsigned int max)
void dev_enumerate(void)
{
struct device *root;
- printk_info("Enumerating buses...\n");
+ printk(BIOS_INFO, "Enumerating buses...\n");
root = &dev_root;
show_all_devs(BIOS_SPEW, "Before Device Enumeration.");
- printk_spew("Compare with tree...\n");
+ printk(BIOS_SPEW, "Compare with tree...\n");
show_devs_tree(root, BIOS_SPEW, 0, 0);
if (root->chip_ops && root->chip_ops->enable_dev) {
root->chip_ops->enable_dev(root);
}
if (!root->ops || !root->ops->scan_bus) {
- printk_err("dev_root missing scan_bus operation");
+ printk(BIOS_ERR, "dev_root missing scan_bus operation");
return;
}
scan_bus(root, 0);
- printk_info("done\n");
+ printk(BIOS_INFO, "done\n");
}
/**
@@ -933,7 +933,7 @@ void dev_configure(void)
set_vga_bridge_bits();
#endif
- printk_info("Allocating resources...\n");
+ printk(BIOS_INFO, "Allocating resources...\n");
root = &dev_root;
@@ -944,9 +944,9 @@ void dev_configure(void)
/* Read the resources for the entire tree. */
- printk_info("Reading resources...\n");
+ printk(BIOS_INFO, "Reading resources...\n");
read_resources(&root->link[0]);
- printk_info("Done reading resources.\n");
+ printk(BIOS_INFO, "Done reading resources.\n");
print_resource_tree(root, BIOS_SPEW, "After reading.");
@@ -997,7 +997,7 @@ void dev_configure(void)
}
/* Store the computed resource allocations into device registers ... */
- printk_info("Setting resources...\n");
+ printk(BIOS_INFO, "Setting resources...\n");
for (child = root->link[0].children; child; child = child->sibling) {
if (!(child->path.type == DEVICE_PATH_PCI_DOMAIN))
continue;
@@ -1023,10 +1023,10 @@ void dev_configure(void)
}
}
assign_resources(&root->link[0]);
- printk_info("Done setting resources.\n");
+ printk(BIOS_INFO, "Done setting resources.\n");
print_resource_tree(root, BIOS_SPEW, "After assigning values.");
- printk_info("Done allocating resources.\n");
+ printk(BIOS_INFO, "Done allocating resources.\n");
}
/**
@@ -1037,12 +1037,12 @@ void dev_configure(void)
*/
void dev_enable(void)
{
- printk_info("Enabling resources...\n");
+ printk(BIOS_INFO, "Enabling resources...\n");
/* now enable everything. */
enable_resources(&dev_root);
- printk_info("done.\n");
+ printk(BIOS_INFO, "done.\n");
}
/**
@@ -1056,20 +1056,20 @@ void dev_initialize(void)
{
struct device *dev;
- printk_info("Initializing devices...\n");
+ printk(BIOS_INFO, "Initializing devices...\n");
for (dev = all_devices; dev; dev = dev->next) {
if (dev->enabled && !dev->initialized &&
dev->ops && dev->ops->init) {
if (dev->path.type == DEVICE_PATH_I2C) {
- printk_debug("smbus: %s[%d]->",
+ printk(BIOS_DEBUG, "smbus: %s[%d]->",
dev_path(dev->bus->dev),
dev->bus->link);
}
- printk_debug("%s init\n", dev_path(dev));
+ printk(BIOS_DEBUG, "%s init\n", dev_path(dev));
dev->initialized = 1;
dev->ops->init(dev);
}
}
- printk_info("Devices initialized\n");
+ printk(BIOS_INFO, "Devices initialized\n");
show_all_devs(BIOS_SPEW, "After init.");
}
diff --git a/src/devices/device_util.c b/src/devices/device_util.c
index a730556593..e44a02e428 100644
--- a/src/devices/device_util.c
+++ b/src/devices/device_util.c
@@ -203,7 +203,7 @@ const char *dev_path(device_t dev)
sprintf(buffer, "CPU_BUS: %02x", dev->path.cpu_bus.id);
break;
default:
- printk_err("Unknown device path type: %d\n", dev->path.type);
+ printk(BIOS_ERR, "Unknown device path type: %d\n", dev->path.type);
break;
}
}
@@ -253,7 +253,7 @@ int path_eq(struct device_path *path1, struct device_path *path2)
equal = (path1->cpu_bus.id == path2->cpu_bus.id);
break;
default:
- printk_err("Uknown device type: %d\n", path1->type);
+ printk(BIOS_ERR, "Uknown device type: %d\n", path1->type);
break;
}
}
@@ -355,7 +355,7 @@ struct resource *find_resource(device_t dev, unsigned index)
/* See if there is a resource with the appropriate index */
resource = probe_resource(dev, index);
if (!resource) {
- printk_emerg("%s missing resource: %02x\n",
+ printk(BIOS_EMERG, "%s missing resource: %02x\n",
dev_path(dev), index);
die("");
}
@@ -468,7 +468,7 @@ void report_resource_stored(device_t dev, struct resource *resource, const char
sprintf(buf, "bus %02x ", dev->link[0].secondary);
#endif
}
- printk_debug(
+ printk(BIOS_DEBUG,
"%s %02lx <- [0x%010Lx - 0x%010Lx] size 0x%08Lx gran 0x%02x %s%s%s\n",
dev_path(dev),
resource->index,
diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c
index f5ac1a6c27..bb91249908 100644
--- a/src/devices/hypertransport.c
+++ b/src/devices/hypertransport.c
@@ -192,11 +192,11 @@ static int ht_setup_link(struct ht_link *prev, device_t dev, unsigned pos)
unsigned new_freq;
pci_write_config8(cur->dev, cur->pos + cur->freq_off, freq);
reset_needed = 1;
- printk_spew("HyperT FreqP old %x new %x\n",old_freq,freq);
+ printk(BIOS_SPEW, "HyperT FreqP old %x new %x\n",old_freq,freq);
new_freq = pci_read_config8(cur->dev, cur->pos + cur->freq_off);
new_freq &= 0x0f;
if (new_freq != freq) {
- printk_err("%s Hypertransport frequency would not set wanted: %x got: %x\n",
+ printk(BIOS_ERR, "%s Hypertransport frequency would not set wanted: %x got: %x\n",
dev_path(dev), freq, new_freq);
}
}
@@ -206,10 +206,10 @@ static int ht_setup_link(struct ht_link *prev, device_t dev, unsigned pos)
pci_write_config8(cur->dev, cur->pos + cur->config_off + 1,
present_width);
reset_needed = 1;
- printk_spew("HyperT widthP old %x new %x\n",old_width, present_width);
+ printk(BIOS_SPEW, "HyperT widthP old %x new %x\n",old_width, present_width);
new_width = pci_read_config8(cur->dev, cur->pos + cur->config_off + 1);
if (new_width != present_width) {
- printk_err("%s Hypertransport width would not set wanted: %x got: %x\n",
+ printk(BIOS_ERR, "%s Hypertransport width would not set wanted: %x got: %x\n",
dev_path(dev), present_width, new_width);
}
}
@@ -221,11 +221,11 @@ static int ht_setup_link(struct ht_link *prev, device_t dev, unsigned pos)
unsigned new_freq;
pci_write_config8(prev->dev, prev->pos + prev->freq_off, freq);
reset_needed = 1;
- printk_spew("HyperT freqU old %x new %x\n", old_freq, freq);
+ printk(BIOS_SPEW, "HyperT freqU old %x new %x\n", old_freq, freq);
new_freq = pci_read_config8(prev->dev, prev->pos + prev->freq_off);
new_freq &= 0x0f;
if (new_freq != freq) {
- printk_err("%s Hypertransport frequency would not set wanted: %x got: %x\n",
+ printk(BIOS_ERR, "%s Hypertransport frequency would not set wanted: %x got: %x\n",
dev_path(prev->dev), freq, new_freq);
}
}
@@ -234,10 +234,10 @@ static int ht_setup_link(struct ht_link *prev, device_t dev, unsigned pos)
unsigned new_width;
pci_write_config8(prev->dev, prev->pos + prev->config_off + 1, upstream_width);
reset_needed = 1;
- printk_spew("HyperT widthU old %x new %x\n", old_width, upstream_width);
+ printk(BIOS_SPEW, "HyperT widthU old %x new %x\n", old_width, upstream_width);
new_width = pci_read_config8(prev->dev, prev->pos + prev->config_off + 1);
if (new_width != upstream_width) {
- printk_err("%s Hypertransport width would not set wanted: %x got: %x\n",
+ printk(BIOS_ERR, "%s Hypertransport width would not set wanted: %x got: %x\n",
dev_path(prev->dev), upstream_width, new_width);
}
}
@@ -273,7 +273,7 @@ static unsigned ht_lookup_slave_capability(struct device *dev)
if (pos) {
unsigned flags;
flags = pci_read_config16(dev, pos + PCI_CAP_FLAGS);
- printk_spew("flags: 0x%04x\n", flags);
+ printk(BIOS_SPEW, "flags: 0x%04x\n", flags);
if ((flags >> 13) == 0) {
/* Entry is a Slave secondary, success... */
break;
@@ -317,7 +317,7 @@ static void ht_collapse_early_enumeration(struct bus *bus, unsigned offset_uniti
pci_write_config16(prev.dev, prev.pos + prev.ctrl_off, ctrl);
ctrl = pci_read_config16(prev.dev, prev.pos + prev.ctrl_off);
if (ctrl & ((1 << 4) | (1 << 8))) {
- printk_alert("Detected error on Hypertransport Link\n");
+ printk(BIOS_ALERT, "Detected error on Hypertransport Link\n");
return;
}
}
@@ -371,7 +371,7 @@ static void ht_collapse_early_enumeration(struct bus *bus, unsigned offset_uniti
flags = pci_read_config16(&dummy, pos + PCI_CAP_FLAGS);
flags &= ~0x1f;
pci_write_config16(&dummy, pos + PCI_CAP_FLAGS, flags);
- printk_spew("Collapsing %s [%04x/%04x]\n",
+ printk(BIOS_SPEW, "Collapsing %s [%04x/%04x]\n",
dev_path(&dummy), dummy.vendor, dummy.device);
}
}
@@ -441,7 +441,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
pci_write_config16(prev.dev, prev.pos + prev.ctrl_off, ctrl);
ctrl = pci_read_config16(prev.dev, prev.pos + prev.ctrl_off);
if (ctrl & ((1 << 4) | (1 << 8))) {
- printk_alert("Detected error on Hypertransport Link\n");
+ printk(BIOS_ALERT, "Detected error on Hypertransport Link\n");
goto end_of_chain;
}
}
@@ -462,7 +462,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
/* Find the hypertransport link capability */
pos = ht_lookup_slave_capability(dev);
if (pos == 0) {
- printk_err("%s Hypertransport link capability not found",
+ printk(BIOS_ERR, "%s Hypertransport link capability not found",
dev_path(dev));
break;
}
@@ -507,7 +507,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
last_func = func;
}
/* Compute the number of unitids consumed */
- printk_spew("%s count: %04x static_count: %04x\n",
+ printk(BIOS_SPEW, "%s count: %04x static_count: %04x\n",
dev_path(dev), count, static_count);
if (count < static_count) {
count = static_count;
@@ -532,7 +532,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
/* Setup the hypetransport link */
bus->reset_needed |= ht_setup_link(&prev, dev, pos);
- printk_debug("%s [%04x/%04x] %s next_unitid: %04x\n",
+ printk(BIOS_DEBUG, "%s [%04x/%04x] %s next_unitid: %04x\n",
dev_path(dev),
dev->vendor, dev->device,
(dev->enabled? "enabled": "disabled"), next_unitid);
@@ -541,10 +541,10 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
end_of_chain:
#if OPT_HT_LINK == 1
if(bus->reset_needed) {
- printk_info("HyperT reset needed\n");
+ printk(BIOS_INFO, "HyperT reset needed\n");
}
else {
- printk_debug("HyperT reset not needed\n");
+ printk(BIOS_DEBUG, "HyperT reset not needed\n");
}
#endif
@@ -563,7 +563,7 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
ht_unitid_base[ht_dev_num-1] = CONFIG_HT_CHAIN_END_UNITID_BASE; // update last one
- printk_debug(" unitid: %04x --> %04x\n",
+ printk(BIOS_DEBUG, " unitid: %04x --> %04x\n",
real_last_unitid, CONFIG_HT_CHAIN_END_UNITID_BASE);
}
@@ -583,9 +583,9 @@ unsigned int hypertransport_scan_chain(struct bus *bus,
if(old_devices) {
device_t left;
for(left = old_devices; left; left = left->sibling) {
- printk_debug("%s\n", dev_path(left));
+ printk(BIOS_DEBUG, "%s\n", dev_path(left));
}
- printk_err("HT: Left over static devices. Check your Config.lb\n");
+ printk(BIOS_ERR, "HT: Left over static devices. Check your Config.lb\n");
if(last_func && !last_func->sibling) // put back the left over static device, and let pci_scan_bus disable it
last_func->sibling = old_devices;
}
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index b5088c1080..fbe8b335af 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -136,7 +136,7 @@ unsigned pci_find_next_capability(struct device *dev, unsigned cap,
int this_cap;
pos &= ~3;
this_cap = pci_read_config8(dev, pos + PCI_CAP_LIST_ID);
- printk_spew("Capability: type 0x%02x @ 0x%02x\n", this_cap,
+ printk(BIOS_SPEW, "Capability: type 0x%02x @ 0x%02x\n", this_cap,
pos);
if (this_cap == 0xff) {
break;
@@ -226,8 +226,7 @@ struct resource *pci_get_resource(struct device *dev, unsigned long index)
*/
if (moving == 0) {
if (value != 0) {
- printk_debug
- ("%s register %02lx(%08lx), read-only ignoring it\n",
+ printk(BIOS_DEBUG, "%s register %02lx(%08lx), read-only ignoring it\n",
dev_path(dev), index, value);
}
resource->flags = 0;
@@ -257,8 +256,8 @@ struct resource *pci_get_resource(struct device *dev, unsigned long index)
resource->flags |= IORESOURCE_PCI64;
} else {
/* Invalid value. */
- printk_err("Broken BAR with value %lx\n", attr);
- printk_err(" on dev %s at index %02lx\n",
+ printk(BIOS_ERR, "Broken BAR with value %lx\n", attr);
+ printk(BIOS_ERR, " on dev %s at index %02lx\n",
dev_path(dev), index);
resource->flags = 0;
}
@@ -313,8 +312,7 @@ static void pci_get_rom_resource(struct device *dev, unsigned long index)
resource->flags |= IORESOURCE_MEM | IORESOURCE_READONLY;
} else {
if (value != 0) {
- printk_debug
- ("%s register %02lx(%08lx), read-only ignoring it\n",
+ printk(BIOS_DEBUG, "%s register %02lx(%08lx), read-only ignoring it\n",
dev_path(dev), index, value);
}
resource->flags = 0;
@@ -454,7 +452,7 @@ static void pci_set_resource(struct device *dev, struct resource *resource)
/* Make certain the resource has actually been assigned a value. */
if (!(resource->flags & IORESOURCE_ASSIGNED)) {
- printk_err("ERROR: %s %02lx %s size: 0x%010llx not assigned\n",
+ printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx not assigned\n",
dev_path(dev), resource->index,
resource_type(resource), resource->size);
return;
@@ -543,7 +541,7 @@ static void pci_set_resource(struct device *dev, struct resource *resource)
} else {
/* Don't let me think I stored the resource. */
resource->flags &= ~IORESOURCE_STORED;
- printk_err("ERROR: invalid resource->index %lx\n",
+ printk(BIOS_ERR, "ERROR: invalid resource->index %lx\n",
resource->index);
}
report_resource_stored(dev, resource, "");
@@ -594,7 +592,7 @@ void pci_dev_enable_resources(struct device *dev)
/* Set the subsystem vendor and device id for mainboard devices. */
ops = ops_pci(dev);
if (dev->on_mainboard && ops && ops->set_subsystem) {
- printk_debug("%s subsystem <- %02x/%02x\n",
+ printk(BIOS_DEBUG, "%s subsystem <- %02x/%02x\n",
dev_path(dev),
CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID,
CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID);
@@ -607,7 +605,7 @@ void pci_dev_enable_resources(struct device *dev)
/* v3 has
* command |= (PCI_COMMAND_PARITY + PCI_COMMAND_SERR); // Error check.
*/
- printk_debug("%s cmd <- %02x\n", dev_path(dev), command);
+ printk(BIOS_DEBUG, "%s cmd <- %02x\n", dev_path(dev), command);
pci_write_config16(dev, PCI_COMMAND, command);
}
@@ -623,7 +621,7 @@ void pci_bus_enable_resources(struct device *dev)
ctrl = pci_read_config16(dev, PCI_BRIDGE_CONTROL);
ctrl |= dev->link[0].bridge_ctrl;
ctrl |= (PCI_BRIDGE_CTL_PARITY + PCI_BRIDGE_CTL_SERR); /* Error check. */
- printk_debug("%s bridge ctrl <- %04x\n", dev_path(dev), ctrl);
+ printk(BIOS_DEBUG, "%s bridge ctrl <- %04x\n", dev_path(dev), ctrl);
pci_write_config16(dev, PCI_BRIDGE_CONTROL, ctrl);
pci_dev_enable_resources(dev);
@@ -731,7 +729,7 @@ static struct device_operations *get_pci_bridge_ops(device_t dev)
#if CONFIG_PCIX_PLUGIN_SUPPORT == 1
pos = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (pos) {
- printk_debug("%s subordinate bus PCI-X\n", dev_path(dev));
+ printk(BIOS_DEBUG, "%s subordinate bus PCI-X\n", dev_path(dev));
return &default_pcix_ops_bus;
}
#endif
@@ -745,7 +743,7 @@ static struct device_operations *get_pci_bridge_ops(device_t dev)
flags = pci_read_config16(dev, pos + PCI_CAP_FLAGS);
if ((flags >> 13) == 1) {
/* Host or Secondary Interface */
- printk_debug("%s subordinate bus Hypertransport\n",
+ printk(BIOS_DEBUG, "%s subordinate bus Hypertransport\n",
dev_path(dev));
return &default_ht_ops_bus;
}
@@ -760,11 +758,11 @@ static struct device_operations *get_pci_bridge_ops(device_t dev)
case PCI_EXP_TYPE_ROOT_PORT:
case PCI_EXP_TYPE_UPSTREAM:
case PCI_EXP_TYPE_DOWNSTREAM:
- printk_debug("%s subordinate bus PCI Express\n",
+ printk(BIOS_DEBUG, "%s subordinate bus PCI Express\n",
dev_path(dev));
return &default_pciexp_ops_bus;
case PCI_EXP_TYPE_PCI_BRIDGE:
- printk_debug("%s subordinate PCI\n", dev_path(dev));
+ printk(BIOS_DEBUG, "%s subordinate PCI\n", dev_path(dev));
return &default_pci_ops_bus;
default:
break;
@@ -795,7 +793,7 @@ static void set_pci_ops(struct device *dev)
if ((driver->vendor == dev->vendor) &&
(driver->device == dev->device)) {
dev->ops = (struct device_operations *)driver->ops;
- printk_spew("%s [%04x/%04x] %sops\n",
+ printk(BIOS_SPEW, "%s [%04x/%04x] %sops\n",
dev_path(dev),
driver->vendor, driver->device,
(driver->ops->scan_bus ? "bus " : ""));
@@ -823,7 +821,7 @@ static void set_pci_ops(struct device *dev)
default:
bad:
if (dev->enabled) {
- printk_err("%s [%04x/%04x/%06x] has unknown header "
+ printk(BIOS_ERR, "%s [%04x/%04x/%06x] has unknown header "
"type %02x, ignoring.\n",
dev_path(dev),
dev->vendor, dev->device,
@@ -852,7 +850,7 @@ static struct device *pci_scan_get_dev(struct device **list, unsigned int devfn)
dev = 0;
for (; *list; list = &(*list)->sibling) {
if ((*list)->path.type != DEVICE_PATH_PCI) {
- printk_err("child %s not a pci device\n",
+ printk(BIOS_ERR, "child %s not a pci device\n",
dev_path(*list));
continue;
}
@@ -916,7 +914,7 @@ device_t pci_probe_dev(device_t dev, struct bus * bus, unsigned devfn)
*/
if ((id == 0xffffffff) || (id == 0x00000000) ||
(id == 0x0000ffff) || (id == 0xffff0000)) {
- printk_spew("%s, bad id 0x%x\n", dev_path(&dummy), id);
+ printk(BIOS_SPEW, "%s, bad id 0x%x\n", dev_path(&dummy), id);
return NULL;
}
dev = alloc_dev(bus, &dummy.path);
@@ -947,7 +945,7 @@ device_t pci_probe_dev(device_t dev, struct bus * bus, unsigned devfn)
if ((id == 0xffffffff) || (id == 0x00000000) ||
(id == 0x0000ffff) || (id == 0xffff0000)) {
if (dev->enabled) {
- printk_info("PCI: Static device %s not found, disabling it.\n",
+ printk(BIOS_INFO, "PCI: Static device %s not found, disabling it.\n",
dev_path(dev));
dev->enabled = 0;
}
@@ -982,7 +980,7 @@ device_t pci_probe_dev(device_t dev, struct bus * bus, unsigned devfn)
}
/* Display the device. */
- printk_debug("%s [%04x/%04x] %s%s\n",
+ printk(BIOS_DEBUG, "%s [%04x/%04x] %s%s\n",
dev_path(dev),
dev->vendor, dev->device,
dev->enabled ? "enabled" : "disabled",
@@ -1016,10 +1014,10 @@ unsigned int pci_scan_bus(struct bus *bus,
struct device *child;
#if CONFIG_PCI_BUS_SEGN_BITS
- printk_debug("PCI: pci_scan_bus for bus %04x:%02x\n",
+ printk(BIOS_DEBUG, "PCI: pci_scan_bus for bus %04x:%02x\n",
bus->secondary >> 8, bus->secondary & 0xff);
#else
- printk_debug("PCI: pci_scan_bus for bus %02x\n", bus->secondary);
+ printk(BIOS_DEBUG, "PCI: pci_scan_bus for bus %02x\n", bus->secondary);
#endif
old_devices = bus->children;
@@ -1055,11 +1053,11 @@ unsigned int pci_scan_bus(struct bus *bus,
*/
if (old_devices) {
device_t left;
- printk_warning("PCI: Left over static devices:\n");
+ printk(BIOS_WARNING, "PCI: Left over static devices:\n");
for (left = old_devices; left; left = left->sibling) {
- printk_warning("%s\n", dev_path(left));
+ printk(BIOS_WARNING, "%s\n", dev_path(left));
}
- printk_warning("PCI: Check your mainboard Config.lb.\n");
+ printk(BIOS_WARNING, "PCI: Check your mainboard Config.lb.\n");
}
/* For all children that implement scan_bus() (i.e. bridges)
@@ -1073,7 +1071,7 @@ unsigned int pci_scan_bus(struct bus *bus,
* side of any bridges that may be on this bus plus any devices.
* Return how far we've got finding sub-buses.
*/
- printk_debug("PCI: pci_scan_bus returning with max=%03x\n", max);
+ printk(BIOS_DEBUG, "PCI: pci_scan_bus returning with max=%03x\n", max);
post_code(0x55);
return max;
}
@@ -1100,7 +1098,7 @@ unsigned int do_pci_scan_bridge(struct device *dev, unsigned int max,
u32 buses;
u16 cr;
- printk_spew("%s for %s\n", __func__, dev_path(dev));
+ printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(dev));
bus = &dev->link[0];
bus->dev = dev;
@@ -1146,7 +1144,7 @@ unsigned int do_pci_scan_bridge(struct device *dev, unsigned int max,
pci_write_config32(dev, PCI_PRIMARY_BUS, buses);
pci_write_config16(dev, PCI_COMMAND, cr);
- printk_spew("%s returns max %d\n", __func__, max);
+ printk(BIOS_SPEW, "%s returns max %d\n", __func__, max);
return max;
}
@@ -1224,7 +1222,7 @@ void pci_assign_irqs(unsigned bus, unsigned slot,
irq = pIntAtoD[line - 1];
- printk_debug("Assigning IRQ %d to %d:%x.%d\n",
+ printk(BIOS_DEBUG, "Assigning IRQ %d to %d:%x.%d\n",
irq, bus, slot, funct);
pci_write_config8(pdev, PCI_INTERRUPT_LINE,
@@ -1232,7 +1230,7 @@ void pci_assign_irqs(unsigned bus, unsigned slot,
#ifdef PARANOID_IRQ_ASSIGNMENTS
irq = pci_read_config8(pdev, PCI_INTERRUPT_LINE);
- printk_debug(" Readback = %d\n", irq);
+ printk(BIOS_DEBUG, " Readback = %d\n", irq);
#endif
// Change to level triggered
diff --git a/src/devices/pci_ops.c b/src/devices/pci_ops.c
index 6ade5e0c3c..60ed1ca280 100644
--- a/src/devices/pci_ops.c
+++ b/src/devices/pci_ops.c
@@ -39,7 +39,7 @@ static struct bus *get_pbus(device_t dev)
while(pbus && pbus->dev && !ops_pci_bus(pbus)) {
if (pbus == pbus->dev->bus) {
- printk_alert("%s in endless loop looking for a parent "
+ printk(BIOS_ALERT, "%s in endless loop looking for a parent "
"bus with ops_pci_bus for %s, breaking out.\n",
__func__, dev_path(dev));
break;
@@ -48,7 +48,7 @@ static struct bus *get_pbus(device_t dev)
}
if (!pbus || !pbus->dev || !pbus->dev->ops || !pbus->dev->ops->ops_pci_bus) {
/* This can happen before the device tree is set up completely. */
- //printk_emerg("%s: Cannot find pci bus operations.\n", dev_path(dev));
+ //printk(BIOS_EMERG, "%s: Cannot find pci bus operations.\n", dev_path(dev));
pbus = NULL;
}
return pbus;
diff --git a/src/devices/pci_rom.c b/src/devices/pci_rom.c
index c4af19143b..0ed347b4e7 100644
--- a/src/devices/pci_rom.c
+++ b/src/devices/pci_rom.c
@@ -38,7 +38,7 @@ struct rom_header * pci_rom_probe(struct device *dev)
rom_header = cbfs_load_optionrom(dev->vendor, dev->device, NULL);
if (rom_header) {
- printk_debug("In cbfs, rom address for %s = %p\n",
+ printk(BIOS_DEBUG, "In cbfs, rom address for %s = %p\n",
dev_path(dev), rom_header);
} else {
unsigned long rom_address;
@@ -59,35 +59,35 @@ struct rom_header * pci_rom_probe(struct device *dev)
rom_address|PCI_ROM_ADDRESS_ENABLE);
}
- printk_debug("On card, rom address for %s = %lx\n",
+ printk(BIOS_DEBUG, "On card, rom address for %s = %lx\n",
dev_path(dev), rom_address);
rom_header = (struct rom_header *)rom_address;
}
- printk_spew("PCI Expansion ROM, signature 0x%04x, INIT size 0x%04x, data ptr 0x%04x\n",
+ printk(BIOS_SPEW, "PCI Expansion ROM, signature 0x%04x, INIT size 0x%04x, data ptr 0x%04x\n",
le32_to_cpu(rom_header->signature),
rom_header->size * 512, le32_to_cpu(rom_header->data));
if (le32_to_cpu(rom_header->signature) != PCI_ROM_HDR) {
- printk_err("Incorrect Expansion ROM Header Signature %04x\n",
+ printk(BIOS_ERR, "Incorrect Expansion ROM Header Signature %04x\n",
le32_to_cpu(rom_header->signature));
return NULL;
}
rom_data = (((void *)rom_header) + le32_to_cpu(rom_header->data));
- printk_spew("PCI ROM Image, Vendor %04x, Device %04x,\n",
+ printk(BIOS_SPEW, "PCI ROM Image, Vendor %04x, Device %04x,\n",
rom_data->vendor, rom_data->device);
if (dev->vendor != rom_data->vendor || dev->device != rom_data->device) {
- printk_err("ID mismatch: Vendor ID %04x, Device ID %04x\n",
+ printk(BIOS_ERR, "ID mismatch: Vendor ID %04x, Device ID %04x\n",
rom_data->vendor, rom_data->device);
return NULL;
}
- printk_spew("PCI ROM Image, Class Code %04x%02x, Code Type %02x\n",
+ printk(BIOS_SPEW, "PCI ROM Image, Class Code %04x%02x, Code Type %02x\n",
rom_data->class_hi, rom_data->class_lo,
rom_data->type);
if (dev->class != ((rom_data->class_hi << 8) | rom_data->class_lo)) {
- printk_debug("Class Code mismatch ROM %08x, dev %08x\n",
+ printk(BIOS_DEBUG, "Class Code mismatch ROM %08x, dev %08x\n",
(rom_data->class_hi << 8) | rom_data->class_lo,
dev->class);
//return NULL;
@@ -124,14 +124,14 @@ struct rom_header *pci_rom_load(struct device *dev, struct rom_header *rom_heade
if (dev != vga_pri) return NULL; // only one VGA supported
#endif
if ((void *)PCI_VGA_RAM_IMAGE_START != rom_header) {
- printk_debug("copying VGA ROM Image from %p to 0x%x, 0x%x bytes\n",
+ printk(BIOS_DEBUG, "copying VGA ROM Image from %p to 0x%x, 0x%x bytes\n",
rom_header, PCI_VGA_RAM_IMAGE_START, rom_size);
memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header, rom_size);
}
return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START);
}
- printk_debug("copying non-VGA ROM Image from %p to %p, 0x%x bytes\n",
+ printk(BIOS_DEBUG, "copying non-VGA ROM Image from %p to %p, 0x%x bytes\n",
rom_header, pci_ram_image_start, rom_size);
memcpy(pci_ram_image_start, rom_header, rom_size);
diff --git a/src/devices/pciexp_device.c b/src/devices/pciexp_device.c
index ea9c791272..a14f00426f 100644
--- a/src/devices/pciexp_device.c
+++ b/src/devices/pciexp_device.c
@@ -35,7 +35,7 @@ static void pciexp_tune_dev(device_t dev)
return;
}
#ifdef CONFIG_PCIE_TUNING
- printk_debug("PCIe: tuning %s\n", dev_path(dev));
+ printk(BIOS_DEBUG, "PCIe: tuning %s\n", dev_path(dev));
// TODO make this depending on ASPM
/* Enable ASPM Role Based Error Reporting */
diff --git a/src/devices/pcix_device.c b/src/devices/pcix_device.c
index a1788920f9..e6147c9ba8 100644
--- a/src/devices/pcix_device.c
+++ b/src/devices/pcix_device.c
@@ -38,7 +38,7 @@ static void pcix_tune_dev(device_t dev)
if (!cap) {
return;
}
- printk_debug("%s PCI-X tuning\n", dev_path(dev));
+ printk(BIOS_DEBUG, "%s PCI-X tuning\n", dev_path(dev));
status = pci_read_config32(dev, cap + PCI_X_STATUS);
orig_cmd = cmd = pci_read_config16(dev,cap + PCI_X_CMD);
@@ -135,7 +135,7 @@ unsigned int pcix_scan_bridge(device_t dev, unsigned int max)
}
/* Print the PCI-X bus speed */
- printk_debug("PCI: %02x: %s\n", dev->link[0].secondary, pcix_speed(sstatus));
+ printk(BIOS_DEBUG, "PCI: %02x: %s\n", dev->link[0].secondary, pcix_speed(sstatus));
return max;
}
diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c
index 6181425673..721d1ce3dc 100644
--- a/src/devices/pnp_device.c
+++ b/src/devices/pnp_device.c
@@ -103,7 +103,7 @@ void pnp_read_resources(device_t dev)
static void pnp_set_resource(device_t dev, struct resource *resource)
{
if (!(resource->flags & IORESOURCE_ASSIGNED)) {
- printk_err("ERROR: %s %02lx %s size: 0x%010Lx not assigned\n",
+ printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010Lx not assigned\n",
dev_path(dev), resource->index,
resource_type(resource),
resource->size);
@@ -121,7 +121,7 @@ static void pnp_set_resource(device_t dev, struct resource *resource)
pnp_set_irq(dev, resource->index, resource->base);
}
else {
- printk_err("ERROR: %s %02lx unknown resource type\n",
+ printk(BIOS_ERR, "ERROR: %s %02lx unknown resource type\n",
dev_path(dev), resource->index);
return;
}
diff --git a/src/devices/root_device.c b/src/devices/root_device.c
index 09582fccf2..3e3249e85e 100644
--- a/src/devices/root_device.c
+++ b/src/devices/root_device.c
@@ -34,7 +34,7 @@
*/
void root_dev_read_resources(device_t root)
{
- printk_err("%s should never be called.\n", __func__);
+ printk(BIOS_ERR, "%s should never be called.\n", __func__);
}
/**
@@ -46,7 +46,7 @@ void root_dev_read_resources(device_t root)
*/
void root_dev_set_resources(device_t root)
{
- printk_err("%s should never be called.\n", __func__);
+ printk(BIOS_ERR, "%s should never be called.\n", __func__);
}
/**
@@ -77,7 +77,7 @@ unsigned int scan_static_bus(device_t bus, unsigned int max)
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 */
@@ -93,10 +93,10 @@ unsigned int scan_static_bus(device_t bus, unsigned int max)
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");
}
@@ -105,12 +105,12 @@ unsigned int scan_static_bus(device_t bus, unsigned int max)
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;
}
@@ -163,7 +163,7 @@ void root_dev_init(device_t root)
void root_dev_reset(struct bus *bus)
{
- printk_info("Reseting board...\n");
+ printk(BIOS_INFO, "Reseting board...\n");
hard_reset();
}
diff --git a/src/devices/smbus_ops.c b/src/devices/smbus_ops.c
index acf0b1f39d..b22428123e 100644
--- a/src/devices/smbus_ops.c
+++ b/src/devices/smbus_ops.c
@@ -32,7 +32,7 @@ struct bus *get_pbus_smbus(device_t dev)
pbus = pbus->dev->bus;
}
if (!pbus || !pbus->dev || !pbus->dev->ops || !pbus->dev->ops->ops_smbus_bus) {
- printk_alert("%s Cannot find smbus bus operations", dev_path(dev));
+ printk(BIOS_ALERT, "%s Cannot find smbus bus operations", dev_path(dev));
die("");
}
return pbus;
@@ -53,15 +53,15 @@ int smbus_set_link(device_t dev)
pbus_a[pbus_num++] = pbus;
pbus = pbus->dev->bus;
}
-// printk_info("smbus_set_link: ");
+// printk(BIOS_INFO, "smbus_set_link: ");
for (i=pbus_num-1; i>=0; i--) {
-// printk_info(" %s[%d] -> ", dev_path(pbus_a[i]->dev), pbus_a[i]->link);
+// printk(BIOS_INFO, " %s[%d] -> ", dev_path(pbus_a[i]->dev), pbus_a[i]->link);
if (ops_smbus_bus(get_pbus_smbus(pbus_a[i]->dev))) {
if (pbus_a[i]->dev->ops && pbus_a[i]->dev->ops->set_link)
pbus_a[i]->dev->ops->set_link(pbus_a[i]->dev, pbus_a[i]->link);
}
}
-// printk_info(" %s\n", dev_path(dev));
+// printk(BIOS_INFO, " %s\n", dev_path(dev));
return pbus_num;
}