/branches/tracing/kernel/genarch/src/ofw/ebus.c |
---|
38,7 → 38,7 |
#include <genarch/ofw/ofw_tree.h> |
#include <arch/memstr.h> |
#include <arch/trap/interrupt.h> |
#include <func.h> |
#include <string.h> |
#include <panic.h> |
#include <debug.h> |
#include <macros.h> |
127,7 → 127,7 |
if (!controller) |
return false; |
if (strcmp(ofw_tree_node_name(controller), "pci") != 0) { |
if (str_cmp(ofw_tree_node_name(controller), "pci") != 0) { |
/* |
* This is not a PCI node. |
*/ |
/branches/tracing/kernel/genarch/src/ofw/fhc.c |
---|
38,7 → 38,7 |
#include <genarch/ofw/ofw_tree.h> |
#include <arch/drivers/fhc.h> |
#include <arch/memstr.h> |
#include <func.h> |
#include <string.h> |
#include <panic.h> |
#include <macros.h> |
66,8 → 66,8 |
*pa = addr; |
return true; |
} |
if (strcmp(ofw_tree_node_name(node->parent), "central") != 0) |
panic("Unexpected parent node: %s.\n", ofw_tree_node_name(node->parent)); |
if (str_cmp(ofw_tree_node_name(node->parent), "central") != 0) |
panic("Unexpected parent node: %s.", ofw_tree_node_name(node->parent)); |
ofw_central_reg_t central_reg; |
84,7 → 84,7 |
bool ofw_central_apply_ranges(ofw_tree_node_t *node, ofw_central_reg_t *reg, uintptr_t *pa) |
{ |
if (node->parent->parent) |
panic("Unexpected parent node: %s.\n", ofw_tree_node_name(node->parent)); |
panic("Unexpected parent node: %s.", ofw_tree_node_name(node->parent)); |
ofw_tree_property_t *prop; |
ofw_central_range_t *range; |
/branches/tracing/kernel/genarch/src/ofw/ofw_tree.c |
---|
38,7 → 38,7 |
#include <genarch/ofw/ofw_tree.h> |
#include <arch/memstr.h> |
#include <mm/slab.h> |
#include <func.h> |
#include <string.h> |
#include <print.h> |
#include <panic.h> |
66,7 → 66,7 |
unsigned int i; |
for (i = 0; i < node->properties; i++) { |
if (strcmp(node->property[i].name, name) == 0) |
if (str_cmp(node->property[i].name, name) == 0) |
return &node->property[i]; |
} |
85,10 → 85,10 |
prop = ofw_tree_getprop(node, "name"); |
if (!prop) |
panic("Node without name property.\n"); |
panic("Node without name property."); |
if (prop->size < 2) |
panic("Invalid name property.\n"); |
panic("Invalid name property."); |
return prop->value; |
} |
109,7 → 109,7 |
* Try to find the disambigued name. |
*/ |
for (cur = node->child; cur; cur = cur->peer) { |
if (strcmp(cur->da_name, name) == 0) |
if (str_cmp(cur->da_name, name) == 0) |
return cur; |
} |
121,7 → 121,7 |
* are not always fully-qualified. |
*/ |
for (cur = node->child; cur; cur = cur->peer) { |
if (strcmp(ofw_tree_node_name(cur), name) == 0) |
if (str_cmp(ofw_tree_node_name(cur), name) == 0) |
return cur; |
} |
146,7 → 146,7 |
prop = ofw_tree_getprop(cur, "device_type"); |
if (!prop || !prop->value) |
continue; |
if (strcmp(prop->value, name) == 0) |
if (str_cmp(prop->value, name) == 0) |
return cur; |
} |
203,7 → 203,7 |
prop = ofw_tree_getprop(cur, "device_type"); |
if (!prop || !prop->value) |
continue; |
if (strcmp(prop->value, name) == 0) |
if (str_cmp(prop->value, name) == 0) |
return cur; |
} |
229,7 → 229,7 |
prop = ofw_tree_getprop(cur, "name"); |
if (!prop || !prop->value) |
continue; |
if (strcmp(prop->value, name) == 0) |
if (str_cmp(prop->value, name) == 0) |
return cur; |
} |
252,14 → 252,15 |
if (path[0] != '/') |
return NULL; |
for (i = 1; i < strlen(path) && node; i = j + 1) { |
for (j = i; j < strlen(path) && path[j] != '/'; j++) |
; |
if (i == j) /* skip extra slashes */ |
for (i = 1; (i < str_size(path)) && (node); i = j + 1) { |
for (j = i; (j < str_size(path)) && (path[j] != '/'); j++); |
/* Skip extra slashes */ |
if (i == j) |
continue; |
memcpy(buf, &path[i], j - i); |
buf[j - i] = '\0'; |
buf[j - i] = 0; |
node = ofw_tree_find_child(node, buf); |
} |
/branches/tracing/kernel/genarch/src/ofw/pci.c |
---|
39,7 → 39,7 |
#include <arch/drivers/pci.h> |
#include <arch/trap/interrupt.h> |
#include <arch/memstr.h> |
#include <func.h> |
#include <string.h> |
#include <panic.h> |
#include <macros.h> |
58,7 → 58,7 |
prop = ofw_tree_getprop(node, "ranges"); |
if (!prop) { |
if (strcmp(ofw_tree_node_name(node->parent), "pci") == 0) |
if (str_cmp(ofw_tree_node_name(node->parent), "pci") == 0) |
return ofw_pci_apply_ranges(node->parent, reg, pa); |
return false; |
} |
101,7 → 101,7 |
prop = ofw_tree_getprop(node, "assigned-addresses"); |
if (!prop) |
panic("Can't find \"assigned-addresses\" property.\n"); |
panic("Cannot find 'assigned-addresses' property."); |
assigned_addresses = prop->size / sizeof(ofw_pci_reg_t); |
assigned_address = prop->value; |