All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] spl: dm: Add SPL_DM_SEQ_ALIAS config option
Date: Fri, 11 Dec 2015 16:07:56 +0100	[thread overview]
Message-ID: <201512111607.56816.marex@denx.de> (raw)
In-Reply-To: <1449845290-31114-2-git-send-email-nathan@nathanrossi.com>

On Friday, December 11, 2015 at 03:48:09 PM, Nathan Rossi wrote:
> 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 <nathan@nathanrossi.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Michal Simek <michal.simek@xilinx.com>
> ---
> Based on a small amount of inspection for the Zynq platform, enabling
> this config option adds ~1KB of code size.
> 
> Also on a side note, this might affect the socfpga target as it forcibly
> overrides the #undef from config_uncmd_spl.h in its common header. I
> have Cc'd the respective maintainer for this reason.

The fix for SoCFPGA is easy -- enable the SPL_DM_SEQ_ALIAS in configs/socfpga*.
It is needed for booting from QSPI NOR.

> ---
>  drivers/core/Kconfig       | 9 +++++++++
>  drivers/core/device.c      | 2 +-
>  include/config_uncmd_spl.h | 1 -
>  3 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
> index 53acee0..97aa01e 100644
> --- a/drivers/core/Kconfig
> +++ b/drivers/core/Kconfig
> @@ -60,6 +60,15 @@ config DM_SEQ_ALIAS
>  	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
>  	  disabled if it is not required, to save code space in SPL.
> 
>  config REGMAP
> diff --git a/drivers/core/device.c b/drivers/core/device.c
> index 758f390..b237b88 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 6e299f6..3b198ae 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 */

  reply	other threads:[~2015-12-11 15:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 14:48 [U-Boot] [PATCH 0/2] Change DM_SEQ_ALIAS to be configurable for SPL Nathan Rossi
2015-12-11 14:48 ` [U-Boot] [PATCH 1/2] spl: dm: Add SPL_DM_SEQ_ALIAS config option Nathan Rossi
2015-12-11 15:07   ` Marek Vasut [this message]
2015-12-11 15:46     ` Michal Simek
2015-12-11 17:32       ` Marek Vasut
2015-12-12 12:05         ` Stefan Roese
2015-12-12 14:08           ` Nathan Rossi
2015-12-12 15:38             ` Marek Vasut
2015-12-14  6:26             ` Stefan Roese
2015-12-14  7:29               ` Michal Simek
2015-12-30  5:52                 ` Nathan Rossi
2015-12-30  9:02                   ` Marek Vasut
2015-12-11 15:47   ` Simon Glass
2015-12-11 14:48 ` [U-Boot] [PATCH 2/2] arm: zynq: Enable SPL_DM_SEQ_ALIAS for all Zynq configs Nathan Rossi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201512111607.56816.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.