Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: qcom: mmcc-msm8998: Properly consume GPLL0 inputs

Up until now, the GPLL0_DIV MMSS input has been modeled as a fixed
child of MMSS_GPLL0_DIV that's always-on. Properly representing the
former in the GCC driver makes us unable to keep doing so.

Consume MSS_GPLL0_DIV through fw_name ("gpll0_div") as well as add a
fixed .name link to keep backwards compatibility.

Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Tested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230622-topic-8998clk-v2-4-6222fbc2916b@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Konrad Dybcio and committed by
Bjorn Andersson
932d8c56 9c76c5cf

+8 -27
+8 -27
drivers/clk/qcom/mmcc-msm8998.c
··· 46 46 P_DPLINK, 47 47 }; 48 48 49 - static struct clk_fixed_factor gpll0_div = { 50 - .mult = 1, 51 - .div = 2, 52 - .hw.init = &(struct clk_init_data){ 53 - .name = "mmss_gpll0_div", 54 - .parent_data = &(const struct clk_parent_data){ 55 - .fw_name = "gpll0" 56 - }, 57 - .num_parents = 1, 58 - .ops = &clk_fixed_factor_ops, 59 - }, 60 - }; 61 - 62 49 static const struct clk_div_table post_div_table_fabia_even[] = { 63 50 { 0x0, 1 }, 64 51 { 0x1, 2 }, ··· 341 354 static const struct clk_parent_data mmss_xo_gpll0_gpll0_div[] = { 342 355 { .fw_name = "xo" }, 343 356 { .fw_name = "gpll0" }, 344 - { .hw = &gpll0_div.hw }, 357 + { .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" }, 345 358 }; 346 359 347 360 static const struct parent_map mmss_xo_mmpll0_gpll0_gpll0_div_map[] = { ··· 355 368 { .fw_name = "xo" }, 356 369 { .hw = &mmpll0_out_even.clkr.hw }, 357 370 { .fw_name = "gpll0" }, 358 - { .hw = &gpll0_div.hw }, 371 + { .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" }, 359 372 }; 360 373 361 374 static const struct parent_map mmss_xo_mmpll0_mmpll1_gpll0_gpll0_div_map[] = { ··· 371 384 { .hw = &mmpll0_out_even.clkr.hw }, 372 385 { .hw = &mmpll1_out_even.clkr.hw }, 373 386 { .fw_name = "gpll0" }, 374 - { .hw = &gpll0_div.hw }, 387 + { .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" }, 375 388 }; 376 389 377 390 static const struct parent_map mmss_xo_mmpll0_mmpll5_gpll0_gpll0_div_map[] = { ··· 387 400 { .hw = &mmpll0_out_even.clkr.hw }, 388 401 { .hw = &mmpll5_out_even.clkr.hw }, 389 402 { .fw_name = "gpll0" }, 390 - { .hw = &gpll0_div.hw }, 403 + { .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" }, 391 404 }; 392 405 393 406 static const struct parent_map mmss_xo_mmpll0_mmpll3_mmpll6_gpll0_gpll0_div_map[] = { ··· 405 418 { .hw = &mmpll3_out_even.clkr.hw }, 406 419 { .hw = &mmpll6_out_even.clkr.hw }, 407 420 { .fw_name = "gpll0" }, 408 - { .hw = &gpll0_div.hw }, 421 + { .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" }, 409 422 }; 410 423 411 424 static const struct parent_map mmss_xo_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map[] = { ··· 423 436 { .hw = &mmpll7_out_even.clkr.hw }, 424 437 { .hw = &mmpll10_out_even.clkr.hw }, 425 438 { .fw_name = "gpll0" }, 426 - { .hw = &gpll0_div.hw }, 439 + { .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" }, 427 440 }; 428 441 429 442 static const struct parent_map mmss_xo_mmpll0_mmpll7_mmpll10_gpll0_gpll0_div_map[] = { ··· 441 454 { .hw = &mmpll7_out_even.clkr.hw }, 442 455 { .hw = &mmpll10_out_even.clkr.hw }, 443 456 { .fw_name = "gpll0" }, 444 - { .hw = &gpll0_div.hw }, 457 + { .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" }, 445 458 }; 446 459 447 460 static const struct parent_map mmss_xo_mmpll0_mmpll4_mmpll7_mmpll10_gpll0_gpll0_div_map[] = { ··· 461 474 { .hw = &mmpll7_out_even.clkr.hw }, 462 475 { .hw = &mmpll10_out_even.clkr.hw }, 463 476 { .fw_name = "gpll0" }, 464 - { .hw = &gpll0_div.hw }, 477 + { .fw_name = "gpll0_div", .name = "gcc_mmss_gpll0_div_clk" }, 465 478 }; 466 479 467 480 static struct clk_rcg2 byte0_clk_src = { ··· 2531 2544 }, 2532 2545 }; 2533 2546 2534 - static struct clk_hw *mmcc_msm8998_hws[] = { 2535 - &gpll0_div.hw, 2536 - }; 2537 - 2538 2547 static struct gdsc video_top_gdsc = { 2539 2548 .gdscr = 0x1024, 2540 2549 .pd = { ··· 2838 2855 .num_resets = ARRAY_SIZE(mmcc_msm8998_resets), 2839 2856 .gdscs = mmcc_msm8998_gdscs, 2840 2857 .num_gdscs = ARRAY_SIZE(mmcc_msm8998_gdscs), 2841 - .clk_hws = mmcc_msm8998_hws, 2842 - .num_clk_hws = ARRAY_SIZE(mmcc_msm8998_hws), 2843 2858 }; 2844 2859 2845 2860 static const struct of_device_id mmcc_msm8998_match_table[] = {