[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <61232fd6-2b76-4ab0-af64-2d49ae405610@linaro.org>
Date: Tue, 12 Mar 2024 02:05:05 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Unnathi Chalicheemala <quic_uchalich@...cinc.com>,
Bjorn Andersson <andersson@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel@...cinc.com
Subject: Re: [PATCH v3 2/5] soc: qcom: llcc: Add regmap for Broadcast_AND
region
On 2/23/24 00:07, Unnathi Chalicheemala wrote:
> Define new regmap structure for Broadcast_AND region and initialize
> this regmap when HW block version is greater than 4.1, otherwise
> initialize as a NULL pointer for backwards compatibility.
>
> Switch from broadcast_OR to broadcast_AND region (when defined in DT)
> for checking status bit 1 as Broadcast_OR region checks only for bit 0.
>
> Signed-off-by: Unnathi Chalicheemala <quic_uchalich@...cinc.com>
> ---
> drivers/soc/qcom/llcc-qcom.c | 15 ++++++++++++++-
> include/linux/soc/qcom/llcc-qcom.h | 4 +++-
> 2 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
> index 4ca88eaebf06..cfdc7d9d7773 100644
> --- a/drivers/soc/qcom/llcc-qcom.c
> +++ b/drivers/soc/qcom/llcc-qcom.c
> @@ -826,6 +826,7 @@ static int llcc_update_act_ctrl(u32 sid,
> u32 status_reg;
> u32 slice_status;
> int ret;
> + struct regmap *regmap;
Reverse-Christmas-tree, please
>
> if (IS_ERR(drv_data))
> return PTR_ERR(drv_data);
> @@ -849,7 +850,9 @@ static int llcc_update_act_ctrl(u32 sid,
> return ret;
>
> if (drv_data->version >= LLCC_VERSION_4_1_0_0) {
> - ret = regmap_read_poll_timeout(drv_data->bcast_regmap, status_reg,
> + regmap = (!drv_data->bcast_and_regmap) ? drv_data->bcast_regmap
> + : drv_data->bcast_and_regmap;
<raised eyebrow emoji>
regmap = drv_data->bcast_and_regmap ?: drv_data->bcast_regmap
Konrad
Powered by blists - more mailing lists