diff options
author | Simon Glass <sjg@chromium.org> | 2015-02-28 05:06:30 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-23 15:05:51 (GMT) |
commit | 36fa61dc612e363fb60840a06333fc37ec3fb68e (patch) | |
tree | 51115d5d2bd9a6e6c6c1583d537e48f0c321bd31 /drivers/core/device.c | |
parent | ab9fd2e83a0f781534fbb8a2b88c724a29b7f20a (diff) | |
download | u-boot-36fa61dc612e363fb60840a06333fc37ec3fb68e.tar.xz |
dm: core: Allow sequence alias support to be removed for SPL
In many cases SPL only uses a single serial port and there is no need for
alias sequence support. We will just use the serial port pointed to by
stdout-path in the /chosen node.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r-- | drivers/core/device.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index df81b8e..7f24243 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -56,21 +56,23 @@ int device_bind(struct udevice *parent, const struct driver *drv, dev->seq = -1; dev->req_seq = -1; -#ifdef CONFIG_OF_CONTROL - /* - * Some devices, such as a SPI bus, I2C bus and serial ports are - * numbered using aliases. - * - * This is just a 'requested' sequence, and will be - * resolved (and ->seq updated) when the device is probed. - */ - if (uc->uc_drv->flags & DM_UC_FLAG_SEQ_ALIAS) { - if (uc->uc_drv->name && of_offset != -1) { - fdtdec_get_alias_seq(gd->fdt_blob, uc->uc_drv->name, - of_offset, &dev->req_seq); + if (IS_ENABLED(CONFIG_OF_CONTROL) && IS_ENABLED(CONFIG_DM_SEQ_ALIAS)) { + /* + * Some devices, such as a SPI bus, I2C bus and serial ports + * are numbered using aliases. + * + * This is just a 'requested' sequence, and will be + * resolved (and ->seq updated) when the device is probed. + */ + if (uc->uc_drv->flags & DM_UC_FLAG_SEQ_ALIAS) { + if (uc->uc_drv->name && of_offset != -1) { + fdtdec_get_alias_seq(gd->fdt_blob, + uc->uc_drv->name, of_offset, + &dev->req_seq); + } } } -#endif + if (!dev->platdata && drv->platdata_auto_alloc_size) { dev->flags |= DM_FLAG_ALLOC_PDATA; dev->platdata = calloc(1, drv->platdata_auto_alloc_size); |