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

clk: mediatek: export cpu multiplexer clock for MT2701/MT7623 SoCs

The patch enables CPU multiplexer clock on MT2701/MT7623 SoC which fixes
up cpufreq driver fails at acquiring intermediate clock source when driver
probe is called.

Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Sean Wang and committed by
Stephen Boyd
43ed50ee 1e17de90

+10 -1
+8
drivers/clk/mediatek/clk-mt2701.c
··· 20 20 21 21 #include "clk-mtk.h" 22 22 #include "clk-gate.h" 23 + #include "clk-cpumux.h" 23 24 24 25 #include <dt-bindings/clock/mt2701-clk.h> 25 26 ··· 494 493 "mmpll" 495 494 }; 496 495 496 + static const struct mtk_composite cpu_muxes[] __initconst = { 497 + MUX(CLK_INFRA_CPUSEL, "infra_cpu_sel", cpu_parents, 0x0000, 2, 2), 498 + }; 499 + 497 500 static const struct mtk_composite top_muxes[] = { 498 501 MUX_GATE_FLAGS(CLK_TOP_AXI_SEL, "axi_sel", axi_parents, 499 502 0x0040, 0, 3, 7, CLK_IS_CRITICAL), ··· 763 758 764 759 mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs), 765 760 infra_clk_data); 761 + 762 + mtk_clk_register_cpumuxes(node, cpu_muxes, ARRAY_SIZE(cpu_muxes), 763 + infra_clk_data); 766 764 767 765 r = of_clk_add_provider(node, of_clk_src_onecell_get, infra_clk_data); 768 766 if (r)
+2 -1
include/dt-bindings/clock/mt2701-clk.h
··· 221 221 #define CLK_INFRA_PMICWRAP 17 222 222 #define CLK_INFRA_DDCCI 18 223 223 #define CLK_INFRA_CLK_13M 19 224 - #define CLK_INFRA_NR 20 224 + #define CLK_INFRA_CPUSEL 20 225 + #define CLK_INFRA_NR 21 225 226 226 227 /* PERICFG */ 227 228