aboutsummaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-07-27 06:59:55 -0400
committerTom Rini <trini@konsulko.com>2022-07-27 06:59:55 -0400
commit7277c4bddceb6b8a59ba47b8b111ab070d86919f (patch)
tree0bd1db6551763d178d25e80a350be458150c9e8e /drivers/core
parent81e712a91729950fbd8fb38a6f729cb9847b0adb (diff)
parentdce4322c0e1940e11ef9ff086890b8c474707317 (diff)
Merge tag 'dm-pull-26jul22' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm.git
minor dm- and fdt-related fixes start of test for fdt command
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/Kconfig2
-rw-r--r--drivers/core/acpi.c4
-rw-r--r--drivers/core/lists.c15
3 files changed, 13 insertions, 8 deletions
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 8eb0070d22..007dc6a1de 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -18,7 +18,7 @@ config SPL_DM
consider using CONFIG_SPL_SYS_MALLOC_SIMPLE. In that case you
must provide CONFIG_SPL_SYS_MALLOC_F_LEN to set the size.
In most cases driver model will only allocate a few uclasses
- and devices in SPL, so 1KB should be enable. See
+ and devices in SPL, so 1KB should be enough. See
CONFIG_SPL_SYS_MALLOC_F_LEN for more details on how to enable it.
config TPL_DM
diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c
index 0df58dbc0d..8457733edb 100644
--- a/drivers/core/acpi.c
+++ b/drivers/core/acpi.c
@@ -159,8 +159,8 @@ static int add_item(struct acpi_ctx *ctx, struct udevice *dev,
memcpy(item->buf, start, item->size);
}
item_count++;
- log_debug("* %s: Added type %d, %p, size %x\n", dev->name, type, start,
- item->size);
+ log_debug("* %s: Added type %d, %p, size %x\n",
+ dev ? dev->name : "other", type, start, item->size);
return 0;
}
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 22ccd9faaa..c49695b24f 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -223,10 +223,14 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
compat);
for (entry = driver; entry != driver + n_ents; entry++) {
+ if (drv) {
+ if (drv != entry)
+ continue;
+ if (!entry->of_match)
+ break;
+ }
ret = driver_check_compatible(entry->of_match, &id,
compat);
- if ((drv) && (drv == entry))
- break;
if (!ret)
break;
}
@@ -241,9 +245,10 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
}
}
- log_debug(" - found match at '%s': '%s' matches '%s'\n",
- entry->name, entry->of_match->compatible,
- id->compatible);
+ if (entry->of_match)
+ log_debug(" - found match at '%s': '%s' matches '%s'\n",
+ entry->name, entry->of_match->compatible,
+ id->compatible);
ret = device_bind_with_driver_data(parent, entry, name,
id->data, node, &dev);
if (ret == -ENODEV) {