Re: [PATCH 2/7] soc: qcom: geni-se: Populate clk_perf_tbl with SE source clock frequencies from perf OPP table

From: Praveen Talari

Date: Wed Aug 26 2026 - 11:22:15 EST


HI Konrad,

On 24-08-2026 20:26, Konrad Dybcio wrote:
On 8/4/26 9:57 PM, Praveen Talari wrote:
Currently, on the SA8255P platform, protocol drivers attached via
geni_se_domain_attach() treat each OPP on the perf domain as directly
corresponding to a protocol value such as a baudrate or requested
frequency, and simply request that OPP via
[...]

@@ -1175,6 +1181,29 @@ int geni_se_domain_attach(struct geni_se *se)
else if (ret < 0)
return ret;
+ perf_dev = se->pd_list->pd_devs[DOMAIN_IDX_PERF];
+
+ num_opps = dev_pm_opp_get_opp_count(perf_dev);
+ if (num_opps <= 0)
+ return num_opps < 0 ? num_opps : -ENODEV;
if (num_opps < 0)
return num_opps;
if (num_opps == 0)
return -ENODEV;

+
+ se->clk_perf_tbl = devm_kcalloc(se->dev, num_opps,
+ sizeof(*se->clk_perf_tbl),
+ GFP_KERNEL);
+ if (!se->clk_perf_tbl)
+ return -ENOMEM;
+
+ for (i = 0, level = 0; i < num_opps; i++, level++) {
One iterator is sufficient here

level is not acting as a loop iterator here. It represents the OPP performance level

returned by dev_pm_opp_find_level_ceil(), which may advance to a value greater

than level + 1 depending on the available OPP table entries. The array index, however,

must advance sequentially for each populated entry. Therefore, separate variables are needed.


Thanks,

Praveen Talari


Konrad