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

Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk fixes from Stephen Boyd:
"A collection of fixes:

- Make of_clk.h self contained

- Fix new qcom DT bindings that just merged to match the DTS files

- Fix qcom clk driver to properly detect DFS clk frequencies

- Fix the ls1028a driver to not deref a pointer before assigning it"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
of: clk: Make <linux/of_clk.h> self-contained
clk: qcom: Use ARRAY_SIZE in videocc-sc7180 for parent clocks
clk: qcom: Get rid of the test clock for videocc-sc7180
dt-bindings: clock: Cleanup qcom,videocc bindings for sdm845/sc7180
clk: qcom: Use ARRAY_SIZE in gpucc-sc7180 for parent clocks
clk: qcom: Get rid of the test clock for gpucc-sc7180
dt-bindings: clock: Fix qcom,gpucc bindings for sdm845/sc7180/msm8998
clk: qcom: Use ARRAY_SIZE in dispcc-sc7180 for parent clocks
clk: qcom: Get rid of the test clock for dispcc-sc7180
clk: qcom: Get rid of fallback global names for dispcc-sc7180
dt-bindings: clock: Fix qcom,dispcc bindings for sdm845/sc7180
clk: qcom: rcg2: Don't crash if our parent can't be found; return an error
clk: ls1028a: fix a dereference of pointer 'parent' before a null check
dt-bindings: clk: qcom: Fix self-validation, split, and clean cruft
clk: qcom: Don't overwrite 'cfg' in clk_rcg2_dfs_populate_freq()

+981 -339
+15 -19
Documentation/devicetree/bindings/clock/qcom,dispcc.yaml Documentation/devicetree/bindings/clock/qcom,sdm845-videocc.yaml
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 %YAML 1.2 3 3 --- 4 - $id: http://devicetree.org/schemas/clock/qcom,dispcc.yaml# 4 + $id: http://devicetree.org/schemas/clock/qcom,sdm845-videocc.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Qualcomm Display Clock & Reset Controller Binding 7 + title: Qualcomm Video Clock & Reset Controller Binding for SDM845 8 8 9 9 maintainers: 10 10 - Taniya Das <tdas@codeaurora.org> 11 11 12 12 description: | 13 - Qualcomm display clock control module which supports the clocks, resets and 14 - power domains. 13 + Qualcomm video clock control module which supports the clocks, resets and 14 + power domains on SDM845. 15 + 16 + See also dt-bindings/clock/qcom,videocc-sdm845.h. 15 17 16 18 properties: 17 19 compatible: 18 - enum: 19 - - qcom,sc7180-dispcc 20 - - qcom,sdm845-dispcc 20 + const: qcom,sdm845-videocc 21 21 22 22 clocks: 23 - minItems: 1 24 - maxItems: 2 25 23 items: 26 24 - description: Board XO source 27 - - description: GPLL0 source from GCC 28 25 29 26 clock-names: 30 27 items: 31 - - const: xo 32 - - const: gpll0 28 + - const: bi_tcxo 33 29 34 30 '#clock-cells': 35 31 const: 1 ··· 49 53 - '#power-domain-cells' 50 54 51 55 examples: 52 - # Example of DISPCC with clock node properties for SDM845: 53 56 - | 54 - clock-controller@af00000 { 55 - compatible = "qcom,sdm845-dispcc"; 56 - reg = <0xaf00000 0x10000>; 57 - clocks = <&rpmhcc 0>, <&gcc 24>; 58 - clock-names = "xo", "gpll0"; 57 + #include <dt-bindings/clock/qcom,rpmh.h> 58 + clock-controller@ab00000 { 59 + compatible = "qcom,sdm845-videocc"; 60 + reg = <0 0x0ab00000 0 0x10000>; 61 + clocks = <&rpmhcc RPMH_CXO_CLK>; 62 + clock-names = "bi_tcxo"; 59 63 #clock-cells = <1>; 60 64 #reset-cells = <1>; 61 65 #power-domain-cells = <1>; 62 - }; 66 + }; 63 67 ...
+83
Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,gcc-apq8064.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Global Clock & Reset Controller Binding for APQ8064 8 + 9 + maintainers: 10 + - Stephen Boyd <sboyd@kernel.org> 11 + - Taniya Das <tdas@codeaurora.org> 12 + 13 + description: | 14 + Qualcomm global clock control module which supports the clocks, resets and 15 + power domains on APQ8064. 16 + 17 + See also: 18 + - dt-bindings/clock/qcom,gcc-msm8960.h 19 + - dt-bindings/reset/qcom,gcc-msm8960.h 20 + 21 + properties: 22 + compatible: 23 + const: qcom,gcc-apq8064 24 + 25 + '#clock-cells': 26 + const: 1 27 + 28 + '#reset-cells': 29 + const: 1 30 + 31 + '#power-domain-cells': 32 + const: 1 33 + 34 + reg: 35 + maxItems: 1 36 + 37 + nvmem-cells: 38 + minItems: 1 39 + maxItems: 2 40 + description: 41 + Qualcomm TSENS (thermal sensor device) on some devices can 42 + be part of GCC and hence the TSENS properties can also be part 43 + of the GCC/clock-controller node. 44 + For more details on the TSENS properties please refer 45 + Documentation/devicetree/bindings/thermal/qcom-tsens.txt 46 + 47 + nvmem-cell-names: 48 + minItems: 1 49 + maxItems: 2 50 + items: 51 + - const: calib 52 + - const: calib_backup 53 + 54 + '#thermal-sensor-cells': 55 + const: 1 56 + 57 + protected-clocks: 58 + description: 59 + Protected clock specifier list as per common clock binding. 60 + 61 + required: 62 + - compatible 63 + - reg 64 + - '#clock-cells' 65 + - '#reset-cells' 66 + - '#power-domain-cells' 67 + - nvmem-cells 68 + - nvmem-cell-names 69 + - '#thermal-sensor-cells' 70 + 71 + examples: 72 + - | 73 + clock-controller@900000 { 74 + compatible = "qcom,gcc-apq8064"; 75 + reg = <0x00900000 0x4000>; 76 + nvmem-cells = <&tsens_calib>, <&tsens_backup>; 77 + nvmem-cell-names = "calib", "calib_backup"; 78 + #clock-cells = <1>; 79 + #reset-cells = <1>; 80 + #power-domain-cells = <1>; 81 + #thermal-sensor-cells = <1>; 82 + }; 83 + ...
+51
Documentation/devicetree/bindings/clock/qcom,gcc-ipq8074.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,gcc-ipq8074.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Global Clock & Reset Controller Bindingfor IPQ8074 8 + 9 + maintainers: 10 + - Stephen Boyd <sboyd@kernel.org> 11 + - Taniya Das <tdas@codeaurora.org> 12 + 13 + description: | 14 + Qualcomm global clock control module which supports the clocks, resets and 15 + power domains on IPQ8074. 16 + 17 + See also: 18 + - dt-bindings/clock/qcom,gcc-ipq8074.h 19 + 20 + properties: 21 + compatible: 22 + const: qcom,gcc-ipq8074 23 + 24 + '#clock-cells': 25 + const: 1 26 + 27 + '#reset-cells': 28 + const: 1 29 + 30 + reg: 31 + maxItems: 1 32 + 33 + protected-clocks: 34 + description: 35 + Protected clock specifier list as per common clock binding. 36 + 37 + required: 38 + - compatible 39 + - reg 40 + - '#clock-cells' 41 + - '#reset-cells' 42 + 43 + examples: 44 + - | 45 + clock-controller@1800000 { 46 + compatible = "qcom,gcc-ipq8074"; 47 + reg = <0x01800000 0x80000>; 48 + #clock-cells = <1>; 49 + #reset-cells = <1>; 50 + }; 51 + ...
+68
Documentation/devicetree/bindings/clock/qcom,gcc-msm8996.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,gcc-msm8996.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Global Clock & Reset Controller Binding for MSM8996 8 + 9 + maintainers: 10 + - Stephen Boyd <sboyd@kernel.org> 11 + - Taniya Das <tdas@codeaurora.org> 12 + 13 + description: | 14 + Qualcomm global clock control module which supports the clocks, resets and 15 + power domains on MSM8996. 16 + 17 + See also: 18 + - dt-bindings/clock/qcom,gcc-msm8996.h 19 + 20 + properties: 21 + compatible: 22 + const: qcom,gcc-msm8996 23 + 24 + clocks: 25 + items: 26 + - description: XO source 27 + - description: Second XO source 28 + - description: Sleep clock source 29 + 30 + clock-names: 31 + items: 32 + - const: cxo 33 + - const: cxo2 34 + - const: sleep_clk 35 + 36 + '#clock-cells': 37 + const: 1 38 + 39 + '#reset-cells': 40 + const: 1 41 + 42 + '#power-domain-cells': 43 + const: 1 44 + 45 + reg: 46 + maxItems: 1 47 + 48 + protected-clocks: 49 + description: 50 + Protected clock specifier list as per common clock binding. 51 + 52 + required: 53 + - compatible 54 + - reg 55 + - '#clock-cells' 56 + - '#reset-cells' 57 + - '#power-domain-cells' 58 + 59 + examples: 60 + - | 61 + clock-controller@300000 { 62 + compatible = "qcom,gcc-msm8996"; 63 + #clock-cells = <1>; 64 + #reset-cells = <1>; 65 + #power-domain-cells = <1>; 66 + reg = <0x300000 0x90000>; 67 + }; 68 + ...
+93
Documentation/devicetree/bindings/clock/qcom,gcc-msm8998.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,gcc-msm8998.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Global Clock & Reset Controller Binding for MSM8998 8 + 9 + maintainers: 10 + - Stephen Boyd <sboyd@kernel.org> 11 + - Taniya Das <tdas@codeaurora.org> 12 + 13 + description: | 14 + Qualcomm global clock control module which supports the clocks, resets and 15 + power domains on MSM8998. 16 + 17 + See also: 18 + - dt-bindings/clock/qcom,gcc-msm8998.h 19 + 20 + properties: 21 + compatible: 22 + const: qcom,gcc-msm8998 23 + 24 + clocks: 25 + items: 26 + - description: Board XO source 27 + - description: Sleep clock source 28 + - description: USB 3.0 phy pipe clock 29 + - description: UFS phy rx symbol clock for pipe 0 30 + - description: UFS phy rx symbol clock for pipe 1 31 + - description: UFS phy tx symbol clock 32 + - description: PCIE phy pipe clock 33 + 34 + clock-names: 35 + items: 36 + - const: xo 37 + - const: sleep_clk 38 + - const: usb3_pipe 39 + - const: ufs_rx_symbol0 40 + - const: ufs_rx_symbol1 41 + - const: ufs_tx_symbol0 42 + - const: pcie0_pipe 43 + 44 + '#clock-cells': 45 + const: 1 46 + 47 + '#reset-cells': 48 + const: 1 49 + 50 + '#power-domain-cells': 51 + const: 1 52 + 53 + reg: 54 + maxItems: 1 55 + 56 + protected-clocks: 57 + description: 58 + Protected clock specifier list as per common clock binding. 59 + 60 + required: 61 + - compatible 62 + - clocks 63 + - clock-names 64 + - reg 65 + - '#clock-cells' 66 + - '#reset-cells' 67 + - '#power-domain-cells' 68 + 69 + examples: 70 + - | 71 + #include <dt-bindings/clock/qcom,rpmcc.h> 72 + clock-controller@100000 { 73 + compatible = "qcom,gcc-msm8998"; 74 + #clock-cells = <1>; 75 + #reset-cells = <1>; 76 + #power-domain-cells = <1>; 77 + reg = <0x00100000 0xb0000>; 78 + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, 79 + <&sleep>, 80 + <0>, 81 + <0>, 82 + <0>, 83 + <0>, 84 + <0>; 85 + clock-names = "xo", 86 + "sleep_clk", 87 + "usb3_pipe", 88 + "ufs_rx_symbol0", 89 + "ufs_rx_symbol1", 90 + "ufs_tx_symbol0", 91 + "pcie0_pipe"; 92 + }; 93 + ...
+51
Documentation/devicetree/bindings/clock/qcom,gcc-qcs404.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,gcc-qcs404.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Global Clock & Reset Controller Bindingfor QCS404 8 + 9 + maintainers: 10 + - Stephen Boyd <sboyd@kernel.org> 11 + - Taniya Das <tdas@codeaurora.org> 12 + 13 + description: | 14 + Qualcomm global clock control module which supports the clocks, resets and 15 + power domains on QCS404. 16 + 17 + See also: 18 + - dt-bindings/clock/qcom,gcc-qcs404.h 19 + 20 + properties: 21 + compatible: 22 + const: qcom,gcc-qcs404 23 + 24 + '#clock-cells': 25 + const: 1 26 + 27 + '#reset-cells': 28 + const: 1 29 + 30 + reg: 31 + maxItems: 1 32 + 33 + protected-clocks: 34 + description: 35 + Protected clock specifier list as per common clock binding. 36 + 37 + required: 38 + - compatible 39 + - reg 40 + - '#clock-cells' 41 + - '#reset-cells' 42 + 43 + examples: 44 + - | 45 + clock-controller@1800000 { 46 + compatible = "qcom,gcc-qcs404"; 47 + reg = <0x01800000 0x80000>; 48 + #clock-cells = <1>; 49 + #reset-cells = <1>; 50 + }; 51 + ...
+75
Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,gcc-sc7180.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Global Clock & Reset Controller Binding for SC7180 8 + 9 + maintainers: 10 + - Stephen Boyd <sboyd@kernel.org> 11 + - Taniya Das <tdas@codeaurora.org> 12 + 13 + description: | 14 + Qualcomm global clock control module which supports the clocks, resets and 15 + power domains on SC7180. 16 + 17 + See also: 18 + - dt-bindings/clock/qcom,gcc-sc7180.h 19 + 20 + properties: 21 + compatible: 22 + const: qcom,gcc-sc7180 23 + 24 + clocks: 25 + items: 26 + - description: Board XO source 27 + - description: Board active XO source 28 + - description: Sleep clock source 29 + 30 + clock-names: 31 + items: 32 + - const: bi_tcxo 33 + - const: bi_tcxo_ao 34 + - const: sleep_clk 35 + 36 + '#clock-cells': 37 + const: 1 38 + 39 + '#reset-cells': 40 + const: 1 41 + 42 + '#power-domain-cells': 43 + const: 1 44 + 45 + reg: 46 + maxItems: 1 47 + 48 + protected-clocks: 49 + description: 50 + Protected clock specifier list as per common clock binding. 51 + 52 + required: 53 + - compatible 54 + - clocks 55 + - clock-names 56 + - reg 57 + - '#clock-cells' 58 + - '#reset-cells' 59 + - '#power-domain-cells' 60 + 61 + examples: 62 + - | 63 + #include <dt-bindings/clock/qcom,rpmh.h> 64 + clock-controller@100000 { 65 + compatible = "qcom,gcc-sc7180"; 66 + reg = <0 0x00100000 0 0x1f0000>; 67 + clocks = <&rpmhcc RPMH_CXO_CLK>, 68 + <&rpmhcc RPMH_CXO_CLK_A>, 69 + <&sleep_clk>; 70 + clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk"; 71 + #clock-cells = <1>; 72 + #reset-cells = <1>; 73 + #power-domain-cells = <1>; 74 + }; 75 + ...
+72
Documentation/devicetree/bindings/clock/qcom,gcc-sm8150.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,gcc-sm8150.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Global Clock & Reset Controller Binding for SM8150 8 + 9 + maintainers: 10 + - Stephen Boyd <sboyd@kernel.org> 11 + - Taniya Das <tdas@codeaurora.org> 12 + 13 + description: | 14 + Qualcomm global clock control module which supports the clocks, resets and 15 + power domains on SM8150. 16 + 17 + See also: 18 + - dt-bindings/clock/qcom,gcc-sm8150.h 19 + 20 + properties: 21 + compatible: 22 + const: qcom,gcc-sm8150 23 + 24 + clocks: 25 + items: 26 + - description: Board XO source 27 + - description: Sleep clock source 28 + 29 + clock-names: 30 + items: 31 + - const: bi_tcxo 32 + - const: sleep_clk 33 + 34 + '#clock-cells': 35 + const: 1 36 + 37 + '#reset-cells': 38 + const: 1 39 + 40 + '#power-domain-cells': 41 + const: 1 42 + 43 + reg: 44 + maxItems: 1 45 + 46 + protected-clocks: 47 + description: 48 + Protected clock specifier list as per common clock binding. 49 + 50 + required: 51 + - compatible 52 + - clocks 53 + - clock-names 54 + - reg 55 + - '#clock-cells' 56 + - '#reset-cells' 57 + - '#power-domain-cells' 58 + 59 + examples: 60 + - | 61 + #include <dt-bindings/clock/qcom,rpmh.h> 62 + clock-controller@100000 { 63 + compatible = "qcom,gcc-sm8150"; 64 + reg = <0 0x00100000 0 0x1f0000>; 65 + clocks = <&rpmhcc RPMH_CXO_CLK>, 66 + <&sleep_clk>; 67 + clock-names = "bi_tcxo", "sleep_clk"; 68 + #clock-cells = <1>; 69 + #reset-cells = <1>; 70 + #power-domain-cells = <1>; 71 + }; 72 + ...
+35 -193
Documentation/devicetree/bindings/clock/qcom,gcc.yaml
··· 14 14 Qualcomm global clock control module which supports the clocks, resets and 15 15 power domains. 16 16 17 + See also: 18 + - dt-bindings/clock/qcom,gcc-apq8084.h 19 + - dt-bindings/reset/qcom,gcc-apq8084.h 20 + - dt-bindings/clock/qcom,gcc-ipq4019.h 21 + - dt-bindings/clock/qcom,gcc-ipq6018.h 22 + - dt-bindings/reset/qcom,gcc-ipq6018.h 23 + - dt-bindings/clock/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) 24 + - dt-bindings/reset/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) 25 + - dt-bindings/clock/qcom,gcc-msm8660.h 26 + - dt-bindings/reset/qcom,gcc-msm8660.h 27 + - dt-bindings/clock/qcom,gcc-msm8974.h 28 + - dt-bindings/reset/qcom,gcc-msm8974.h 29 + - dt-bindings/clock/qcom,gcc-msm8994.h 30 + - dt-bindings/clock/qcom,gcc-mdm9615.h 31 + - dt-bindings/reset/qcom,gcc-mdm9615.h 32 + - dt-bindings/clock/qcom,gcc-sdm660.h (qcom,gcc-sdm630 and qcom,gcc-sdm660) 33 + - dt-bindings/clock/qcom,gcc-sdm845.h 34 + 17 35 properties: 18 - compatible : 36 + compatible: 19 37 enum: 20 - - qcom,gcc-apq8064 21 - - qcom,gcc-apq8084 22 - - qcom,gcc-ipq4019 23 - - qcom,gcc-ipq6018 24 - - qcom,gcc-ipq8064 25 - - qcom,gcc-ipq8074 26 - - qcom,gcc-msm8660 27 - - qcom,gcc-msm8916 28 - - qcom,gcc-msm8960 29 - - qcom,gcc-msm8974 30 - - qcom,gcc-msm8974pro 31 - - qcom,gcc-msm8974pro-ac 32 - - qcom,gcc-msm8994 33 - - qcom,gcc-msm8996 34 - - qcom,gcc-msm8998 35 - - qcom,gcc-mdm9615 36 - - qcom,gcc-qcs404 37 - - qcom,gcc-sc7180 38 - - qcom,gcc-sdm630 39 - - qcom,gcc-sdm660 40 - - qcom,gcc-sdm845 41 - - qcom,gcc-sm8150 42 - 43 - clocks: 44 - oneOf: 45 - #qcom,gcc-sm8150 46 - #qcom,gcc-sc7180 47 - - items: 48 - - description: Board XO source 49 - - description: Board active XO source 50 - - description: Sleep clock source 51 - #qcom,gcc-msm8996 52 - - items: 53 - - description: XO source 54 - - description: Second XO source 55 - - description: Sleep clock source 56 - #qcom,gcc-msm8998 57 - - items: 58 - - description: Board XO source 59 - - description: Sleep clock source 60 - - description: USB 3.0 phy pipe clock 61 - - description: UFS phy rx symbol clock for pipe 0 62 - - description: UFS phy rx symbol clock for pipe 1 63 - - description: UFS phy tx symbol clock 64 - - description: PCIE phy pipe clock 65 - 66 - clock-names: 67 - oneOf: 68 - #qcom,gcc-sm8150 69 - #qcom,gcc-sc7180 70 - - items: 71 - - const: bi_tcxo 72 - - const: bi_tcxo_ao 73 - - const: sleep_clk 74 - #qcom,gcc-msm8996 75 - - items: 76 - - const: cxo 77 - - const: cxo2 78 - - const: sleep_clk 79 - #qcom,gcc-msm8998 80 - - items: 81 - - const: xo 82 - - const: sleep_clk 83 - - const: usb3_pipe 84 - - const: ufs_rx_symbol0 85 - - const: ufs_rx_symbol1 86 - - const: ufs_tx_symbol0 87 - - const: pcie0_pipe 38 + - qcom,gcc-apq8084 39 + - qcom,gcc-ipq4019 40 + - qcom,gcc-ipq6018 41 + - qcom,gcc-ipq8064 42 + - qcom,gcc-msm8660 43 + - qcom,gcc-msm8916 44 + - qcom,gcc-msm8960 45 + - qcom,gcc-msm8974 46 + - qcom,gcc-msm8974pro 47 + - qcom,gcc-msm8974pro-ac 48 + - qcom,gcc-msm8994 49 + - qcom,gcc-mdm9615 50 + - qcom,gcc-sdm630 51 + - qcom,gcc-sdm660 52 + - qcom,gcc-sdm845 88 53 89 54 '#clock-cells': 90 55 const: 1 ··· 63 98 reg: 64 99 maxItems: 1 65 100 66 - nvmem-cells: 67 - minItems: 1 68 - maxItems: 2 69 - description: 70 - Qualcomm TSENS (thermal sensor device) on some devices can 71 - be part of GCC and hence the TSENS properties can also be part 72 - of the GCC/clock-controller node. 73 - For more details on the TSENS properties please refer 74 - Documentation/devicetree/bindings/thermal/qcom-tsens.txt 75 - 76 - nvmem-cell-names: 77 - minItems: 1 78 - maxItems: 2 79 - description: 80 - Names for each nvmem-cells specified. 81 - items: 82 - - const: calib 83 - - const: calib_backup 84 - 85 - 'thermal-sensor-cells': 86 - const: 1 87 - 88 101 protected-clocks: 89 102 description: 90 - Protected clock specifier list as per common clock binding 103 + Protected clock specifier list as per common clock binding. 91 104 92 105 required: 93 106 - compatible ··· 73 130 - '#clock-cells' 74 131 - '#reset-cells' 75 132 - '#power-domain-cells' 76 - 77 - if: 78 - properties: 79 - compatible: 80 - contains: 81 - const: qcom,gcc-apq8064 82 - 83 - then: 84 - required: 85 - - nvmem-cells 86 - - nvmem-cell-names 87 - - '#thermal-sensor-cells' 88 - 89 - else: 90 - if: 91 - properties: 92 - compatible: 93 - contains: 94 - enum: 95 - - qcom,gcc-msm8998 96 - - qcom,gcc-sm8150 97 - - qcom,gcc-sc7180 98 - then: 99 - required: 100 - - clocks 101 - - clock-names 102 - 103 133 104 134 examples: 105 135 # Example for GCC for MSM8960: ··· 83 167 #clock-cells = <1>; 84 168 #reset-cells = <1>; 85 169 #power-domain-cells = <1>; 86 - }; 87 - 88 - 89 - # Example of GCC with TSENS properties: 90 - - | 91 - clock-controller@900000 { 92 - compatible = "qcom,gcc-apq8064"; 93 - reg = <0x00900000 0x4000>; 94 - nvmem-cells = <&tsens_calib>, <&tsens_backup>; 95 - nvmem-cell-names = "calib", "calib_backup"; 96 - #clock-cells = <1>; 97 - #reset-cells = <1>; 98 - #power-domain-cells = <1>; 99 - #thermal-sensor-cells = <1>; 100 - }; 101 - 102 - # Example of GCC with protected-clocks properties: 103 - - | 104 - clock-controller@100000 { 105 - compatible = "qcom,gcc-sdm845"; 106 - reg = <0x100000 0x1f0000>; 107 - protected-clocks = <187>, <188>, <189>, <190>, <191>; 108 - #clock-cells = <1>; 109 - #reset-cells = <1>; 110 - #power-domain-cells = <1>; 111 - }; 112 - 113 - # Example of GCC with clock node properties for SM8150: 114 - - | 115 - clock-controller@100000 { 116 - compatible = "qcom,gcc-sm8150"; 117 - reg = <0x00100000 0x1f0000>; 118 - clocks = <&rpmhcc 0>, <&rpmhcc 1>, <&sleep_clk>; 119 - clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk"; 120 - #clock-cells = <1>; 121 - #reset-cells = <1>; 122 - #power-domain-cells = <1>; 123 - }; 124 - 125 - # Example of GCC with clock nodes properties for SC7180: 126 - - | 127 - clock-controller@100000 { 128 - compatible = "qcom,gcc-sc7180"; 129 - reg = <0x100000 0x1f0000>; 130 - clocks = <&rpmhcc 0>, <&rpmhcc 1>, <0>; 131 - clock-names = "bi_tcxo", "bi_tcxo_ao", "sleep_clk"; 132 - #clock-cells = <1>; 133 - #reset-cells = <1>; 134 - #power-domain-cells = <1>; 135 - }; 136 - 137 - # Example of MSM8998 GCC: 138 - - | 139 - #include <dt-bindings/clock/qcom,rpmcc.h> 140 - clock-controller@100000 { 141 - compatible = "qcom,gcc-msm8998"; 142 - #clock-cells = <1>; 143 - #reset-cells = <1>; 144 - #power-domain-cells = <1>; 145 - reg = <0x00100000 0xb0000>; 146 - clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, 147 - <&sleep>, 148 - <0>, 149 - <0>, 150 - <0>, 151 - <0>, 152 - <0>; 153 - clock-names = "xo", 154 - "sleep_clk", 155 - "usb3_pipe", 156 - "ufs_rx_symbol0", 157 - "ufs_rx_symbol1", 158 - "ufs_tx_symbol0", 159 - "pcie0_pipe"; 160 170 }; 161 171 ...
-72
Documentation/devicetree/bindings/clock/qcom,gpucc.yaml
··· 1 - # SPDX-License-Identifier: GPL-2.0-only 2 - %YAML 1.2 3 - --- 4 - $id: http://devicetree.org/schemas/clock/qcom,gpucc.yaml# 5 - $schema: http://devicetree.org/meta-schemas/core.yaml# 6 - 7 - title: Qualcomm Graphics Clock & Reset Controller Binding 8 - 9 - maintainers: 10 - - Taniya Das <tdas@codeaurora.org> 11 - 12 - description: | 13 - Qualcomm grpahics clock control module which supports the clocks, resets and 14 - power domains. 15 - 16 - properties: 17 - compatible: 18 - enum: 19 - - qcom,msm8998-gpucc 20 - - qcom,sc7180-gpucc 21 - - qcom,sdm845-gpucc 22 - 23 - clocks: 24 - minItems: 1 25 - maxItems: 3 26 - items: 27 - - description: Board XO source 28 - - description: GPLL0 main branch source from GCC(gcc_gpu_gpll0_clk_src) 29 - - description: GPLL0 div branch source from GCC(gcc_gpu_gpll0_div_clk_src) 30 - 31 - clock-names: 32 - minItems: 1 33 - maxItems: 3 34 - items: 35 - - const: xo 36 - - const: gpll0_main 37 - - const: gpll0_div 38 - 39 - '#clock-cells': 40 - const: 1 41 - 42 - '#reset-cells': 43 - const: 1 44 - 45 - '#power-domain-cells': 46 - const: 1 47 - 48 - reg: 49 - maxItems: 1 50 - 51 - required: 52 - - compatible 53 - - reg 54 - - clocks 55 - - clock-names 56 - - '#clock-cells' 57 - - '#reset-cells' 58 - - '#power-domain-cells' 59 - 60 - examples: 61 - # Example of GPUCC with clock node properties for SDM845: 62 - - | 63 - clock-controller@5090000 { 64 - compatible = "qcom,sdm845-gpucc"; 65 - reg = <0x5090000 0x9000>; 66 - clocks = <&rpmhcc 0>, <&gcc 31>, <&gcc 32>; 67 - clock-names = "xo", "gpll0_main", "gpll0_div"; 68 - #clock-cells = <1>; 69 - #reset-cells = <1>; 70 - #power-domain-cells = <1>; 71 - }; 72 - ...
+66
Documentation/devicetree/bindings/clock/qcom,msm8998-gpucc.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,msm8998-gpucc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Graphics Clock & Reset Controller Binding for MSM8998 8 + 9 + maintainers: 10 + - Taniya Das <tdas@codeaurora.org> 11 + 12 + description: | 13 + Qualcomm graphics clock control module which supports the clocks, resets and 14 + power domains on MSM8998. 15 + 16 + See also dt-bindings/clock/qcom,gpucc-msm8998.h. 17 + 18 + properties: 19 + compatible: 20 + const: qcom,msm8998-gpucc 21 + 22 + clocks: 23 + items: 24 + - description: Board XO source 25 + - description: GPLL0 main branch source (gcc_gpu_gpll0_clk_src) 26 + 27 + clock-names: 28 + items: 29 + - const: xo 30 + - const: gpll0 31 + 32 + '#clock-cells': 33 + const: 1 34 + 35 + '#reset-cells': 36 + const: 1 37 + 38 + '#power-domain-cells': 39 + const: 1 40 + 41 + reg: 42 + maxItems: 1 43 + 44 + required: 45 + - compatible 46 + - reg 47 + - clocks 48 + - clock-names 49 + - '#clock-cells' 50 + - '#reset-cells' 51 + - '#power-domain-cells' 52 + 53 + examples: 54 + - | 55 + #include <dt-bindings/clock/qcom,gcc-msm8998.h> 56 + #include <dt-bindings/clock/qcom,rpmcc.h> 57 + clock-controller@5065000 { 58 + compatible = "qcom,msm8998-gpucc"; 59 + #clock-cells = <1>; 60 + #reset-cells = <1>; 61 + #power-domain-cells = <1>; 62 + reg = <0x05065000 0x9000>; 63 + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, <&gcc GPLL0_OUT_MAIN>; 64 + clock-names = "xo", "gpll0"; 65 + }; 66 + ...
+84
Documentation/devicetree/bindings/clock/qcom,sc7180-dispcc.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,sc7180-dispcc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Display Clock & Reset Controller Binding for SC7180 8 + 9 + maintainers: 10 + - Taniya Das <tdas@codeaurora.org> 11 + 12 + description: | 13 + Qualcomm display clock control module which supports the clocks, resets and 14 + power domains on SC7180. 15 + 16 + See also dt-bindings/clock/qcom,dispcc-sc7180.h. 17 + 18 + properties: 19 + compatible: 20 + const: qcom,sc7180-dispcc 21 + 22 + clocks: 23 + items: 24 + - description: Board XO source 25 + - description: GPLL0 source from GCC 26 + - description: Byte clock from DSI PHY 27 + - description: Pixel clock from DSI PHY 28 + - description: Link clock from DP PHY 29 + - description: VCO DIV clock from DP PHY 30 + 31 + clock-names: 32 + items: 33 + - const: bi_tcxo 34 + - const: gcc_disp_gpll0_clk_src 35 + - const: dsi0_phy_pll_out_byteclk 36 + - const: dsi0_phy_pll_out_dsiclk 37 + - const: dp_phy_pll_link_clk 38 + - const: dp_phy_pll_vco_div_clk 39 + 40 + '#clock-cells': 41 + const: 1 42 + 43 + '#reset-cells': 44 + const: 1 45 + 46 + '#power-domain-cells': 47 + const: 1 48 + 49 + reg: 50 + maxItems: 1 51 + 52 + required: 53 + - compatible 54 + - reg 55 + - clocks 56 + - clock-names 57 + - '#clock-cells' 58 + - '#reset-cells' 59 + - '#power-domain-cells' 60 + 61 + examples: 62 + - | 63 + #include <dt-bindings/clock/qcom,gcc-sc7180.h> 64 + #include <dt-bindings/clock/qcom,rpmh.h> 65 + clock-controller@af00000 { 66 + compatible = "qcom,sc7180-dispcc"; 67 + reg = <0 0x0af00000 0 0x200000>; 68 + clocks = <&rpmhcc RPMH_CXO_CLK>, 69 + <&gcc GCC_DISP_GPLL0_CLK_SRC>, 70 + <&dsi_phy 0>, 71 + <&dsi_phy 1>, 72 + <&dp_phy 0>, 73 + <&dp_phy 1>; 74 + clock-names = "bi_tcxo", 75 + "gcc_disp_gpll0_clk_src", 76 + "dsi0_phy_pll_out_byteclk", 77 + "dsi0_phy_pll_out_dsiclk", 78 + "dp_phy_pll_link_clk", 79 + "dp_phy_pll_vco_div_clk"; 80 + #clock-cells = <1>; 81 + #reset-cells = <1>; 82 + #power-domain-cells = <1>; 83 + }; 84 + ...
+72
Documentation/devicetree/bindings/clock/qcom,sc7180-gpucc.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,sc7180-gpucc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Graphics Clock & Reset Controller Binding for SC7180 8 + 9 + maintainers: 10 + - Taniya Das <tdas@codeaurora.org> 11 + 12 + description: | 13 + Qualcomm graphics clock control module which supports the clocks, resets and 14 + power domains on SC7180. 15 + 16 + See also dt-bindings/clock/qcom,gpucc-sc7180.h. 17 + 18 + properties: 19 + compatible: 20 + const: qcom,sc7180-gpucc 21 + 22 + clocks: 23 + items: 24 + - description: Board XO source 25 + - description: GPLL0 main branch source 26 + - description: GPLL0 div branch source 27 + 28 + clock-names: 29 + items: 30 + - const: bi_tcxo 31 + - const: gcc_gpu_gpll0_clk_src 32 + - const: gcc_gpu_gpll0_div_clk_src 33 + 34 + '#clock-cells': 35 + const: 1 36 + 37 + '#reset-cells': 38 + const: 1 39 + 40 + '#power-domain-cells': 41 + const: 1 42 + 43 + reg: 44 + maxItems: 1 45 + 46 + required: 47 + - compatible 48 + - reg 49 + - clocks 50 + - clock-names 51 + - '#clock-cells' 52 + - '#reset-cells' 53 + - '#power-domain-cells' 54 + 55 + examples: 56 + - | 57 + #include <dt-bindings/clock/qcom,gcc-sc7180.h> 58 + #include <dt-bindings/clock/qcom,rpmh.h> 59 + clock-controller@5090000 { 60 + compatible = "qcom,sc7180-gpucc"; 61 + reg = <0 0x05090000 0 0x9000>; 62 + clocks = <&rpmhcc RPMH_CXO_CLK>, 63 + <&gcc GCC_GPU_GPLL0_CLK_SRC>, 64 + <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>; 65 + clock-names = "bi_tcxo", 66 + "gcc_gpu_gpll0_clk_src", 67 + "gcc_gpu_gpll0_div_clk_src"; 68 + #clock-cells = <1>; 69 + #reset-cells = <1>; 70 + #power-domain-cells = <1>; 71 + }; 72 + ...
+99
Documentation/devicetree/bindings/clock/qcom,sdm845-dispcc.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,sdm845-dispcc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Display Clock & Reset Controller Binding for SDM845 8 + 9 + maintainers: 10 + - Taniya Das <tdas@codeaurora.org> 11 + 12 + description: | 13 + Qualcomm display clock control module which supports the clocks, resets and 14 + power domains on SDM845. 15 + 16 + See also dt-bindings/clock/qcom,dispcc-sdm845.h. 17 + 18 + properties: 19 + compatible: 20 + const: qcom,sdm845-dispcc 21 + 22 + # NOTE: sdm845.dtsi existed for quite some time and specified no clocks. 23 + # The code had to use hardcoded mechanisms to find the input clocks. 24 + # New dts files should have these clocks. 25 + clocks: 26 + items: 27 + - description: Board XO source 28 + - description: GPLL0 source from GCC 29 + - description: GPLL0 div source from GCC 30 + - description: Byte clock from DSI PHY0 31 + - description: Pixel clock from DSI PHY0 32 + - description: Byte clock from DSI PHY1 33 + - description: Pixel clock from DSI PHY1 34 + - description: Link clock from DP PHY 35 + - description: VCO DIV clock from DP PHY 36 + 37 + clock-names: 38 + items: 39 + - const: bi_tcxo 40 + - const: gcc_disp_gpll0_clk_src 41 + - const: gcc_disp_gpll0_div_clk_src 42 + - const: dsi0_phy_pll_out_byteclk 43 + - const: dsi0_phy_pll_out_dsiclk 44 + - const: dsi1_phy_pll_out_byteclk 45 + - const: dsi1_phy_pll_out_dsiclk 46 + - const: dp_link_clk_divsel_ten 47 + - const: dp_vco_divided_clk_src_mux 48 + 49 + '#clock-cells': 50 + const: 1 51 + 52 + '#reset-cells': 53 + const: 1 54 + 55 + '#power-domain-cells': 56 + const: 1 57 + 58 + reg: 59 + maxItems: 1 60 + 61 + required: 62 + - compatible 63 + - reg 64 + - clocks 65 + - clock-names 66 + - '#clock-cells' 67 + - '#reset-cells' 68 + - '#power-domain-cells' 69 + 70 + examples: 71 + - | 72 + #include <dt-bindings/clock/qcom,gcc-sdm845.h> 73 + #include <dt-bindings/clock/qcom,rpmh.h> 74 + clock-controller@af00000 { 75 + compatible = "qcom,sdm845-dispcc"; 76 + reg = <0 0x0af00000 0 0x10000>; 77 + clocks = <&rpmhcc RPMH_CXO_CLK>, 78 + <&gcc GCC_DISP_GPLL0_CLK_SRC>, 79 + <&gcc GCC_DISP_GPLL0_DIV_CLK_SRC>, 80 + <&dsi0_phy 0>, 81 + <&dsi0_phy 1>, 82 + <&dsi1_phy 0>, 83 + <&dsi1_phy 1>, 84 + <&dp_phy 0>, 85 + <&dp_phy 1>; 86 + clock-names = "bi_tcxo", 87 + "gcc_disp_gpll0_clk_src", 88 + "gcc_disp_gpll0_div_clk_src", 89 + "dsi0_phy_pll_out_byteclk", 90 + "dsi0_phy_pll_out_dsiclk", 91 + "dsi1_phy_pll_out_byteclk", 92 + "dsi1_phy_pll_out_dsiclk", 93 + "dp_link_clk_divsel_ten", 94 + "dp_vco_divided_clk_src_mux"; 95 + #clock-cells = <1>; 96 + #reset-cells = <1>; 97 + #power-domain-cells = <1>; 98 + }; 99 + ...
+72
Documentation/devicetree/bindings/clock/qcom,sdm845-gpucc.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/clock/qcom,sdm845-gpucc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Graphics Clock & Reset Controller Binding for SDM845 8 + 9 + maintainers: 10 + - Taniya Das <tdas@codeaurora.org> 11 + 12 + description: | 13 + Qualcomm graphics clock control module which supports the clocks, resets and 14 + power domains on SDM845. 15 + 16 + See also dt-bindings/clock/qcom,gpucc-sdm845.h. 17 + 18 + properties: 19 + compatible: 20 + const: qcom,sdm845-gpucc 21 + 22 + clocks: 23 + items: 24 + - description: Board XO source 25 + - description: GPLL0 main branch source 26 + - description: GPLL0 div branch source 27 + 28 + clock-names: 29 + items: 30 + - const: bi_tcxo 31 + - const: gcc_gpu_gpll0_clk_src 32 + - const: gcc_gpu_gpll0_div_clk_src 33 + 34 + '#clock-cells': 35 + const: 1 36 + 37 + '#reset-cells': 38 + const: 1 39 + 40 + '#power-domain-cells': 41 + const: 1 42 + 43 + reg: 44 + maxItems: 1 45 + 46 + required: 47 + - compatible 48 + - reg 49 + - clocks 50 + - clock-names 51 + - '#clock-cells' 52 + - '#reset-cells' 53 + - '#power-domain-cells' 54 + 55 + examples: 56 + - | 57 + #include <dt-bindings/clock/qcom,gcc-sdm845.h> 58 + #include <dt-bindings/clock/qcom,rpmh.h> 59 + clock-controller@5090000 { 60 + compatible = "qcom,sdm845-gpucc"; 61 + reg = <0 0x05090000 0 0x9000>; 62 + clocks = <&rpmhcc RPMH_CXO_CLK>, 63 + <&gcc GCC_GPU_GPLL0_CLK_SRC>, 64 + <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>; 65 + clock-names = "bi_tcxo", 66 + "gcc_gpu_gpll0_clk_src", 67 + "gcc_gpu_gpll0_div_clk_src"; 68 + #clock-cells = <1>; 69 + #reset-cells = <1>; 70 + #power-domain-cells = <1>; 71 + }; 72 + ...
+15 -14
Documentation/devicetree/bindings/clock/qcom,videocc.yaml Documentation/devicetree/bindings/clock/qcom,sc7180-videocc.yaml
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 %YAML 1.2 3 3 --- 4 - $id: http://devicetree.org/schemas/clock/qcom,videocc.yaml# 4 + $id: http://devicetree.org/schemas/clock/qcom,sc7180-videocc.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Qualcomm Video Clock & Reset Controller Binding 7 + title: Qualcomm Video Clock & Reset Controller Binding for SC7180 8 8 9 9 maintainers: 10 10 - Taniya Das <tdas@codeaurora.org> 11 11 12 12 description: | 13 13 Qualcomm video clock control module which supports the clocks, resets and 14 - power domains. 14 + power domains on SC7180. 15 + 16 + See also dt-bindings/clock/qcom,videocc-sc7180.h. 15 17 16 18 properties: 17 19 compatible: 18 - enum: 19 - - qcom,sc7180-videocc 20 - - qcom,sdm845-videocc 20 + const: qcom,sc7180-videocc 21 21 22 22 clocks: 23 - maxItems: 1 23 + items: 24 + - description: Board XO source 24 25 25 26 clock-names: 26 27 items: 27 - - const: xo 28 + - const: bi_tcxo 28 29 29 30 '#clock-cells': 30 31 const: 1 ··· 49 48 - '#power-domain-cells' 50 49 51 50 examples: 52 - # Example of VIDEOCC with clock node properties for SDM845: 53 51 - | 52 + #include <dt-bindings/clock/qcom,rpmh.h> 54 53 clock-controller@ab00000 { 55 - compatible = "qcom,sdm845-videocc"; 56 - reg = <0xab00000 0x10000>; 57 - clocks = <&rpmhcc 0>; 58 - clock-names = "xo"; 54 + compatible = "qcom,sc7180-videocc"; 55 + reg = <0 0x0ab00000 0 0x10000>; 56 + clocks = <&rpmhcc RPMH_CXO_CLK>; 57 + clock-names = "bi_tcxo"; 59 58 #clock-cells = <1>; 60 59 #reset-cells = <1>; 61 60 #power-domain-cells = <1>; 62 - }; 61 + }; 63 62 ...
+3 -1
drivers/clk/clk-plldig.c
··· 187 187 { 188 188 struct clk_plldig *data = to_clk_plldig(hw); 189 189 struct clk_hw *parent = clk_hw_get_parent(hw); 190 - unsigned long parent_rate = clk_hw_get_rate(parent); 190 + unsigned long parent_rate; 191 191 unsigned long val; 192 192 unsigned long long lltmp; 193 193 unsigned int mfd, fracdiv = 0; 194 194 195 195 if (!parent) 196 196 return -EINVAL; 197 + 198 + parent_rate = clk_hw_get_rate(parent); 197 199 198 200 if (data->vco_freq) { 199 201 mfd = data->vco_freq / parent_rate;
+7 -4
drivers/clk/qcom/clk-rcg2.c
··· 218 218 219 219 clk_flags = clk_hw_get_flags(hw); 220 220 p = clk_hw_get_parent_by_index(hw, index); 221 + if (!p) 222 + return -EINVAL; 223 + 221 224 if (clk_flags & CLK_SET_RATE_PARENT) { 222 225 rate = f->freq; 223 226 if (f->pre_div) { ··· 956 953 struct clk_rcg2 *rcg = to_clk_rcg2(hw); 957 954 struct clk_hw *p; 958 955 unsigned long prate = 0; 959 - u32 val, mask, cfg, mode; 956 + u32 val, mask, cfg, mode, src; 960 957 int i, num_parents; 961 958 962 959 regmap_read(rcg->clkr.regmap, rcg->cmd_rcgr + SE_PERF_DFSR(l), &cfg); ··· 966 963 if (cfg & mask) 967 964 f->pre_div = cfg & mask; 968 965 969 - cfg &= CFG_SRC_SEL_MASK; 970 - cfg >>= CFG_SRC_SEL_SHIFT; 966 + src = cfg & CFG_SRC_SEL_MASK; 967 + src >>= CFG_SRC_SEL_SHIFT; 971 968 972 969 num_parents = clk_hw_get_num_parents(hw); 973 970 for (i = 0; i < num_parents; i++) { 974 - if (cfg == rcg->parent_map[i].cfg) { 971 + if (src == rcg->parent_map[i].cfg) { 975 972 f->src = rcg->parent_map[i].src; 976 973 p = clk_hw_get_parent_by_index(&rcg->clkr.hw, i); 977 974 prate = clk_hw_get_rate(p);
+15 -30
drivers/clk/qcom/dispcc-sc7180.c
··· 76 76 77 77 static const struct parent_map disp_cc_parent_map_0[] = { 78 78 { P_BI_TCXO, 0 }, 79 - { P_CORE_BI_PLL_TEST_SE, 7 }, 80 79 }; 81 80 82 81 static const struct clk_parent_data disp_cc_parent_data_0[] = { 83 82 { .fw_name = "bi_tcxo" }, 84 - { .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" }, 85 83 }; 86 84 87 85 static const struct parent_map disp_cc_parent_map_1[] = { 88 86 { P_BI_TCXO, 0 }, 89 87 { P_DP_PHY_PLL_LINK_CLK, 1 }, 90 88 { P_DP_PHY_PLL_VCO_DIV_CLK, 2 }, 91 - { P_CORE_BI_PLL_TEST_SE, 7 }, 92 89 }; 93 90 94 91 static const struct clk_parent_data disp_cc_parent_data_1[] = { 95 92 { .fw_name = "bi_tcxo" }, 96 - { .fw_name = "dp_phy_pll_link_clk", .name = "dp_phy_pll_link_clk" }, 97 - { .fw_name = "dp_phy_pll_vco_div_clk", 98 - .name = "dp_phy_pll_vco_div_clk"}, 99 - { .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" }, 93 + { .fw_name = "dp_phy_pll_link_clk" }, 94 + { .fw_name = "dp_phy_pll_vco_div_clk" }, 100 95 }; 101 96 102 97 static const struct parent_map disp_cc_parent_map_2[] = { 103 98 { P_BI_TCXO, 0 }, 104 99 { P_DSI0_PHY_PLL_OUT_BYTECLK, 1 }, 105 - { P_CORE_BI_PLL_TEST_SE, 7 }, 106 100 }; 107 101 108 102 static const struct clk_parent_data disp_cc_parent_data_2[] = { 109 103 { .fw_name = "bi_tcxo" }, 110 - { .fw_name = "dsi0_phy_pll_out_byteclk", 111 - .name = "dsi0_phy_pll_out_byteclk" }, 112 - { .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" }, 104 + { .fw_name = "dsi0_phy_pll_out_byteclk" }, 113 105 }; 114 106 115 107 static const struct parent_map disp_cc_parent_map_3[] = { ··· 109 117 { P_DISP_CC_PLL0_OUT_MAIN, 1 }, 110 118 { P_GPLL0_OUT_MAIN, 4 }, 111 119 { P_DISP_CC_PLL0_OUT_EVEN, 5 }, 112 - { P_CORE_BI_PLL_TEST_SE, 7 }, 113 120 }; 114 121 115 122 static const struct clk_parent_data disp_cc_parent_data_3[] = { ··· 116 125 { .hw = &disp_cc_pll0.clkr.hw }, 117 126 { .fw_name = "gcc_disp_gpll0_clk_src" }, 118 127 { .hw = &disp_cc_pll0_out_even.clkr.hw }, 119 - { .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" }, 120 128 }; 121 129 122 130 static const struct parent_map disp_cc_parent_map_4[] = { 123 131 { P_BI_TCXO, 0 }, 124 132 { P_GPLL0_OUT_MAIN, 4 }, 125 - { P_CORE_BI_PLL_TEST_SE, 7 }, 126 133 }; 127 134 128 135 static const struct clk_parent_data disp_cc_parent_data_4[] = { 129 136 { .fw_name = "bi_tcxo" }, 130 137 { .fw_name = "gcc_disp_gpll0_clk_src" }, 131 - { .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" }, 132 138 }; 133 139 134 140 static const struct parent_map disp_cc_parent_map_5[] = { 135 141 { P_BI_TCXO, 0 }, 136 142 { P_DSI0_PHY_PLL_OUT_DSICLK, 1 }, 137 - { P_CORE_BI_PLL_TEST_SE, 7 }, 138 143 }; 139 144 140 145 static const struct clk_parent_data disp_cc_parent_data_5[] = { 141 146 { .fw_name = "bi_tcxo" }, 142 - { .fw_name = "dsi0_phy_pll_out_dsiclk", 143 - .name = "dsi0_phy_pll_out_dsiclk" }, 144 - { .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" }, 147 + { .fw_name = "dsi0_phy_pll_out_dsiclk" }, 145 148 }; 146 149 147 150 static const struct freq_tbl ftbl_disp_cc_mdss_ahb_clk_src[] = { ··· 154 169 .clkr.hw.init = &(struct clk_init_data){ 155 170 .name = "disp_cc_mdss_ahb_clk_src", 156 171 .parent_data = disp_cc_parent_data_4, 157 - .num_parents = 3, 172 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_4), 158 173 .flags = CLK_SET_RATE_PARENT, 159 174 .ops = &clk_rcg2_shared_ops, 160 175 }, ··· 168 183 .clkr.hw.init = &(struct clk_init_data){ 169 184 .name = "disp_cc_mdss_byte0_clk_src", 170 185 .parent_data = disp_cc_parent_data_2, 171 - .num_parents = 3, 186 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_2), 172 187 .flags = CLK_SET_RATE_PARENT, 173 188 .ops = &clk_byte2_ops, 174 189 }, ··· 188 203 .clkr.hw.init = &(struct clk_init_data){ 189 204 .name = "disp_cc_mdss_dp_aux_clk_src", 190 205 .parent_data = disp_cc_parent_data_0, 191 - .num_parents = 2, 206 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_0), 192 207 .ops = &clk_rcg2_ops, 193 208 }, 194 209 }; ··· 201 216 .clkr.hw.init = &(struct clk_init_data){ 202 217 .name = "disp_cc_mdss_dp_crypto_clk_src", 203 218 .parent_data = disp_cc_parent_data_1, 204 - .num_parents = 4, 219 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_1), 205 220 .flags = CLK_SET_RATE_PARENT, 206 221 .ops = &clk_byte2_ops, 207 222 }, ··· 215 230 .clkr.hw.init = &(struct clk_init_data){ 216 231 .name = "disp_cc_mdss_dp_link_clk_src", 217 232 .parent_data = disp_cc_parent_data_1, 218 - .num_parents = 4, 233 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_1), 219 234 .flags = CLK_SET_RATE_PARENT, 220 235 .ops = &clk_byte2_ops, 221 236 }, ··· 229 244 .clkr.hw.init = &(struct clk_init_data){ 230 245 .name = "disp_cc_mdss_dp_pixel_clk_src", 231 246 .parent_data = disp_cc_parent_data_1, 232 - .num_parents = 4, 247 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_1), 233 248 .flags = CLK_SET_RATE_PARENT, 234 249 .ops = &clk_dp_ops, 235 250 }, ··· 244 259 .clkr.hw.init = &(struct clk_init_data){ 245 260 .name = "disp_cc_mdss_esc0_clk_src", 246 261 .parent_data = disp_cc_parent_data_2, 247 - .num_parents = 3, 262 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_2), 248 263 .ops = &clk_rcg2_ops, 249 264 }, 250 265 }; ··· 267 282 .clkr.hw.init = &(struct clk_init_data){ 268 283 .name = "disp_cc_mdss_mdp_clk_src", 269 284 .parent_data = disp_cc_parent_data_3, 270 - .num_parents = 5, 285 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_3), 271 286 .ops = &clk_rcg2_shared_ops, 272 287 }, 273 288 }; ··· 280 295 .clkr.hw.init = &(struct clk_init_data){ 281 296 .name = "disp_cc_mdss_pclk0_clk_src", 282 297 .parent_data = disp_cc_parent_data_5, 283 - .num_parents = 3, 298 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_5), 284 299 .flags = CLK_SET_RATE_PARENT, 285 300 .ops = &clk_pixel_ops, 286 301 }, ··· 295 310 .clkr.hw.init = &(struct clk_init_data){ 296 311 .name = "disp_cc_mdss_rot_clk_src", 297 312 .parent_data = disp_cc_parent_data_3, 298 - .num_parents = 5, 313 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_3), 299 314 .ops = &clk_rcg2_shared_ops, 300 315 }, 301 316 }; ··· 309 324 .clkr.hw.init = &(struct clk_init_data){ 310 325 .name = "disp_cc_mdss_vsync_clk_src", 311 326 .parent_data = disp_cc_parent_data_0, 312 - .num_parents = 2, 327 + .num_parents = ARRAY_SIZE(disp_cc_parent_data_0), 313 328 .ops = &clk_rcg2_shared_ops, 314 329 }, 315 330 };
+1 -3
drivers/clk/qcom/gpucc-sc7180.c
··· 60 60 { P_GPU_CC_PLL1_OUT_MAIN, 3 }, 61 61 { P_GPLL0_OUT_MAIN, 5 }, 62 62 { P_GPLL0_OUT_MAIN_DIV, 6 }, 63 - { P_CORE_BI_PLL_TEST_SE, 7 }, 64 63 }; 65 64 66 65 static const struct clk_parent_data gpu_cc_parent_data_0[] = { ··· 67 68 { .hw = &gpu_cc_pll1.clkr.hw }, 68 69 { .fw_name = "gcc_gpu_gpll0_clk_src" }, 69 70 { .fw_name = "gcc_gpu_gpll0_div_clk_src" }, 70 - { .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" }, 71 71 }; 72 72 73 73 static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = { ··· 84 86 .clkr.hw.init = &(struct clk_init_data){ 85 87 .name = "gpu_cc_gmu_clk_src", 86 88 .parent_data = gpu_cc_parent_data_0, 87 - .num_parents = 5, 89 + .num_parents = ARRAY_SIZE(gpu_cc_parent_data_0), 88 90 .flags = CLK_SET_RATE_PARENT, 89 91 .ops = &clk_rcg2_shared_ops, 90 92 },
+1 -3
drivers/clk/qcom/videocc-sc7180.c
··· 50 50 static const struct parent_map video_cc_parent_map_1[] = { 51 51 { P_BI_TCXO, 0 }, 52 52 { P_VIDEO_PLL0_OUT_MAIN, 1 }, 53 - { P_CORE_BI_PLL_TEST_SE, 7 }, 54 53 }; 55 54 56 55 static const struct clk_parent_data video_cc_parent_data_1[] = { 57 56 { .fw_name = "bi_tcxo" }, 58 57 { .hw = &video_pll0.clkr.hw }, 59 - { .fw_name = "core_bi_pll_test_se", .name = "core_bi_pll_test_se" }, 60 58 }; 61 59 62 60 static const struct freq_tbl ftbl_video_cc_venus_clk_src[] = { ··· 76 78 .clkr.hw.init = &(struct clk_init_data){ 77 79 .name = "video_cc_venus_clk_src", 78 80 .parent_data = video_cc_parent_data_1, 79 - .num_parents = 3, 81 + .num_parents = ARRAY_SIZE(video_cc_parent_data_1), 80 82 .flags = CLK_SET_RATE_PARENT, 81 83 .ops = &clk_rcg2_shared_ops, 82 84 },
+3
include/linux/of_clk.h
··· 6 6 #ifndef __LINUX_OF_CLK_H 7 7 #define __LINUX_OF_CLK_H 8 8 9 + struct device_node; 10 + struct of_device_id; 11 + 9 12 #if defined(CONFIG_COMMON_CLK) && defined(CONFIG_OF) 10 13 11 14 unsigned int of_clk_get_parent_count(struct device_node *np);