public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Ashok Reddy Soma <ashok.reddy.soma@amd.com>, <u-boot@lists.denx.de>
Cc: <lukma@denx.de>, <seanga2@gmail.com>, <peng.fan@nxp.com>,
	<jh80.chung@samsung.com>, <joe.hershberger@ni.com>,
	<rfried.dev@gmail.com>, <git@amd.com>,
	Algapally Santosh Sagar <santoshsagar.algapally@amd.com>
Subject: Re: [PATCH] arm64: zynqmp: Add missing ZYNQMP_FIRMWARE dependencies
Date: Fri, 3 Feb 2023 14:29:28 +0100	[thread overview]
Message-ID: <2b24632b-182b-8b42-e592-12caea0ac16d@amd.com> (raw)
In-Reply-To: <20230201095553.11219-1-ashok.reddy.soma@amd.com>



On 2/1/23 10:55, Ashok Reddy Soma wrote:
> From: Algapally Santosh Sagar <santoshsagar.algapally@amd.com>
> 
> There are missing Kconfig dependencies in the code which is using
> firmware interface.
> The commit 71efd45a5fc7 ("arm64: zynqmp: Change firmware dependency")
> add option to also disable ZYNQMP_FIRMWARE. But not all Kconfig
> dependencies were properly described and also sdhci and gem drivers
> didn't protect the code properly.
> So, add the missing ZYNQMP_FIRMWARE dependencies.
> 
> Signed-off-by: Algapally Santosh Sagar <santoshsagar.algapally@amd.com>
> Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com>
> ---
> 
>   board/xilinx/zynqmp/Kconfig | 1 +
>   drivers/clk/Kconfig         | 4 ++--
>   drivers/fpga/Kconfig        | 2 +-
>   drivers/mmc/zynq_sdhci.c    | 4 ++--
>   drivers/net/zynq_gem.c      | 2 +-
>   5 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/board/xilinx/zynqmp/Kconfig b/board/xilinx/zynqmp/Kconfig
> index 7d1f7398c3..ffa2f0215d 100644
> --- a/board/xilinx/zynqmp/Kconfig
> +++ b/board/xilinx/zynqmp/Kconfig
> @@ -6,6 +6,7 @@ if ARCH_ZYNQMP
>   
>   config CMD_ZYNQMP
>   	bool "Enable ZynqMP specific commands"
> +	depends on ZYNQMP_FIRMWARE
>   	default y
>   	help
>   	  Enable ZynqMP specific commands like "zynqmp secure"
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 09aa97ee8c..42280cbf83 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -185,7 +185,7 @@ config CLK_VERSACLOCK
>   config CLK_VERSAL
>   	bool "Enable clock driver support for Versal"
>   	depends on (ARCH_VERSAL || ARCH_VERSAL_NET)
> -	select ZYNQMP_FIRMWARE
> +	imply ZYNQMP_FIRMWARE
>   	help
>   	  This clock driver adds support for clock realted settings for
>   	  Versal platform.
> @@ -219,7 +219,7 @@ config CLK_ZYNQ
>   config CLK_ZYNQMP
>   	bool "Enable clock driver support for ZynqMP"
>   	depends on ARCH_ZYNQMP
> -	select ZYNQMP_FIRMWARE
> +	imply ZYNQMP_FIRMWARE
>   	help
>   	  This clock driver adds support for clock realted settings for
>   	  ZynqMP platform.
> diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
> index 4113de230c..f8b0aeb3ee 100644
> --- a/drivers/fpga/Kconfig
> +++ b/drivers/fpga/Kconfig
> @@ -63,7 +63,7 @@ config FPGA_XILINX
>   
>   config FPGA_ZYNQMPPL
>   	bool "Enable Xilinx FPGA driver for ZynqMP"
> -	depends on FPGA_XILINX
> +	depends on FPGA_XILINX && ZYNQMP_FIRMWARE
>   	help
>   	  Enable FPGA driver for loading bitstream in BIT and BIN format
>   	  on Xilinx Zynq UltraScale+ (ZynqMP) device.
> diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
> index 91e309d275..8b559d8a7a 100644
> --- a/drivers/mmc/zynq_sdhci.c
> +++ b/drivers/mmc/zynq_sdhci.c
> @@ -988,7 +988,7 @@ static const struct sdhci_ops arasan_ops = {
>   };
>   #endif
>   
> -#if defined(CONFIG_ARCH_ZYNQMP)
> +#if defined(CONFIG_ARCH_ZYNQMP) && defined(CONFIG_ZYNQMP_FIRMWARE)
>   static int sdhci_zynqmp_set_dynamic_config(struct arasan_sdhci_priv *priv,
>   					   struct udevice *dev)
>   {
> @@ -1090,7 +1090,7 @@ static int arasan_sdhci_probe(struct udevice *dev)
>   
>   	host = priv->host;
>   
> -#if defined(CONFIG_ARCH_ZYNQMP)
> +#if defined(CONFIG_ARCH_ZYNQMP) && defined(CONFIG_ZYNQMP_FIRMWARE)
>   	if (device_is_compatible(dev, "xlnx,zynqmp-8.9a")) {
>   		ret = zynqmp_pm_is_function_supported(PM_IOCTL,
>   						      IOCTL_SET_SD_CONFIG);
> diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
> index cc49788012..211b2c6e55 100644
> --- a/drivers/net/zynq_gem.c
> +++ b/drivers/net/zynq_gem.c
> @@ -738,7 +738,7 @@ static int gem_zynqmp_set_dynamic_config(struct udevice *dev)
>   	u32 pm_info[2];
>   	int ret;
>   
> -	if (IS_ENABLED(CONFIG_ARCH_ZYNQMP)) {
> +	if (IS_ENABLED(CONFIG_ARCH_ZYNQMP) && IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE)) {
>   		if (!zynqmp_pm_is_function_supported(PM_IOCTL,
>   						     IOCTL_SET_GEM_CONFIG)) {
>   			ret = ofnode_read_u32_array(dev_ofnode(dev),

Applied.
M

      reply	other threads:[~2023-02-03 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01  9:55 [PATCH] arm64: zynqmp: Add missing ZYNQMP_FIRMWARE dependencies Ashok Reddy Soma
2023-02-03 13:29 ` Michal Simek [this message]

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=2b24632b-182b-8b42-e592-12caea0ac16d@amd.com \
    --to=michal.simek@amd.com \
    --cc=ashok.reddy.soma@amd.com \
    --cc=git@amd.com \
    --cc=jh80.chung@samsung.com \
    --cc=joe.hershberger@ni.com \
    --cc=lukma@denx.de \
    --cc=peng.fan@nxp.com \
    --cc=rfried.dev@gmail.com \
    --cc=santoshsagar.algapally@amd.com \
    --cc=seanga2@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox