diff options
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/Kconfig | 0 | ||||
-rw-r--r-- | drivers/core/Makefile | 2 | ||||
-rw-r--r-- | drivers/core/device.c | 9 |
3 files changed, 8 insertions, 3 deletions
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/drivers/core/Kconfig diff --git a/drivers/core/Makefile b/drivers/core/Makefile index 90b2a7f..c7905b1 100644 --- a/drivers/core/Makefile +++ b/drivers/core/Makefile @@ -4,4 +4,4 @@ # SPDX-License-Identifier: GPL-2.0+ # -obj-$(CONFIG_DM) := device.o lists.o root.o uclass.o util.o +obj-y := device.o lists.o root.o uclass.o util.o diff --git a/drivers/core/device.c b/drivers/core/device.c index 166b073..32e80e8 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -106,13 +106,18 @@ int device_bind(struct udevice *parent, struct driver *drv, const char *name, * a 'requested' sequence, and will be resolved (and ->seq updated) * when the device is probed. */ - dev->req_seq = fdtdec_get_int(gd->fdt_blob, of_offset, "reg", -1); dev->seq = -1; +#ifdef CONFIG_OF_CONTROL + dev->req_seq = fdtdec_get_int(gd->fdt_blob, of_offset, "reg", -1); + if (!IS_ERR_VALUE(dev->req_seq)) + dev->req_seq &= INT_MAX; if (uc->uc_drv->name && of_offset != -1) { fdtdec_get_alias_seq(gd->fdt_blob, uc->uc_drv->name, of_offset, &dev->req_seq); } - +#else + dev->req_seq = -1; +#endif if (!dev->platdata && drv->platdata_auto_alloc_size) dev->flags |= DM_FLAG_ALLOC_PDATA; |