From: Nathan Rossi Date: Thu, 7 Jan 2016 17:00:45 +0000 (+1000) Subject: spl: dm: Add SPL_DM_SEQ_ALIAS config option X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4f627c5a59f4f69df156c199d6238849f26fe9af;p=u-boot.git spl: dm: Add SPL_DM_SEQ_ALIAS config option The Device Model sequence alias feature is required by some Uclasses. Instead of disabling the feature for all SPL targets allow it to be configured. The config option is disabled by default to reduce code size for targets that are not interested or do not require this feature. Signed-off-by: Nathan Rossi Acked-by: Simon Glass Acked-by: Michal Simek Cc: Simon Glass Cc: Masahiro Yamada Cc: Linus Walleij Cc: Marek Vasut Cc: Michal Simek Cc: Stefan Roese Signed-off-by: Michal Simek --- diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index f332480e1d..c5c9d2a42e 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -57,6 +57,15 @@ config DM_SEQ_ALIAS bool "Support numbered aliases in device tree" depends on DM default y + help + Most boards will have a '/aliases' node containing the path to + numbered devices (e.g. serial0 = &serial0). This feature can be + disabled if it is not required. + +config SPL_DM_SEQ_ALIAS + bool "Support numbered aliases in device tree in SPL" + depends on DM + default n help Most boards will have a '/aliases' node containing the path to numbered devices (e.g. serial0 = &serial0). This feature can be diff --git a/drivers/core/device.c b/drivers/core/device.c index 758f39064c..b237b88c0a 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -64,7 +64,7 @@ int device_bind(struct udevice *parent, const struct driver *drv, dev->seq = -1; dev->req_seq = -1; - if (CONFIG_IS_ENABLED(OF_CONTROL) && IS_ENABLED(CONFIG_DM_SEQ_ALIAS)) { + if (CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(DM_SEQ_ALIAS)) { /* * Some devices, such as a SPI bus, I2C bus and serial ports * are numbered using aliases. diff --git a/include/config_uncmd_spl.h b/include/config_uncmd_spl.h index 6e299f69ae..3b198ae3ce 100644 --- a/include/config_uncmd_spl.h +++ b/include/config_uncmd_spl.h @@ -29,7 +29,6 @@ #endif #undef CONFIG_DM_WARN -#undef CONFIG_DM_SEQ_ALIAS #undef CONFIG_DM_STDIO #endif /* CONFIG_SPL_BUILD */