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: gcc-msm8916: move GPLL definitions up

Move GPLL definitions up, before the clock parent tables, so that we can
use gpll hw clock fields in the parent_data/parent_hws tables.

Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220704172453.838303-5-dmitry.baryshkov@linaro.org

authored by

Dmitry Baryshkov and committed by
Bjorn Andersson
69da4290 5a6d3067

+108 -108
+108 -108
drivers/clk/qcom/gcc-msm8916.c
··· 42 42 P_EXT_MCLK, 43 43 }; 44 44 45 + static struct clk_pll gpll0 = { 46 + .l_reg = 0x21004, 47 + .m_reg = 0x21008, 48 + .n_reg = 0x2100c, 49 + .config_reg = 0x21010, 50 + .mode_reg = 0x21000, 51 + .status_reg = 0x2101c, 52 + .status_bit = 17, 53 + .clkr.hw.init = &(struct clk_init_data){ 54 + .name = "gpll0", 55 + .parent_names = (const char *[]){ "xo" }, 56 + .num_parents = 1, 57 + .ops = &clk_pll_ops, 58 + }, 59 + }; 60 + 61 + static struct clk_regmap gpll0_vote = { 62 + .enable_reg = 0x45000, 63 + .enable_mask = BIT(0), 64 + .hw.init = &(struct clk_init_data){ 65 + .name = "gpll0_vote", 66 + .parent_names = (const char *[]){ "gpll0" }, 67 + .num_parents = 1, 68 + .ops = &clk_pll_vote_ops, 69 + }, 70 + }; 71 + 72 + static struct clk_pll gpll1 = { 73 + .l_reg = 0x20004, 74 + .m_reg = 0x20008, 75 + .n_reg = 0x2000c, 76 + .config_reg = 0x20010, 77 + .mode_reg = 0x20000, 78 + .status_reg = 0x2001c, 79 + .status_bit = 17, 80 + .clkr.hw.init = &(struct clk_init_data){ 81 + .name = "gpll1", 82 + .parent_names = (const char *[]){ "xo" }, 83 + .num_parents = 1, 84 + .ops = &clk_pll_ops, 85 + }, 86 + }; 87 + 88 + static struct clk_regmap gpll1_vote = { 89 + .enable_reg = 0x45000, 90 + .enable_mask = BIT(1), 91 + .hw.init = &(struct clk_init_data){ 92 + .name = "gpll1_vote", 93 + .parent_names = (const char *[]){ "gpll1" }, 94 + .num_parents = 1, 95 + .ops = &clk_pll_vote_ops, 96 + }, 97 + }; 98 + 99 + static struct clk_pll gpll2 = { 100 + .l_reg = 0x4a004, 101 + .m_reg = 0x4a008, 102 + .n_reg = 0x4a00c, 103 + .config_reg = 0x4a010, 104 + .mode_reg = 0x4a000, 105 + .status_reg = 0x4a01c, 106 + .status_bit = 17, 107 + .clkr.hw.init = &(struct clk_init_data){ 108 + .name = "gpll2", 109 + .parent_names = (const char *[]){ "xo" }, 110 + .num_parents = 1, 111 + .ops = &clk_pll_ops, 112 + }, 113 + }; 114 + 115 + static struct clk_regmap gpll2_vote = { 116 + .enable_reg = 0x45000, 117 + .enable_mask = BIT(2), 118 + .hw.init = &(struct clk_init_data){ 119 + .name = "gpll2_vote", 120 + .parent_names = (const char *[]){ "gpll2" }, 121 + .num_parents = 1, 122 + .ops = &clk_pll_vote_ops, 123 + }, 124 + }; 125 + 126 + static struct clk_pll bimc_pll = { 127 + .l_reg = 0x23004, 128 + .m_reg = 0x23008, 129 + .n_reg = 0x2300c, 130 + .config_reg = 0x23010, 131 + .mode_reg = 0x23000, 132 + .status_reg = 0x2301c, 133 + .status_bit = 17, 134 + .clkr.hw.init = &(struct clk_init_data){ 135 + .name = "bimc_pll", 136 + .parent_names = (const char *[]){ "xo" }, 137 + .num_parents = 1, 138 + .ops = &clk_pll_ops, 139 + }, 140 + }; 141 + 142 + static struct clk_regmap bimc_pll_vote = { 143 + .enable_reg = 0x45000, 144 + .enable_mask = BIT(3), 145 + .hw.init = &(struct clk_init_data){ 146 + .name = "bimc_pll_vote", 147 + .parent_names = (const char *[]){ "bimc_pll" }, 148 + .num_parents = 1, 149 + .ops = &clk_pll_vote_ops, 150 + }, 151 + }; 152 + 45 153 static const struct parent_map gcc_xo_gpll0_map[] = { 46 154 { P_XO, 0 }, 47 155 { P_GPLL0, 1 }, ··· 362 254 "gpll1_vote", 363 255 "ext_mclk", 364 256 "sleep_clk", 365 - }; 366 - 367 - static struct clk_pll gpll0 = { 368 - .l_reg = 0x21004, 369 - .m_reg = 0x21008, 370 - .n_reg = 0x2100c, 371 - .config_reg = 0x21010, 372 - .mode_reg = 0x21000, 373 - .status_reg = 0x2101c, 374 - .status_bit = 17, 375 - .clkr.hw.init = &(struct clk_init_data){ 376 - .name = "gpll0", 377 - .parent_names = (const char *[]){ "xo" }, 378 - .num_parents = 1, 379 - .ops = &clk_pll_ops, 380 - }, 381 - }; 382 - 383 - static struct clk_regmap gpll0_vote = { 384 - .enable_reg = 0x45000, 385 - .enable_mask = BIT(0), 386 - .hw.init = &(struct clk_init_data){ 387 - .name = "gpll0_vote", 388 - .parent_names = (const char *[]){ "gpll0" }, 389 - .num_parents = 1, 390 - .ops = &clk_pll_vote_ops, 391 - }, 392 - }; 393 - 394 - static struct clk_pll gpll1 = { 395 - .l_reg = 0x20004, 396 - .m_reg = 0x20008, 397 - .n_reg = 0x2000c, 398 - .config_reg = 0x20010, 399 - .mode_reg = 0x20000, 400 - .status_reg = 0x2001c, 401 - .status_bit = 17, 402 - .clkr.hw.init = &(struct clk_init_data){ 403 - .name = "gpll1", 404 - .parent_names = (const char *[]){ "xo" }, 405 - .num_parents = 1, 406 - .ops = &clk_pll_ops, 407 - }, 408 - }; 409 - 410 - static struct clk_regmap gpll1_vote = { 411 - .enable_reg = 0x45000, 412 - .enable_mask = BIT(1), 413 - .hw.init = &(struct clk_init_data){ 414 - .name = "gpll1_vote", 415 - .parent_names = (const char *[]){ "gpll1" }, 416 - .num_parents = 1, 417 - .ops = &clk_pll_vote_ops, 418 - }, 419 - }; 420 - 421 - static struct clk_pll gpll2 = { 422 - .l_reg = 0x4a004, 423 - .m_reg = 0x4a008, 424 - .n_reg = 0x4a00c, 425 - .config_reg = 0x4a010, 426 - .mode_reg = 0x4a000, 427 - .status_reg = 0x4a01c, 428 - .status_bit = 17, 429 - .clkr.hw.init = &(struct clk_init_data){ 430 - .name = "gpll2", 431 - .parent_names = (const char *[]){ "xo" }, 432 - .num_parents = 1, 433 - .ops = &clk_pll_ops, 434 - }, 435 - }; 436 - 437 - static struct clk_regmap gpll2_vote = { 438 - .enable_reg = 0x45000, 439 - .enable_mask = BIT(2), 440 - .hw.init = &(struct clk_init_data){ 441 - .name = "gpll2_vote", 442 - .parent_names = (const char *[]){ "gpll2" }, 443 - .num_parents = 1, 444 - .ops = &clk_pll_vote_ops, 445 - }, 446 - }; 447 - 448 - static struct clk_pll bimc_pll = { 449 - .l_reg = 0x23004, 450 - .m_reg = 0x23008, 451 - .n_reg = 0x2300c, 452 - .config_reg = 0x23010, 453 - .mode_reg = 0x23000, 454 - .status_reg = 0x2301c, 455 - .status_bit = 17, 456 - .clkr.hw.init = &(struct clk_init_data){ 457 - .name = "bimc_pll", 458 - .parent_names = (const char *[]){ "xo" }, 459 - .num_parents = 1, 460 - .ops = &clk_pll_ops, 461 - }, 462 - }; 463 - 464 - static struct clk_regmap bimc_pll_vote = { 465 - .enable_reg = 0x45000, 466 - .enable_mask = BIT(3), 467 - .hw.init = &(struct clk_init_data){ 468 - .name = "bimc_pll_vote", 469 - .parent_names = (const char *[]){ "bimc_pll" }, 470 - .num_parents = 1, 471 - .ops = &clk_pll_vote_ops, 472 - }, 473 257 }; 474 258 475 259 static struct clk_rcg2 pcnoc_bfdcd_clk_src = {