]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm64: zynqmp: Add missing ZYNQMP_FIRMWARE dependencies
authorAlgapally Santosh Sagar <santoshsagar.algapally@amd.com>
Wed, 1 Feb 2023 09:55:53 +0000 (02:55 -0700)
committerMichal Simek <michal.simek@amd.com>
Thu, 9 Mar 2023 12:14:59 +0000 (13:14 +0100)
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>
Link: https://lore.kernel.org/r/20230201095553.11219-1-ashok.reddy.soma@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
board/xilinx/zynqmp/Kconfig
drivers/clk/Kconfig
drivers/fpga/Kconfig
drivers/mmc/zynq_sdhci.c
drivers/net/zynq_gem.c

index 7d1f7398c3e99e0601b4b844b591a20164931a87..ffa2f0215d413ce07aa1f3ec3ac8877ea8af36d7 100644 (file)
@@ -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"
index 09aa97ee8c0e9673419f8ea1b97b3c5eb8a600a0..42280cbf83a73f0ea09ffb662cd6d6aa54bd2f38 100644 (file)
@@ -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.
index 61490d6d8de845616657c01260b20922626a13ea..62cb77b098cb5c2510baa2cfcea3ef97b5496004 100644 (file)
@@ -75,7 +75,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.
index 91e309d2752f22b3963bd2c6a40d9e1ff16b17c8..8b559d8a7ab062d04200a9cffa9b6b185b1eb127 100644 (file)
@@ -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);
index cc49788012f30bd6cc90da98fae0fe6d5a9b7607..211b2c6e5561eab435e7c046c79b3da9e36f416e 100644 (file)
@@ -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),