ret = uclass_get(drv->id, &uc);
if (ret) {
- debug("Missing uclass for driver %s\n", drv->name);
+ dm_warn("Missing uclass for driver %s\n", drv->name);
return ret;
}
#include <asm/global_data.h>
#include <asm/io.h>
#include <dm/device-internal.h>
+#include <dm/util.h>
DECLARE_GLOBAL_DATA_PTR;
na = fdt_address_cells(gd->fdt_blob, parent);
if (na < 1) {
- debug("bad #address-cells\n");
+ dm_warn("bad #address-cells\n");
return FDT_ADDR_T_NONE;
}
ns = fdt_size_cells(gd->fdt_blob, parent);
if (ns < 0) {
- debug("bad #size-cells\n");
+ dm_warn("bad #size-cells\n");
return FDT_ADDR_T_NONE;
}
reg = fdt_getprop(gd->fdt_blob, offset, "reg", &len);
if (!reg || (len <= (index * sizeof(fdt32_t) * (na + ns)))) {
- debug("Req index out of range\n");
+ dm_warn("Req index out of range\n");
return FDT_ADDR_T_NONE;
}
drv = lists_driver_lookup_name(drv_name);
if (!drv) {
- debug("Cannot find driver '%s'\n", drv_name);
+ dm_warn("Cannot find driver '%s'\n", drv_name);
return -ENOENT;
}
ret = device_bind_with_driver_data(parent, drv, dev_name, 0 /* data */,
#include <linux/bug.h>
#include <linux/libfdt.h>
#include <dm/of_access.h>
+#include <dm/util.h>
#include <linux/ctype.h>
#include <linux/err.h>
#include <linux/ioport.h>
{
const u8 *val;
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (!np)
return -EINVAL;
val = of_find_property_value_of_size(np, propname, sizeof(*outp));
if (IS_ERR(val)) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return PTR_ERR(val);
}
*outp = *val;
- debug("%#x (%d)\n", *outp, *outp);
+ dm_warn("%#x (%d)\n", *outp, *outp);
return 0;
}
{
const __be16 *val;
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (!np)
return -EINVAL;
val = of_find_property_value_of_size(np, propname, sizeof(*outp));
if (IS_ERR(val)) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return PTR_ERR(val);
}
*outp = be16_to_cpup(val);
- debug("%#x (%d)\n", *outp, *outp);
+ dm_warn("%#x (%d)\n", *outp, *outp);
return 0;
}
{
const __be32 *val;
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
val = of_find_property_value_of_size(np, propname,
sz * sizeof(*out_values));
if (IS_ERR(val))
return PTR_ERR(val);
- debug("size %zd\n", sz);
+ dm_warn("size %zd\n", sz);
while (sz--)
*out_values++ = be32_to_cpup(val++);
{
const __be32 *val;
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (!np)
return -EINVAL;
val = of_find_property_value_of_size(np, propname,
sizeof(*outp) * (index + 1));
if (IS_ERR(val)) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return PTR_ERR(val);
}
*outp = be32_to_cpup(val + index);
- debug("%#x (%d)\n", *outp, *outp);
+ dm_warn("%#x (%d)\n", *outp, *outp);
return 0;
}
{
const __be64 *val;
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (!np)
return -EINVAL;
val = of_find_property_value_of_size(np, propname,
sizeof(*outp) * (index + 1));
if (IS_ERR(val)) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return PTR_ERR(val);
}
*outp = be64_to_cpup(val + index);
- debug("%#llx (%lld)\n", (unsigned long long)*outp,
- (unsigned long long)*outp);
+ dm_warn("%#llx (%lld)\n", (unsigned long long)*outp,
+ (unsigned long long)*outp);
return 0;
}
l = strnlen(p, end - p) + 1;
if (p + l > end)
return -EILSEQ;
- debug("comparing %s with %s\n", string, p);
+ dm_warn("comparing %s with %s\n", string, p);
if (strcmp(string, p) == 0)
return i; /* Found it; return index */
}
if (cells_name || cur_index == index) {
node = of_find_node_by_phandle(NULL, phandle);
if (!node) {
- debug("%s: could not find phandle\n",
- np->full_name);
+ dm_warn("%s: could not find phandle\n",
+ np->full_name);
goto err;
}
}
if (cells_name) {
if (of_read_u32(node, cells_name, &count)) {
- debug("%s: could not get %s for %s\n",
- np->full_name, cells_name,
- node->full_name);
+ dm_warn("%s: could not get %s for %s\n",
+ np->full_name, cells_name,
+ node->full_name);
goto err;
}
} else {
* remaining property data length
*/
if (list + count > list_end) {
- debug("%s: arguments longer than property\n",
- np->full_name);
+ dm_warn("%s: arguments longer than property\n",
+ np->full_name);
goto err;
}
}
strncpy(ap->stem, stem, stem_len);
ap->stem[stem_len] = 0;
list_add_tail(&ap->link, &aliases_lookup);
- debug("adding DT alias:%s: stem=%s id=%i node=%s\n",
- ap->alias, ap->stem, ap->id, of_node_full_name(np));
+ dm_warn("adding DT alias:%s: stem=%s id=%i node=%s\n",
+ ap->alias, ap->stem, ap->id, of_node_full_name(np));
}
int of_alias_scan(void)
#include <linux/libfdt.h>
#include <dm/of_access.h>
#include <dm/of_addr.h>
+#include <dm/util.h>
#include <linux/err.h>
#include <linux/ioport.h>
#include <linux/printk.h>
#ifdef DEBUG
static void of_dump_addr(const char *s, const __be32 *addr, int na)
{
- debug("%s", s);
+ dm_warn("%s", s);
while (na--)
pr_cont(" %08x", be32_to_cpu(*(addr++)));
pr_cont("\n");
s = of_read_number(range + na + pna, ns);
da = of_read_number(addr, na);
- debug("default map, cp=%llx, s=%llx, da=%llx\n",
- (unsigned long long)cp, (unsigned long long)s,
- (unsigned long long)da);
+ dm_warn("default map, cp=%llx, s=%llx, da=%llx\n",
+ (unsigned long long)cp, (unsigned long long)s,
+ (unsigned long long)da);
if (da < cp || da >= (cp + s))
return OF_BAD_ADDR;
ranges = of_get_property(parent, rprop, &rlen);
if (ranges == NULL && !of_empty_ranges_quirk(parent) &&
strcmp(rprop, "dma-ranges")) {
- debug("no ranges; cannot translate\n");
+ dm_warn("no ranges; cannot translate\n");
return 1;
}
if (ranges == NULL || rlen == 0) {
offset = of_read_number(addr, na);
memset(addr, 0, pna * 4);
- debug("empty ranges; 1:1 translation\n");
+ dm_warn("empty ranges; 1:1 translation\n");
goto finish;
}
- debug("walking ranges...\n");
+ dm_warn("walking ranges...\n");
/* Now walk through the ranges */
rlen /= 4;
break;
}
if (offset == OF_BAD_ADDR) {
- debug("not found !\n");
+ dm_warn("not found !\n");
return 1;
}
memcpy(addr, ranges + na, 4 * pna);
finish:
of_dump_addr("parent translation for:", addr, pna);
- debug("with offset: %llx\n", (unsigned long long)offset);
+ dm_warn("with offset: %llx\n", (unsigned long long)offset);
/* Translate it into parent bus space */
return pbus->translate(addr, offset, pna);
int na, ns, pna, pns;
u64 result = OF_BAD_ADDR;
- debug("** translation for device %s **\n", of_node_full_name(dev));
+ dm_warn("** translation for device %s **\n", of_node_full_name(dev));
/* Increase refcount at current level */
(void)of_node_get(dev);
/* Count address cells & copy address locally */
bus->count_cells(dev, &na, &ns);
if (!OF_CHECK_COUNTS(na, ns)) {
- debug("Bad cell count for %s\n", of_node_full_name(dev));
+ dm_warn("Bad cell count for %s\n", of_node_full_name(dev));
goto bail;
}
memcpy(addr, in_addr, na * 4);
- debug("bus is %s (na=%d, ns=%d) on %s\n", bus->name, na, ns,
- of_node_full_name(parent));
+ dm_warn("bus is %s (na=%d, ns=%d) on %s\n", bus->name, na, ns,
+ of_node_full_name(parent));
of_dump_addr("translating address:", addr, na);
/* Translate */
/* If root, we have finished */
if (parent == NULL) {
- debug("reached root node\n");
+ dm_warn("reached root node\n");
result = of_read_number(addr, na);
break;
}
pbus = of_match_bus(parent);
pbus->count_cells(dev, &pna, &pns);
if (!OF_CHECK_COUNTS(pna, pns)) {
- debug("Bad cell count for %s\n",
- of_node_full_name(dev));
+ dm_warn("Bad cell count for %s\n",
+ of_node_full_name(dev));
break;
}
- debug("parent bus is %s (na=%d, ns=%d) on %s\n", pbus->name,
- pna, pns, of_node_full_name(parent));
+ dm_warn("parent bus is %s (na=%d, ns=%d) on %s\n", pbus->name,
+ pna, pns, of_node_full_name(parent));
/* Apply bus translation */
if (of_translate_one(dev, bus, pbus, addr, na, ns, pna, rprop))
}
if (!dev || !ranges) {
- debug("no dma-ranges found for node %s\n",
- of_node_full_name(dev));
+ dm_warn("no dma-ranges found for node %s\n",
+ of_node_full_name(dev));
ret = -ENOENT;
goto out;
}
#include <dm/of_access.h>
#include <dm/of_extra.h>
#include <dm/ofnode.h>
+#include <dm/util.h>
int ofnode_read_fmap_entry(ofnode node, struct fmap_entry *entry)
{
ofnode subnode;
if (ofnode_read_u32(node, "image-pos", &entry->offset)) {
- debug("Node '%s' has bad/missing 'image-pos' property\n",
- ofnode_get_name(node));
+ dm_warn("Node '%s' has bad/missing 'image-pos' property\n",
+ ofnode_get_name(node));
return log_msg_ret("image-pos", -ENOENT);
}
if (ofnode_read_u32(node, "size", &entry->length)) {
- debug("Node '%s' has bad/missing 'size' property\n",
- ofnode_get_name(node));
+ dm_warn("Node '%s' has bad/missing 'size' property\n",
+ ofnode_get_name(node));
return log_msg_ret("size", -ENOENT);
}
entry->used = ofnode_read_s32_default(node, "used", entry->length);
const fdt_addr_t *cell;
int len;
- debug("%s: %s: %s\n", __func__, ofnode_get_name(node), prop_name);
+ dm_warn("%s: %s: %s\n", __func__, ofnode_get_name(node), prop_name);
cell = ofnode_get_property(node, prop_name, &len);
if (!cell || (len < sizeof(fdt_addr_t) * 2)) {
- debug("cell=%p, len=%d\n", cell, len);
+ dm_warn("cell=%p, len=%d\n", cell, len);
return -1;
}
*basep = fdt_addr_to_cpu(*cell);
*sizep = fdt_size_to_cpu(cell[1]);
- debug("%s: base=%08lx, size=%lx\n", __func__, (ulong)*basep,
- (ulong)*sizep);
+ dm_warn("%s: base=%08lx, size=%lx\n", __func__, (ulong)*basep,
+ (ulong)*sizep);
return 0;
}
if (!ofnode_valid(config_node)) {
config_node = ofnode_path("/config");
if (!ofnode_valid(config_node)) {
- debug("%s: Cannot find /config node\n", __func__);
+ dm_warn("%s: Cannot find /config node\n", __func__);
return -ENOENT;
}
}
suffix);
mem = ofnode_read_string(config_node, prop_name);
if (!mem) {
- debug("%s: No memory type for '%s', using /memory\n", __func__,
- prop_name);
+ dm_warn("%s: No memory type for '%s', using /memory\n", __func__,
+ prop_name);
mem = "/memory";
}
node = ofnode_path(mem);
if (!ofnode_valid(node)) {
- debug("%s: Failed to find node '%s'\n", __func__, mem);
+ dm_warn("%s: Failed to find node '%s'\n", __func__, mem);
return -ENOENT;
}
* use the first
*/
if (ofnode_decode_region(node, "reg", &base, &size)) {
- debug("%s: Failed to decode memory region %s\n", __func__,
- mem);
+ dm_warn("%s: Failed to decode memory region %s\n", __func__,
+ mem);
return -EINVAL;
}
suffix);
if (ofnode_decode_region(config_node, prop_name, &offset,
&offset_size)) {
- debug("%s: Failed to decode memory region '%s'\n", __func__,
- prop_name);
+ dm_warn("%s: Failed to decode memory region '%s'\n", __func__,
+ prop_name);
return -EINVAL;
}
#include <dm/of_access.h>
#include <dm/of_addr.h>
#include <dm/ofnode.h>
+#include <dm/util.h>
#include <linux/err.h>
#include <linux/ioport.h>
#include <asm/global_data.h>
int len;
assert(ofnode_valid(node));
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (ofnode_is_np(node))
return of_read_u8(ofnode_to_np(node), propname, outp);
cell = fdt_getprop(gd->fdt_blob, ofnode_to_offset(node), propname,
&len);
if (!cell || len < sizeof(*cell)) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return -EINVAL;
}
*outp = *cell;
- debug("%#x (%u)\n", *outp, *outp);
+ dm_warn("%#x (%u)\n", *outp, *outp);
return 0;
}
int len;
assert(ofnode_valid(node));
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (ofnode_is_np(node))
return of_read_u16(ofnode_to_np(node), propname, outp);
cell = fdt_getprop(gd->fdt_blob, ofnode_to_offset(node), propname,
&len);
if (!cell || len < sizeof(*cell)) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return -EINVAL;
}
*outp = be16_to_cpup(cell);
- debug("%#x (%u)\n", *outp, *outp);
+ dm_warn("%#x (%u)\n", *outp, *outp);
return 0;
}
int len;
assert(ofnode_valid(node));
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (ofnode_is_np(node))
return of_read_u32_index(ofnode_to_np(node), propname, index,
cell = fdt_getprop(ofnode_to_fdt(node), ofnode_to_offset(node),
propname, &len);
if (!cell) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return -EINVAL;
}
if (len < (sizeof(int) * (index + 1))) {
- debug("(not large enough)\n");
+ dm_warn("(not large enough)\n");
return -EOVERFLOW;
}
*outp = fdt32_to_cpu(cell[index]);
- debug("%#x (%u)\n", *outp, *outp);
+ dm_warn("%#x (%u)\n", *outp, *outp);
return 0;
}
cell = fdt_getprop(ofnode_to_fdt(node), ofnode_to_offset(node),
propname, &len);
if (!cell) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return -EINVAL;
}
if (len < (sizeof(u64) * (index + 1))) {
- debug("(not large enough)\n");
+ dm_warn("(not large enough)\n");
return -EOVERFLOW;
}
*outp = fdt64_to_cpu(cell[index]);
- debug("%#llx (%llu)\n", *outp, *outp);
+ dm_warn("%#llx (%llu)\n", *outp, *outp);
return 0;
}
int len;
assert(ofnode_valid(node));
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (ofnode_is_np(node))
return of_read_u64(ofnode_to_np(node), propname, outp);
cell = fdt_getprop(ofnode_to_fdt(node), ofnode_to_offset(node),
propname, &len);
if (!cell || len < sizeof(*cell)) {
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return -EINVAL;
}
*outp = fdt64_to_cpu(cell[0]);
- debug("%#llx (%llu)\n", (unsigned long long)*outp,
- (unsigned long long)*outp);
+ dm_warn("%#llx (%llu)\n", (unsigned long long)*outp,
+ (unsigned long long)*outp);
return 0;
}
bool prop;
assert(ofnode_valid(node));
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
prop = ofnode_has_property(node, propname);
- debug("%s\n", prop ? "true" : "false");
+ dm_warn("%s\n", prop ? "true" : "false");
return prop ? true : false;
}
int len;
assert(ofnode_valid(node));
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (ofnode_is_np(node)) {
struct property *prop = of_find_property(
propname, &len);
}
if (!val) {
- debug("<not found>\n");
+ dm_warn("<not found>\n");
if (sizep)
*sizep = -FDT_ERR_NOTFOUND;
return NULL;
return NULL;
if (strnlen(str, len) >= len) {
- debug("<invalid>\n");
+ dm_warn("<invalid>\n");
return NULL;
}
- debug("%s\n", str);
+ dm_warn("%s\n", str);
return str;
}
ofnode subnode;
assert(ofnode_valid(node));
- debug("%s: %s: ", __func__, subnode_name);
+ dm_warn("%s: %s: ", __func__, subnode_name);
if (ofnode_is_np(node)) {
struct device_node *np = ofnode_to_np(node);
ofnode_to_offset(node), subnode_name);
subnode = noffset_to_ofnode(node, ooffset);
}
- debug("%s\n", ofnode_valid(subnode) ?
- ofnode_get_name(subnode) : "<none>");
+ dm_warn("%s\n", ofnode_valid(subnode) ?
+ ofnode_get_name(subnode) : "<none>");
return subnode;
}
u32 *out_values, size_t sz)
{
assert(ofnode_valid(node));
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
if (ofnode_is_np(node)) {
return of_read_u32_array(ofnode_to_np(node), propname,
const char *ofnode_get_name(ofnode node)
{
if (!ofnode_valid(node)) {
- debug("%s node not valid\n", __func__);
+ dm_warn("%s node not valid\n", __func__);
return NULL;
}
if (!prop)
return ofnode_null();
- debug("%s: node_path: %s\n", __func__, prop);
+ dm_warn("%s: node_path: %s\n", __func__, prop);
return ofnode_path(prop);
}
length = ofnode_read_size(node, name);
if (length < 0) {
- debug("%s: could not find property %s\n",
- ofnode_get_name(node), name);
+ dm_warn("%s: could not find property %s\n",
+ ofnode_get_name(node), name);
return length;
}
int len;
int ret = -ENOENT;
- debug("%s: %s: ", __func__, propname);
+ dm_warn("%s: %s: ", __func__, propname);
/*
* If we follow the pci bus bindings strictly, we should check
int i;
for (i = 0; i < num; i++) {
- debug("pci address #%d: %08lx %08lx %08lx\n", i,
- (ulong)fdt32_to_cpu(cell[0]),
+ dm_warn("pci address #%d: %08lx %08lx %08lx\n", i,
+ (ulong)fdt32_to_cpu(cell[0]),
(ulong)fdt32_to_cpu(cell[1]),
(ulong)fdt32_to_cpu(cell[2]));
if ((fdt32_to_cpu(*cell) & type) == type) {
ret = -EINVAL;
fail:
- debug("(not found)\n");
+ dm_warn("(not found)\n");
return ret;
}
{
assert(ofnode_valid(node));
- debug("%s: %s = %s", __func__, propname, value);
+ dm_warn("%s: %s = %s", __func__, propname, value);
return ofnode_write_prop(node, propname, value, strlen(value) + 1,
false);
uboot = ofnode_path("/options/u-boot");
if (!ofnode_valid(uboot)) {
- debug("%s: Missing /u-boot node\n", __func__);
+ dm_warn("%s: Missing /u-boot node\n", __func__);
return -EINVAL;
}
uboot = ofnode_path("/options/u-boot");
if (!ofnode_valid(uboot)) {
- debug("%s: Missing /u-boot node\n", __func__);
+ dm_warn("%s: Missing /u-boot node\n", __func__);
return -EINVAL;
}
return -EINVAL;
if (!bootscr_flash_size) {
- debug("bootscr-flash-size is zero. Ignoring properties!\n");
+ dm_warn("bootscr-flash-size is zero. Ignoring properties!\n");
*bootscr_flash_offset = 0;
return -EINVAL;
}
if (!strcmp(mode, phy_interface_strings[i]))
return i;
- debug("%s: Invalid PHY interface '%s'\n", __func__, mode);
+ dm_warn("%s: Invalid PHY interface '%s'\n", __func__, mode);
return PHY_INTERFACE_MODE_NA;
}
#include <asm/io.h>
#include <dm/of_addr.h>
#include <dm/devres.h>
+#include <dm/util.h>
#include <linux/ioport.h>
#include <linux/compat.h>
#include <linux/err.h>
ret = of_address_to_resource(ofnode_to_np(node),
index, &r);
if (ret) {
- debug("%s: Could not read resource of range %d (ret = %d)\n",
- ofnode_get_name(node), index, ret);
+ dm_warn("%s: Could not read resource of range %d (ret = %d)\n",
+ ofnode_get_name(node), index, ret);
return ret;
}
addr_len, size_len,
&sz, true);
if (range->start == FDT_ADDR_T_NONE) {
- debug("%s: Could not read start of range %d\n",
- ofnode_get_name(node), index);
+ dm_warn("%s: Could not read start of range %d\n",
+ ofnode_get_name(node), index);
return -EINVAL;
}
addr_len = ofnode_read_simple_addr_cells(ofnode_get_parent(node));
if (addr_len < 0) {
- debug("%s: Error while reading the addr length (ret = %d)\n",
- ofnode_get_name(node), addr_len);
+ dm_warn("%s: Error while reading the addr length (ret = %d)\n",
+ ofnode_get_name(node), addr_len);
return addr_len;
}
size_len = ofnode_read_simple_size_cells(ofnode_get_parent(node));
if (size_len < 0) {
- debug("%s: Error while reading the size length: (ret = %d)\n",
- ofnode_get_name(node), size_len);
+ dm_warn("%s: Error while reading the size length: (ret = %d)\n",
+ ofnode_get_name(node), size_len);
return size_len;
}
addr_len = ofnode_read_simple_addr_cells(ofnode_get_parent(node));
if (addr_len < 0) {
- debug("%s: Error while reading the addr length (ret = %d)\n",
- ofnode_get_name(node), addr_len);
+ dm_warn("%s: Error while reading the addr length (ret = %d)\n",
+ ofnode_get_name(node), addr_len);
return addr_len;
}
size_len = ofnode_read_simple_size_cells(ofnode_get_parent(node));
if (size_len < 0) {
- debug("%s: Error while reading the size length: (ret = %d)\n",
- ofnode_get_name(node), size_len);
+ dm_warn("%s: Error while reading the size length: (ret = %d)\n",
+ ofnode_get_name(node), size_len);
return size_len;
}
both_len = addr_len + size_len;
if (!both_len) {
- debug("%s: Both addr and size length are zero\n",
- ofnode_get_name(node));
+ dm_warn("%s: Both addr and size length are zero\n",
+ ofnode_get_name(node));
return -EINVAL;
}
len = ofnode_read_size(node, "reg");
if (len < 0) {
- debug("%s: Error while reading reg size (ret = %d)\n",
- ofnode_get_name(node), len);
+ dm_warn("%s: Error while reading reg size (ret = %d)\n",
+ ofnode_get_name(node), len);
return len;
}
len /= sizeof(fdt32_t);
count = len / both_len;
if (!count) {
- debug("%s: Not enough data in reg property\n",
- ofnode_get_name(node));
+ dm_warn("%s: Not enough data in reg property\n",
+ ofnode_get_name(node));
return -EINVAL;
}
void *ptr;
if (do_range_check() && range_num >= map->range_count) {
- debug("%s: range index %d larger than range count\n",
- __func__, range_num);
+ dm_warn("%s: range index %d larger than range count\n",
+ __func__, range_num);
return -ERANGE;
}
range = &map->ranges[range_num];
offset <<= map->reg_offset_shift;
if (do_range_check() &&
(offset + val_len > range->size || offset + val_len < offset)) {
- debug("%s: offset/size combination invalid\n", __func__);
+ dm_warn("%s: offset/size combination invalid\n", __func__);
return -ERANGE;
}
break;
#endif
default:
- debug("%s: regmap size %zu unknown\n", __func__, val_len);
+ dm_warn("%s: regmap size %zu unknown\n", __func__, val_len);
return -EINVAL;
}
void *ptr;
if (range_num >= map->range_count) {
- debug("%s: range index %d larger than range count\n",
- __func__, range_num);
+ dm_warn("%s: range index %d larger than range count\n",
+ __func__, range_num);
return -ERANGE;
}
range = &map->ranges[range_num];
offset <<= map->reg_offset_shift;
if (offset + val_len > range->size || offset + val_len < offset) {
- debug("%s: offset/size combination invalid\n", __func__);
+ dm_warn("%s: offset/size combination invalid\n", __func__);
return -ERANGE;
}
break;
#endif
default:
- debug("%s: regmap size %zu unknown\n", __func__, val_len);
+ dm_warn("%s: regmap size %zu unknown\n", __func__, val_len);
return -EINVAL;
}
u.v64 = val;
break;
default:
- debug("%s: regmap size %zu unknown\n", __func__,
- (size_t)map->width);
+ dm_warn("%s: regmap size %zu unknown\n", __func__,
+ (size_t)map->width);
return -EINVAL;
}
err = lists_bind_fdt(parent, node, NULL, NULL, pre_reloc_only);
if (err && !ret) {
ret = err;
- debug("%s: ret=%d\n", node_name, ret);
+ dm_warn("%s: ret=%d\n", node_name, ret);
}
}
ret = dm_scan_fdt(pre_reloc_only);
if (ret) {
- debug("dm_scan_fdt() failed: %d\n", ret);
+ dm_warn("dm_scan_fdt() failed: %d\n", ret);
return ret;
}
for (i = 0; i < ARRAY_SIZE(nodes); i++) {
ret = dm_scan_fdt_ofnode_path(nodes[i], pre_reloc_only);
if (ret) {
- debug("dm_scan_fdt() scan for %s failed: %d\n",
- nodes[i], ret);
+ dm_warn("dm_scan_fdt() scan for %s failed: %d\n",
+ nodes[i], ret);
return ret;
}
}
ret = dm_scan_plat(pre_reloc_only);
if (ret) {
- debug("dm_scan_plat() failed: %d\n", ret);
+ dm_warn("dm_scan_plat() failed: %d\n", ret);
return ret;
}
if (CONFIG_IS_ENABLED(OF_REAL)) {
ret = dm_extended_scan(pre_reloc_only);
if (ret) {
- debug("dm_extended_scan() failed: %d\n", ret);
+ dm_warn("dm_extended_scan() failed: %d\n", ret);
return ret;
}
}
ret = dm_init(CONFIG_IS_ENABLED(OF_LIVE));
if (ret) {
- debug("dm_init() failed: %d\n", ret);
+ dm_warn("dm_init() failed: %d\n", ret);
return ret;
}
if (!CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
*ucp = NULL;
uc_drv = lists_uclass_lookup(id);
if (!uc_drv) {
- debug("Cannot find uclass for id %d: please add the UCLASS_DRIVER() declaration for this UCLASS_... id\n",
- id);
+ dm_warn("Cannot find uclass for id %d: please add the UCLASS_DRIVER() declaration for this UCLASS_... id\n",
+ id);
/*
* Use a strange error to make this case easier to find. When
* a uclass is not available it can prevent driver model from