2
0

0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. From 0c5b5243ad55ae744e790ba90c5ad37a93bd1377 Mon Sep 17 00:00:00 2001
  2. From: Robert Marko <[email protected]>
  3. Date: Tue, 11 Oct 2022 23:38:45 +0200
  4. Subject: [PATCH] clk: qcom: ipq6018: workaround networking clock parenting
  5. Currently, networking clocks are only looked up by fw_name however,
  6. these are registered and setup by SSDK and are not available to the
  7. GCC driver at all, so work around that by providing a global name
  8. fallback.
  9. While we are here, provide global fallback for bias_pll_cc_clk and
  10. bias_pll_nss_noc_clk as well as these are fixed clocks also not available
  11. to the driver.
  12. Signed-off-by: Robert Marko <[email protected]>
  13. ---
  14. drivers/clk/qcom/gcc-ipq6018.c | 39 +++++++++++++++++-----------------
  15. 1 file changed, 19 insertions(+), 20 deletions(-)
  16. --- a/drivers/clk/qcom/gcc-ipq6018.c
  17. +++ b/drivers/clk/qcom/gcc-ipq6018.c
  18. @@ -360,7 +360,7 @@ static const struct freq_tbl ftbl_nss_pp
  19. static const struct clk_parent_data gcc_xo_bias_gpll0_gpll4_nss_ubi32[] = {
  20. { .fw_name = "xo" },
  21. - { .fw_name = "bias_pll_cc_clk" },
  22. + { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" },
  23. { .hw = &gpll0.clkr.hw },
  24. { .hw = &gpll4.clkr.hw },
  25. { .hw = &nss_crypto_pll.clkr.hw },
  26. @@ -526,12 +526,12 @@ static const struct freq_tbl ftbl_nss_po
  27. static const struct clk_parent_data
  28. gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias[] = {
  29. { .fw_name = "xo" },
  30. - { .fw_name = "uniphy0_gcc_rx_clk" },
  31. - { .fw_name = "uniphy0_gcc_tx_clk" },
  32. - { .fw_name = "uniphy1_gcc_rx_clk" },
  33. - { .fw_name = "uniphy1_gcc_tx_clk" },
  34. + { .fw_name = "uniphy0_gcc_rx_clk", .name = "uniphy0_gcc_rx_clk" },
  35. + { .fw_name = "uniphy0_gcc_tx_clk", .name = "uniphy0_gcc_tx_clk" },
  36. + { .fw_name = "uniphy1_gcc_rx_clk", .name = "uniphy1_gcc_rx_clk" },
  37. + { .fw_name = "uniphy1_gcc_tx_clk", .name = "uniphy1_gcc_tx_clk" },
  38. { .hw = &ubi32_pll.clkr.hw },
  39. - { .fw_name = "bias_pll_cc_clk" },
  40. + { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" },
  41. };
  42. static const struct parent_map
  43. @@ -573,12 +573,12 @@ static const struct freq_tbl ftbl_nss_po
  44. static const struct clk_parent_data
  45. gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias[] = {
  46. { .fw_name = "xo" },
  47. - { .fw_name = "uniphy0_gcc_tx_clk" },
  48. - { .fw_name = "uniphy0_gcc_rx_clk" },
  49. - { .fw_name = "uniphy1_gcc_tx_clk" },
  50. - { .fw_name = "uniphy1_gcc_rx_clk" },
  51. + { .fw_name = "uniphy0_gcc_tx_clk", .name = "uniphy0_gcc_tx_clk" },
  52. + { .fw_name = "uniphy0_gcc_rx_clk", .name = "uniphy0_gcc_rx_clk" },
  53. + { .fw_name = "uniphy1_gcc_tx_clk", .name = "uniphy1_gcc_tx_clk" },
  54. + { .fw_name = "uniphy1_gcc_rx_clk", .name = "uniphy1_gcc_rx_clk" },
  55. { .hw = &ubi32_pll.clkr.hw },
  56. - { .fw_name = "bias_pll_cc_clk" },
  57. + { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" },
  58. };
  59. static const struct parent_map
  60. @@ -714,10 +714,10 @@ static const struct freq_tbl ftbl_nss_po
  61. static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_ubi32_bias[] = {
  62. { .fw_name = "xo" },
  63. - { .fw_name = "uniphy0_gcc_rx_clk" },
  64. - { .fw_name = "uniphy0_gcc_tx_clk" },
  65. + { .fw_name = "uniphy0_gcc_rx_clk", .name = "uniphy0_gcc_rx_clk" },
  66. + { .fw_name = "uniphy0_gcc_tx_clk", .name = "uniphy0_gcc_tx_clk" },
  67. { .hw = &ubi32_pll.clkr.hw },
  68. - { .fw_name = "bias_pll_cc_clk" },
  69. + { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" },
  70. };
  71. static const struct parent_map gcc_xo_uniphy0_rx_tx_ubi32_bias_map[] = {
  72. @@ -750,10 +750,10 @@ static const struct freq_tbl ftbl_nss_po
  73. static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_ubi32_bias[] = {
  74. { .fw_name = "xo" },
  75. - { .fw_name = "uniphy0_gcc_tx_clk" },
  76. - { .fw_name = "uniphy0_gcc_rx_clk" },
  77. + { .fw_name = "uniphy0_gcc_tx_clk", .name = "uniphy0_gcc_tx_clk" },
  78. + { .fw_name = "uniphy0_gcc_rx_clk", .name = "uniphy0_gcc_rx_clk" },
  79. { .hw = &ubi32_pll.clkr.hw },
  80. - { .fw_name = "bias_pll_cc_clk" },
  81. + { .fw_name = "bias_pll_cc_clk", .name = "bias_pll_cc_clk" },
  82. };
  83. static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
  84. @@ -1899,12 +1899,11 @@ static const struct freq_tbl ftbl_ubi32_
  85. { }
  86. };
  87. -static const struct clk_parent_data
  88. - gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk[] = {
  89. +static const struct clk_parent_data gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk[] = {
  90. { .fw_name = "xo" },
  91. { .hw = &gpll0.clkr.hw },
  92. { .hw = &gpll2.clkr.hw },
  93. - { .fw_name = "bias_pll_nss_noc_clk" },
  94. + { .fw_name = "bias_pll_nss_noc_clk", .name = "bias_pll_nss_noc_clk" },
  95. };
  96. static const struct parent_map gcc_xo_gpll0_gpll2_bias_pll_nss_noc_clk_map[] = {