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

clk: qcom: Add missing msm8998 ufs_unipro_core_clk_src

ufs_unipro_core_clk_src is required to allow UFS to clock scale for power
savings.

Fixes: b5f5f525c547 ("clk: qcom: Add MSM8998 Global Clock Control (GCC) driver")
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Link: https://lkml.kernel.org/r/20200528142205.44003-1-jeffrey.l.hugo@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Jeffrey Hugo and committed by
Stephen Boyd
b1e8d713 d33b7eb8

+28
+27
drivers/clk/qcom/gcc-msm8998.c
··· 1110 1110 }, 1111 1111 }; 1112 1112 1113 + static const struct freq_tbl ftbl_ufs_unipro_core_clk_src[] = { 1114 + F(37500000, P_GPLL0_OUT_MAIN, 16, 0, 0), 1115 + F(75000000, P_GPLL0_OUT_MAIN, 8, 0, 0), 1116 + F(150000000, P_GPLL0_OUT_MAIN, 4, 0, 0), 1117 + { } 1118 + }; 1119 + 1120 + static struct clk_rcg2 ufs_unipro_core_clk_src = { 1121 + .cmd_rcgr = 0x76028, 1122 + .mnd_width = 8, 1123 + .hid_width = 5, 1124 + .parent_map = gcc_parent_map_0, 1125 + .freq_tbl = ftbl_ufs_unipro_core_clk_src, 1126 + .clkr.hw.init = &(struct clk_init_data){ 1127 + .name = "ufs_unipro_core_clk_src", 1128 + .parent_names = gcc_parent_names_0, 1129 + .num_parents = 4, 1130 + .ops = &clk_rcg2_ops, 1131 + }, 1132 + }; 1133 + 1113 1134 static const struct freq_tbl ftbl_usb30_master_clk_src[] = { 1114 1135 F(19200000, P_XO, 1, 0, 0), 1115 1136 F(60000000, P_GPLL0_OUT_MAIN, 10, 0, 0), ··· 2570 2549 .enable_mask = BIT(0), 2571 2550 .hw.init = &(struct clk_init_data){ 2572 2551 .name = "gcc_ufs_unipro_core_clk", 2552 + .parent_names = (const char *[]){ 2553 + "ufs_unipro_core_clk_src", 2554 + }, 2555 + .num_parents = 1, 2556 + .flags = CLK_SET_RATE_PARENT, 2573 2557 .ops = &clk_branch2_ops, 2574 2558 }, 2575 2559 }, ··· 2930 2904 [SDCC4_APPS_CLK_SRC] = &sdcc4_apps_clk_src.clkr, 2931 2905 [TSIF_REF_CLK_SRC] = &tsif_ref_clk_src.clkr, 2932 2906 [UFS_AXI_CLK_SRC] = &ufs_axi_clk_src.clkr, 2907 + [UFS_UNIPRO_CORE_CLK_SRC] = &ufs_unipro_core_clk_src.clkr, 2933 2908 [USB30_MASTER_CLK_SRC] = &usb30_master_clk_src.clkr, 2934 2909 [USB30_MOCK_UTMI_CLK_SRC] = &usb30_mock_utmi_clk_src.clkr, 2935 2910 [USB3_PHY_AUX_CLK_SRC] = &usb3_phy_aux_clk_src.clkr,
+1
include/dt-bindings/clock/qcom,gcc-msm8998.h
··· 183 183 #define GCC_MSS_SNOC_AXI_CLK 174 184 184 #define GCC_MSS_MNOC_BIMC_AXI_CLK 175 185 185 #define GCC_BIMC_GFX_CLK 176 186 + #define UFS_UNIPRO_CORE_CLK_SRC 177 186 187 187 188 #define PCIE_0_GDSC 0 188 189 #define UFS_GDSC 1