Skip to content

Commit f579038

Browse files
committed
clk: qcom: rpmh: Reuse sdm845 clks for sm8150
The SM8150 list of clks is almost the same as the list for SDM845, except there isn't an IPA clk. Just point to the SDM845 clks from the SM8150 list for now so we can reduce the amount of struct bloat in this driver. Suggested-by: Vinod Koul <[email protected]> Cc: Taniya Das <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Reviewed-by: Vinod Koul <[email protected]>
1 parent 3f7df5b commit f579038

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

drivers/clk/qcom/clk-rpmh.c

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,14 @@ static const struct clk_ops clk_rpmh_bcm_ops = {
334334
.recalc_rate = clk_rpmh_bcm_recalc_rate,
335335
};
336336

337-
/* Resource name must match resource id present in cmd-db. */
337+
/* Resource name must match resource id present in cmd-db */
338338
DEFINE_CLK_RPMH_ARC(sdm845, bi_tcxo, bi_tcxo_ao, "xo.lvl", 0x3, 2);
339339
DEFINE_CLK_RPMH_VRM(sdm845, ln_bb_clk2, ln_bb_clk2_ao, "lnbclka2", 2);
340340
DEFINE_CLK_RPMH_VRM(sdm845, ln_bb_clk3, ln_bb_clk3_ao, "lnbclka3", 2);
341341
DEFINE_CLK_RPMH_VRM(sdm845, rf_clk1, rf_clk1_ao, "rfclka1", 1);
342342
DEFINE_CLK_RPMH_VRM(sdm845, rf_clk2, rf_clk2_ao, "rfclka2", 1);
343343
DEFINE_CLK_RPMH_VRM(sdm845, rf_clk3, rf_clk3_ao, "rfclka3", 1);
344+
DEFINE_CLK_RPMH_VRM(sm8150, rf_clk3, rf_clk3_ao, "rfclka3", 1);
344345
DEFINE_CLK_RPMH_BCM(sdm845, ipa, "IP0");
345346

346347
static struct clk_hw *sdm845_rpmh_clocks[] = {
@@ -364,26 +365,19 @@ static const struct clk_rpmh_desc clk_rpmh_sdm845 = {
364365
.num_clks = ARRAY_SIZE(sdm845_rpmh_clocks),
365366
};
366367

367-
DEFINE_CLK_RPMH_ARC(sm8150, bi_tcxo, bi_tcxo_ao, "xo.lvl", 0x3, 2);
368-
DEFINE_CLK_RPMH_VRM(sm8150, ln_bb_clk2, ln_bb_clk2_ao, "lnbclka2", 2);
369-
DEFINE_CLK_RPMH_VRM(sm8150, ln_bb_clk3, ln_bb_clk3_ao, "lnbclka3", 2);
370-
DEFINE_CLK_RPMH_VRM(sm8150, rf_clk1, rf_clk1_ao, "rfclka1", 1);
371-
DEFINE_CLK_RPMH_VRM(sm8150, rf_clk2, rf_clk2_ao, "rfclka2", 1);
372-
DEFINE_CLK_RPMH_VRM(sm8150, rf_clk3, rf_clk3_ao, "rfclka3", 1);
373-
374368
static struct clk_hw *sm8150_rpmh_clocks[] = {
375-
[RPMH_CXO_CLK] = &sm8150_bi_tcxo.hw,
376-
[RPMH_CXO_CLK_A] = &sm8150_bi_tcxo_ao.hw,
377-
[RPMH_LN_BB_CLK2] = &sm8150_ln_bb_clk2.hw,
378-
[RPMH_LN_BB_CLK2_A] = &sm8150_ln_bb_clk2_ao.hw,
379-
[RPMH_LN_BB_CLK3] = &sm8150_ln_bb_clk3.hw,
380-
[RPMH_LN_BB_CLK3_A] = &sm8150_ln_bb_clk3_ao.hw,
381-
[RPMH_RF_CLK1] = &sm8150_rf_clk1.hw,
382-
[RPMH_RF_CLK1_A] = &sm8150_rf_clk1_ao.hw,
383-
[RPMH_RF_CLK2] = &sm8150_rf_clk2.hw,
384-
[RPMH_RF_CLK2_A] = &sm8150_rf_clk2_ao.hw,
385-
[RPMH_RF_CLK3] = &sm8150_rf_clk3.hw,
386-
[RPMH_RF_CLK3_A] = &sm8150_rf_clk3_ao.hw,
369+
[RPMH_CXO_CLK] = &sdm845_bi_tcxo.hw,
370+
[RPMH_CXO_CLK_A] = &sdm845_bi_tcxo_ao.hw,
371+
[RPMH_LN_BB_CLK2] = &sdm845_ln_bb_clk2.hw,
372+
[RPMH_LN_BB_CLK2_A] = &sdm845_ln_bb_clk2_ao.hw,
373+
[RPMH_LN_BB_CLK3] = &sdm845_ln_bb_clk3.hw,
374+
[RPMH_LN_BB_CLK3_A] = &sdm845_ln_bb_clk3_ao.hw,
375+
[RPMH_RF_CLK1] = &sdm845_rf_clk1.hw,
376+
[RPMH_RF_CLK1_A] = &sdm845_rf_clk1_ao.hw,
377+
[RPMH_RF_CLK2] = &sdm845_rf_clk2.hw,
378+
[RPMH_RF_CLK2_A] = &sdm845_rf_clk2_ao.hw,
379+
[RPMH_RF_CLK3] = &sdm845_rf_clk3.hw,
380+
[RPMH_RF_CLK3_A] = &sdm845_rf_clk3_ao.hw,
387381
};
388382

389383
static const struct clk_rpmh_desc clk_rpmh_sm8150 = {

0 commit comments

Comments
 (0)