mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
dm: core: Allow device_bind() to used without CONFIG_OF_CONTROL
The sequence number support in driver model requires device tree control. It should be skipped if CONFIG_OF_CONTROL is not defined, and should not require functions from fdtdec. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -106,13 +106,16 @@ int device_bind(struct udevice *parent, struct driver *drv, const char *name,
|
|||||||
* a 'requested' sequence, and will be resolved (and ->seq updated)
|
* a 'requested' sequence, and will be resolved (and ->seq updated)
|
||||||
* when the device is probed.
|
* when the device is probed.
|
||||||
*/
|
*/
|
||||||
dev->req_seq = fdtdec_get_int(gd->fdt_blob, of_offset, "reg", -1);
|
|
||||||
dev->seq = -1;
|
dev->seq = -1;
|
||||||
|
#ifdef CONFIG_OF_CONTROL
|
||||||
|
dev->req_seq = fdtdec_get_int(gd->fdt_blob, of_offset, "reg", -1);
|
||||||
if (uc->uc_drv->name && of_offset != -1) {
|
if (uc->uc_drv->name && of_offset != -1) {
|
||||||
fdtdec_get_alias_seq(gd->fdt_blob, uc->uc_drv->name, of_offset,
|
fdtdec_get_alias_seq(gd->fdt_blob, uc->uc_drv->name, of_offset,
|
||||||
&dev->req_seq);
|
&dev->req_seq);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
dev->req_seq = -1;
|
||||||
|
#endif
|
||||||
if (!dev->platdata && drv->platdata_auto_alloc_size)
|
if (!dev->platdata && drv->platdata_auto_alloc_size)
|
||||||
dev->flags |= DM_FLAG_ALLOC_PDATA;
|
dev->flags |= DM_FLAG_ALLOC_PDATA;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user