Skip to content

Commit b4de531

Browse files
shcgitShawn Guo
authored andcommitted
ARM: i.MX27 clk: Add 26 MHz oscillator circuit clock gate
This patch adds missing 26 MHz oscillator circuit clock gate support. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
1 parent 2d130d9 commit b4de531

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

arch/arm/mach-imx/clk-imx27.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ static void __iomem *ccm __initdata;
2727
static const char *vpu_sel_clks[] = { "spll", "mpll_main2", };
2828
static const char *cpu_sel_clks[] = { "mpll_main2", "mpll", };
2929
static const char *mpll_sel_clks[] = { "fpm", "mpll_osc_sel", };
30-
static const char *mpll_osc_sel_clks[] = { "ckih", "ckih_div1p5", };
30+
static const char *mpll_osc_sel_clks[] = { "ckih_gate", "ckih_div1p5", };
3131
static const char *clko_sel_clks[] = {
32-
"ckil", "fpm", "ckih", "ckih",
33-
"ckih", "mpll", "spll", "cpu_div",
32+
"ckil", "fpm", "ckih_gate", "ckih_gate",
33+
"ckih_gate", "mpll", "spll", "cpu_div",
3434
"ahb", "ipg", "per1_div", "per2_div",
3535
"per3_div", "per4_div", "ssi1_div", "ssi2_div",
3636
"nfc_div", "mshc_div", "vpu_div", "60m",
@@ -50,11 +50,12 @@ static void __init _mx27_clocks_init(unsigned long fref)
5050
clk[IMX27_CLK_CKIH] = imx_clk_fixed("ckih", fref);
5151
clk[IMX27_CLK_CKIL] = imx_clk_fixed("ckil", 32768);
5252
clk[IMX27_CLK_FPM] = imx_clk_fixed_factor("fpm", "ckil", 1024, 1);
53-
clk[IMX27_CLK_CKIH_DIV1P5] = imx_clk_fixed_factor("ckih_div1p5", "ckih", 2, 3);
53+
clk[IMX27_CLK_CKIH_DIV1P5] = imx_clk_fixed_factor("ckih_div1p5", "ckih_gate", 2, 3);
54+
clk[IMX27_CLK_CKIH_GATE] = imx_clk_gate_dis("ckih_gate", "ckih", CCM_CSCR, 3);
5455
clk[IMX27_CLK_MPLL_OSC_SEL] = imx_clk_mux("mpll_osc_sel", CCM_CSCR, 4, 1, mpll_osc_sel_clks, ARRAY_SIZE(mpll_osc_sel_clks));
5556
clk[IMX27_CLK_MPLL_SEL] = imx_clk_mux("mpll_sel", CCM_CSCR, 16, 1, mpll_sel_clks, ARRAY_SIZE(mpll_sel_clks));
5657
clk[IMX27_CLK_MPLL] = imx_clk_pllv1("mpll", "mpll_sel", CCM_MPCTL0);
57-
clk[IMX27_CLK_SPLL] = imx_clk_pllv1("spll", "ckih", CCM_SPCTL0);
58+
clk[IMX27_CLK_SPLL] = imx_clk_pllv1("spll", "ckih_gate", CCM_SPCTL0);
5859
clk[IMX27_CLK_SPLL_GATE] = imx_clk_gate("spll_gate", "spll", CCM_CSCR, 1);
5960
clk[IMX27_CLK_MPLL_MAIN2] = imx_clk_fixed_factor("mpll_main2", "mpll", 2, 3);
6061

include/dt-bindings/clock/imx27-clock.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
#define IMX27_CLK_MSHC_IPG_GATE 89
103103
#define IMX27_CLK_RTIC_AHB_GATE 90
104104
#define IMX27_CLK_MSHC_BAUD_GATE 91
105-
#define IMX27_CLK_MAX 92
105+
#define IMX27_CLK_CKIH_GATE 92
106+
#define IMX27_CLK_MAX 93
106107

107108
#endif

0 commit comments

Comments
 (0)