Re: [PATCH v6 8/9] soc: qcom: cpr3: Add IPQ9574 definitions

From: Konrad Dybcio
Date: Wed Jul 10 2024 - 07:12:41 EST


On 10.07.2024 8:11 AM, Varadarajan Narayanan wrote:
> From: Praveenkumar I <quic_ipkumar@xxxxxxxxxxx>
>
> * Add thread, scaling factor, CPR descriptor defines to enable
> CPR on IPQ9574.
>
> * Skip 'acc' usage since IPQ9574 does not have acc
>
> Signed-off-by: Praveenkumar I <quic_ipkumar@xxxxxxxxxxx>
> Signed-off-by: Varadarajan Narayanan <quic_varada@xxxxxxxxxxx>
> ---

[...]

>
> /* CPRh disallows MEM-ACC access from the HLOS */
> - if (!(data->acc_desc || desc->cpr_type == CTRL_TYPE_CPRH))
> + if (!(data->acc_desc || desc->cpr_type == CTRL_TYPE_CPRH ||
> + of_device_is_compatible(dev->of_node, "qcom,ipq9574-cpr4")))
> return dev_err_probe(dev, -EINVAL, "Invalid ACC data\n");

This is something I'd also like to fold into v16.. perhaps

if (data->acc_desc && desc->cpr_type == CTRL_TYPE_CPRH)

could work instead? this way we trust the programmer that
acc_desc's presence/absence is intentional and only throw and
error if it's present with type == CPRH

Konrad