lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <77b45165-e6bb-6ed1-f96c-90565740db2f@amd.com>
Date:   Mon, 24 Jul 2023 12:16:41 +0200
From:   Michal Simek <michal.simek@....com>
To:     Sai Krishna Potthuri <sai.krishna.potthuri@....com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Tanmay Shah <tanmay.shah@....com>,
        Ben Levinsky <ben.levinsky@....com>,
        Marek Vasut <marex@...x.de>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Arnd Bergmann <arnd@...db.de>
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org, devicetree@...r.kernel.org,
        saikrishna12468@...il.com, git@....com
Subject: Re: [PATCH v2 2/4] firmware: xilinx: Add version check for TRISTATE
 configuration



On 7/24/23 10:45, Sai Krishna Potthuri wrote:
> Support for configuring TRISTATE parameter is added in ZYNQMP PMUFW(Xilinx
> ZynqMP Platform Management Firmware) Configuration Param Set version 2.0.
> If the requested configuration is TRISTATE and platform is ZYNQMP then
> check the version before requesting Xilinx firmware to set the
> configuration.
> 
> Signed-off-by: Sai Krishna Potthuri <sai.krishna.potthuri@....com>
> ---
>   drivers/firmware/xilinx/zynqmp.c     | 9 +++++++++
>   include/linux/firmware/xlnx-zynqmp.h | 2 ++
>   2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c
> index f9498e7ea694..307717f24a98 100644
> --- a/drivers/firmware/xilinx/zynqmp.c
> +++ b/drivers/firmware/xilinx/zynqmp.c
> @@ -1150,6 +1150,15 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_pinctrl_get_config);
>   int zynqmp_pm_pinctrl_set_config(const u32 pin, const u32 param,
>   				 u32 value)
>   {
> +	int ret;
> +
> +	if (pm_family_code == ZYNQMP_FAMILY_CODE &&
> +	    param == PM_PINCTRL_CONFIG_TRI_STATE) {
> +		ret = zynqmp_pm_feature(PM_PINCTRL_CONFIG_PARAM_SET);
> +		if (ret < PM_PINCTRL_PARAM_SET_VERSION)
> +			return -EOPNOTSUPP;
> +	}
> +
>   	return zynqmp_pm_invoke_fn(PM_PINCTRL_CONFIG_PARAM_SET, pin,
>   				   param, value, 0, NULL);
>   }
> diff --git a/include/linux/firmware/xlnx-zynqmp.h b/include/linux/firmware/xlnx-zynqmp.h
> index d7f94b42ad4c..6359eeea8dd7 100644
> --- a/include/linux/firmware/xlnx-zynqmp.h
> +++ b/include/linux/firmware/xlnx-zynqmp.h
> @@ -34,6 +34,8 @@
>   /* PM API versions */
>   #define PM_API_VERSION_2	2
>   
> +#define PM_PINCTRL_PARAM_SET_VERSION	2
> +
>   #define ZYNQMP_FAMILY_CODE 0x23
>   #define VERSAL_FAMILY_CODE 0x26
>   

Reviewed-by: Michal Simek <michal.simek@....com>

Thanks,
Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ