diff options
Diffstat (limited to 'arch/arm/mach-imx/clk-imx6q.c')
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 126 |
1 files changed, 115 insertions, 11 deletions
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index d38e54f5b6d7..151259003086 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2011 Freescale Semiconductor, Inc. | 2 | * Copyright 2011-2013 Freescale Semiconductor, Inc. |
3 | * Copyright 2011 Linaro Ltd. | 3 | * Copyright 2011 Linaro Ltd. |
4 | * | 4 | * |
5 | * The code contained herein is licensed under the GNU General Public | 5 | * The code contained herein is licensed under the GNU General Public |
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/clk.h> | 15 | #include <linux/clk.h> |
16 | #include <linux/clkdev.h> | 16 | #include <linux/clkdev.h> |
17 | #include <linux/delay.h> | ||
17 | #include <linux/err.h> | 18 | #include <linux/err.h> |
18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
19 | #include <linux/of.h> | 20 | #include <linux/of.h> |
@@ -22,6 +23,12 @@ | |||
22 | 23 | ||
23 | #include "clk.h" | 24 | #include "clk.h" |
24 | #include "common.h" | 25 | #include "common.h" |
26 | #include "hardware.h" | ||
27 | |||
28 | #define CCR 0x0 | ||
29 | #define BM_CCR_WB_COUNT (0x7 << 16) | ||
30 | #define BM_CCR_RBC_BYPASS_COUNT (0x3f << 21) | ||
31 | #define BM_CCR_RBC_EN (0x1 << 27) | ||
25 | 32 | ||
26 | #define CCGR0 0x68 | 33 | #define CCGR0 0x68 |
27 | #define CCGR1 0x6c | 34 | #define CCGR1 0x6c |
@@ -67,6 +74,67 @@ void imx6q_set_chicken_bit(void) | |||
67 | writel_relaxed(val, ccm_base + CGPR); | 74 | writel_relaxed(val, ccm_base + CGPR); |
68 | } | 75 | } |
69 | 76 | ||
77 | static void imx6q_enable_rbc(bool enable) | ||
78 | { | ||
79 | u32 val; | ||
80 | static bool last_rbc_mode; | ||
81 | |||
82 | if (last_rbc_mode == enable) | ||
83 | return; | ||
84 | /* | ||
85 | * need to mask all interrupts in GPC before | ||
86 | * operating RBC configurations | ||
87 | */ | ||
88 | imx_gpc_mask_all(); | ||
89 | |||
90 | /* configure RBC enable bit */ | ||
91 | val = readl_relaxed(ccm_base + CCR); | ||
92 | val &= ~BM_CCR_RBC_EN; | ||
93 | val |= enable ? BM_CCR_RBC_EN : 0; | ||
94 | writel_relaxed(val, ccm_base + CCR); | ||
95 | |||
96 | /* configure RBC count */ | ||
97 | val = readl_relaxed(ccm_base + CCR); | ||
98 | val &= ~BM_CCR_RBC_BYPASS_COUNT; | ||
99 | val |= enable ? BM_CCR_RBC_BYPASS_COUNT : 0; | ||
100 | writel(val, ccm_base + CCR); | ||
101 | |||
102 | /* | ||
103 | * need to delay at least 2 cycles of CKIL(32K) | ||
104 | * due to hardware design requirement, which is | ||
105 | * ~61us, here we use 65us for safe | ||
106 | */ | ||
107 | udelay(65); | ||
108 | |||
109 | /* restore GPC interrupt mask settings */ | ||
110 | imx_gpc_restore_all(); | ||
111 | |||
112 | last_rbc_mode = enable; | ||
113 | } | ||
114 | |||
115 | static void imx6q_enable_wb(bool enable) | ||
116 | { | ||
117 | u32 val; | ||
118 | static bool last_wb_mode; | ||
119 | |||
120 | if (last_wb_mode == enable) | ||
121 | return; | ||
122 | |||
123 | /* configure well bias enable bit */ | ||
124 | val = readl_relaxed(ccm_base + CLPCR); | ||
125 | val &= ~BM_CLPCR_WB_PER_AT_LPM; | ||
126 | val |= enable ? BM_CLPCR_WB_PER_AT_LPM : 0; | ||
127 | writel_relaxed(val, ccm_base + CLPCR); | ||
128 | |||
129 | /* configure well bias count */ | ||
130 | val = readl_relaxed(ccm_base + CCR); | ||
131 | val &= ~BM_CCR_WB_COUNT; | ||
132 | val |= enable ? BM_CCR_WB_COUNT : 0; | ||
133 | writel_relaxed(val, ccm_base + CCR); | ||
134 | |||
135 | last_wb_mode = enable; | ||
136 | } | ||
137 | |||
70 | int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | 138 | int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) |
71 | { | 139 | { |
72 | u32 val = readl_relaxed(ccm_base + CLPCR); | 140 | u32 val = readl_relaxed(ccm_base + CLPCR); |
@@ -74,6 +142,8 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | |||
74 | val &= ~BM_CLPCR_LPM; | 142 | val &= ~BM_CLPCR_LPM; |
75 | switch (mode) { | 143 | switch (mode) { |
76 | case WAIT_CLOCKED: | 144 | case WAIT_CLOCKED: |
145 | imx6q_enable_wb(false); | ||
146 | imx6q_enable_rbc(false); | ||
77 | break; | 147 | break; |
78 | case WAIT_UNCLOCKED: | 148 | case WAIT_UNCLOCKED: |
79 | val |= 0x1 << BP_CLPCR_LPM; | 149 | val |= 0x1 << BP_CLPCR_LPM; |
@@ -92,6 +162,8 @@ int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) | |||
92 | val |= 0x3 << BP_CLPCR_STBY_COUNT; | 162 | val |= 0x3 << BP_CLPCR_STBY_COUNT; |
93 | val |= BM_CLPCR_VSTBY; | 163 | val |= BM_CLPCR_VSTBY; |
94 | val |= BM_CLPCR_SBYOS; | 164 | val |= BM_CLPCR_SBYOS; |
165 | imx6q_enable_wb(true); | ||
166 | imx6q_enable_rbc(true); | ||
95 | break; | 167 | break; |
96 | default: | 168 | default: |
97 | return -EINVAL; | 169 | return -EINVAL; |
@@ -109,29 +181,29 @@ static const char *periph_clk2_sels[] = { "pll3_usb_otg", "osc", }; | |||
109 | static const char *periph_sels[] = { "periph_pre", "periph_clk2", }; | 181 | static const char *periph_sels[] = { "periph_pre", "periph_clk2", }; |
110 | static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", }; | 182 | static const char *periph2_sels[] = { "periph2_pre", "periph2_clk2", }; |
111 | static const char *axi_sels[] = { "periph", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | 183 | static const char *axi_sels[] = { "periph", "pll2_pfd2_396m", "pll3_pfd1_540m", }; |
112 | static const char *audio_sels[] = { "pll4_audio", "pll3_pfd2_508m", "pll3_pfd3_454m", "pll3_usb_otg", }; | 184 | static const char *audio_sels[] = { "pll4_post_div", "pll3_pfd2_508m", "pll3_pfd3_454m", "pll3_usb_otg", }; |
113 | static const char *gpu_axi_sels[] = { "axi", "ahb", }; | 185 | static const char *gpu_axi_sels[] = { "axi", "ahb", }; |
114 | static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", }; | 186 | static const char *gpu2d_core_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd0_352m", "pll2_pfd2_396m", }; |
115 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; | 187 | static const char *gpu3d_core_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd2_396m", }; |
116 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd9_720m", }; | 188 | static const char *gpu3d_shader_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll2_pfd1_594m", "pll2_pfd9_720m", }; |
117 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; | 189 | static const char *ipu_sels[] = { "mmdc_ch0_axi", "pll2_pfd2_396m", "pll3_120m", "pll3_pfd1_540m", }; |
118 | static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_usb_otg", }; | 190 | static const char *ldb_di_sels[] = { "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "mmdc_ch1_axi", "pll3_usb_otg", }; |
119 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; | 191 | static const char *ipu_di_pre_sels[] = { "mmdc_ch0_axi", "pll3_usb_otg", "pll5_video_div", "pll2_pfd0_352m", "pll2_pfd2_396m", "pll3_pfd1_540m", }; |
120 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 192 | static const char *ipu1_di0_sels[] = { "ipu1_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
121 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 193 | static const char *ipu1_di1_sels[] = { "ipu1_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
122 | static const char *ipu2_di0_sels[] = { "ipu2_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 194 | static const char *ipu2_di0_sels[] = { "ipu2_di0_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
123 | static const char *ipu2_di1_sels[] = { "ipu2_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; | 195 | static const char *ipu2_di1_sels[] = { "ipu2_di1_pre", "dummy", "dummy", "ldb_di0", "ldb_di1", }; |
124 | static const char *hsi_tx_sels[] = { "pll3_120m", "pll2_pfd2_396m", }; | 196 | static const char *hsi_tx_sels[] = { "pll3_120m", "pll2_pfd2_396m", }; |
125 | static const char *pcie_axi_sels[] = { "axi", "ahb", }; | 197 | static const char *pcie_axi_sels[] = { "axi", "ahb", }; |
126 | static const char *ssi_sels[] = { "pll3_pfd2_508m", "pll3_pfd3_454m", "pll4_audio", }; | 198 | static const char *ssi_sels[] = { "pll3_pfd2_508m", "pll3_pfd3_454m", "pll4_post_div", }; |
127 | static const char *usdhc_sels[] = { "pll2_pfd2_396m", "pll2_pfd0_352m", }; | 199 | static const char *usdhc_sels[] = { "pll2_pfd2_396m", "pll2_pfd0_352m", }; |
128 | static const char *enfc_sels[] = { "pll2_pfd0_352m", "pll2_bus", "pll3_usb_otg", "pll2_pfd2_396m", }; | 200 | static const char *enfc_sels[] = { "pll2_pfd0_352m", "pll2_bus", "pll3_usb_otg", "pll2_pfd2_396m", }; |
129 | static const char *emi_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd2_396m", "pll2_pfd0_352m", }; | 201 | static const char *emi_sels[] = { "axi", "pll3_usb_otg", "pll2_pfd2_396m", "pll2_pfd0_352m", }; |
130 | static const char *vdo_axi_sels[] = { "axi", "ahb", }; | 202 | static const char *vdo_axi_sels[] = { "axi", "ahb", }; |
131 | static const char *vpu_axi_sels[] = { "axi", "pll2_pfd2_396m", "pll2_pfd0_352m", }; | 203 | static const char *vpu_axi_sels[] = { "axi", "pll2_pfd2_396m", "pll2_pfd0_352m", }; |
132 | static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video", | 204 | static const char *cko1_sels[] = { "pll3_usb_otg", "pll2_bus", "pll1_sys", "pll5_video_div", |
133 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", | 205 | "dummy", "axi", "enfc", "ipu1_di0", "ipu1_di1", "ipu2_di0", |
134 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_audio", }; | 206 | "ipu2_di1", "ahb", "ipg", "ipg_per", "ckil", "pll4_post_div", }; |
135 | 207 | ||
136 | enum mx6q_clks { | 208 | enum mx6q_clks { |
137 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, | 209 | dummy, ckil, ckih, osc, pll2_pfd0_352m, pll2_pfd1_594m, pll2_pfd2_396m, |
@@ -165,7 +237,7 @@ enum mx6q_clks { | |||
165 | pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, | 237 | pll4_audio, pll5_video, pll8_mlb, pll7_usb_host, pll6_enet, ssi1_ipg, |
166 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, | 238 | ssi2_ipg, ssi3_ipg, rom, usbphy1, usbphy2, ldb_di0_div_3_5, ldb_di1_div_3_5, |
167 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, | 239 | sata_ref, sata_ref_100m, pcie_ref, pcie_ref_125m, enet_ref, usbphy1_gate, |
168 | usbphy2_gate, clk_max | 240 | usbphy2_gate, pll4_post_div, pll5_post_div, pll5_video_div, clk_max |
169 | }; | 241 | }; |
170 | 242 | ||
171 | static struct clk *clk[clk_max]; | 243 | static struct clk *clk[clk_max]; |
@@ -182,6 +254,21 @@ static struct clk_div_table clk_enet_ref_table[] = { | |||
182 | { .val = 3, .div = 4, }, | 254 | { .val = 3, .div = 4, }, |
183 | }; | 255 | }; |
184 | 256 | ||
257 | static struct clk_div_table post_div_table[] = { | ||
258 | { .val = 2, .div = 1, }, | ||
259 | { .val = 1, .div = 2, }, | ||
260 | { .val = 0, .div = 4, }, | ||
261 | { } | ||
262 | }; | ||
263 | |||
264 | static struct clk_div_table video_div_table[] = { | ||
265 | { .val = 0, .div = 1, }, | ||
266 | { .val = 1, .div = 2, }, | ||
267 | { .val = 2, .div = 1, }, | ||
268 | { .val = 3, .div = 4, }, | ||
269 | { } | ||
270 | }; | ||
271 | |||
185 | int __init mx6q_clocks_init(void) | 272 | int __init mx6q_clocks_init(void) |
186 | { | 273 | { |
187 | struct device_node *np; | 274 | struct device_node *np; |
@@ -208,6 +295,14 @@ int __init mx6q_clocks_init(void) | |||
208 | base = of_iomap(np, 0); | 295 | base = of_iomap(np, 0); |
209 | WARN_ON(!base); | 296 | WARN_ON(!base); |
210 | 297 | ||
298 | /* Audio/video PLL post dividers do not work on i.MX6q revision 1.0 */ | ||
299 | if (cpu_is_imx6q() && imx6q_revision() == IMX_CHIP_REVISION_1_0) { | ||
300 | post_div_table[1].div = 1; | ||
301 | post_div_table[2].div = 1; | ||
302 | video_div_table[1].div = 1; | ||
303 | video_div_table[2].div = 1; | ||
304 | }; | ||
305 | |||
211 | /* type name parent_name base div_mask */ | 306 | /* type name parent_name base div_mask */ |
212 | clk[pll1_sys] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); | 307 | clk[pll1_sys] = imx_clk_pllv3(IMX_PLLV3_SYS, "pll1_sys", "osc", base, 0x7f); |
213 | clk[pll2_bus] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); | 308 | clk[pll2_bus] = imx_clk_pllv3(IMX_PLLV3_GENERIC, "pll2_bus", "osc", base + 0x30, 0x1); |
@@ -260,6 +355,10 @@ int __init mx6q_clocks_init(void) | |||
260 | clk[pll3_60m] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); | 355 | clk[pll3_60m] = imx_clk_fixed_factor("pll3_60m", "pll3_usb_otg", 1, 8); |
261 | clk[twd] = imx_clk_fixed_factor("twd", "arm", 1, 2); | 356 | clk[twd] = imx_clk_fixed_factor("twd", "arm", 1, 2); |
262 | 357 | ||
358 | clk[pll4_post_div] = clk_register_divider_table(NULL, "pll4_post_div", "pll4_audio", CLK_SET_RATE_PARENT, base + 0x70, 19, 2, 0, post_div_table, &imx_ccm_lock); | ||
359 | clk[pll5_post_div] = clk_register_divider_table(NULL, "pll5_post_div", "pll5_video", CLK_SET_RATE_PARENT, base + 0xa0, 19, 2, 0, post_div_table, &imx_ccm_lock); | ||
360 | clk[pll5_video_div] = clk_register_divider_table(NULL, "pll5_video_div", "pll5_post_div", CLK_SET_RATE_PARENT, base + 0x170, 30, 2, 0, video_div_table, &imx_ccm_lock); | ||
361 | |||
263 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-ccm"); | 362 | np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-ccm"); |
264 | base = of_iomap(np, 0); | 363 | base = of_iomap(np, 0); |
265 | WARN_ON(!base); | 364 | WARN_ON(!base); |
@@ -283,8 +382,8 @@ int __init mx6q_clocks_init(void) | |||
283 | clk[gpu3d_shader_sel] = imx_clk_mux("gpu3d_shader_sel", base + 0x18, 8, 2, gpu3d_shader_sels, ARRAY_SIZE(gpu3d_shader_sels)); | 382 | clk[gpu3d_shader_sel] = imx_clk_mux("gpu3d_shader_sel", base + 0x18, 8, 2, gpu3d_shader_sels, ARRAY_SIZE(gpu3d_shader_sels)); |
284 | clk[ipu1_sel] = imx_clk_mux("ipu1_sel", base + 0x3c, 9, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); | 383 | clk[ipu1_sel] = imx_clk_mux("ipu1_sel", base + 0x3c, 9, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); |
285 | clk[ipu2_sel] = imx_clk_mux("ipu2_sel", base + 0x3c, 14, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); | 384 | clk[ipu2_sel] = imx_clk_mux("ipu2_sel", base + 0x3c, 14, 2, ipu_sels, ARRAY_SIZE(ipu_sels)); |
286 | clk[ldb_di0_sel] = imx_clk_mux("ldb_di0_sel", base + 0x2c, 9, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels)); | 385 | clk[ldb_di0_sel] = imx_clk_mux_flags("ldb_di0_sel", base + 0x2c, 9, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT); |
287 | clk[ldb_di1_sel] = imx_clk_mux("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels)); | 386 | clk[ldb_di1_sel] = imx_clk_mux_flags("ldb_di1_sel", base + 0x2c, 12, 3, ldb_di_sels, ARRAY_SIZE(ldb_di_sels), CLK_SET_RATE_PARENT); |
288 | clk[ipu1_di0_pre_sel] = imx_clk_mux("ipu1_di0_pre_sel", base + 0x34, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); | 387 | clk[ipu1_di0_pre_sel] = imx_clk_mux("ipu1_di0_pre_sel", base + 0x34, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); |
289 | clk[ipu1_di1_pre_sel] = imx_clk_mux("ipu1_di1_pre_sel", base + 0x34, 15, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); | 388 | clk[ipu1_di1_pre_sel] = imx_clk_mux("ipu1_di1_pre_sel", base + 0x34, 15, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); |
290 | clk[ipu2_di0_pre_sel] = imx_clk_mux("ipu2_di0_pre_sel", base + 0x38, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); | 389 | clk[ipu2_di0_pre_sel] = imx_clk_mux("ipu2_di0_pre_sel", base + 0x38, 6, 3, ipu_di_pre_sels, ARRAY_SIZE(ipu_di_pre_sels)); |
@@ -332,9 +431,9 @@ int __init mx6q_clocks_init(void) | |||
332 | clk[ipu1_podf] = imx_clk_divider("ipu1_podf", "ipu1_sel", base + 0x3c, 11, 3); | 431 | clk[ipu1_podf] = imx_clk_divider("ipu1_podf", "ipu1_sel", base + 0x3c, 11, 3); |
333 | clk[ipu2_podf] = imx_clk_divider("ipu2_podf", "ipu2_sel", base + 0x3c, 16, 3); | 432 | clk[ipu2_podf] = imx_clk_divider("ipu2_podf", "ipu2_sel", base + 0x3c, 16, 3); |
334 | clk[ldb_di0_div_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); | 433 | clk[ldb_di0_div_3_5] = imx_clk_fixed_factor("ldb_di0_div_3_5", "ldb_di0_sel", 2, 7); |
335 | clk[ldb_di0_podf] = imx_clk_divider("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1); | 434 | clk[ldb_di0_podf] = imx_clk_divider_flags("ldb_di0_podf", "ldb_di0_div_3_5", base + 0x20, 10, 1, 0); |
336 | clk[ldb_di1_div_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); | 435 | clk[ldb_di1_div_3_5] = imx_clk_fixed_factor("ldb_di1_div_3_5", "ldb_di1_sel", 2, 7); |
337 | clk[ldb_di1_podf] = imx_clk_divider("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1); | 436 | clk[ldb_di1_podf] = imx_clk_divider_flags("ldb_di1_podf", "ldb_di1_div_3_5", base + 0x20, 11, 1, 0); |
338 | clk[ipu1_di0_pre] = imx_clk_divider("ipu1_di0_pre", "ipu1_di0_pre_sel", base + 0x34, 3, 3); | 437 | clk[ipu1_di0_pre] = imx_clk_divider("ipu1_di0_pre", "ipu1_di0_pre_sel", base + 0x34, 3, 3); |
339 | clk[ipu1_di1_pre] = imx_clk_divider("ipu1_di1_pre", "ipu1_di1_pre_sel", base + 0x34, 12, 3); | 438 | clk[ipu1_di1_pre] = imx_clk_divider("ipu1_di1_pre", "ipu1_di1_pre_sel", base + 0x34, 12, 3); |
340 | clk[ipu2_di0_pre] = imx_clk_divider("ipu2_di0_pre", "ipu2_di0_pre_sel", base + 0x38, 3, 3); | 439 | clk[ipu2_di0_pre] = imx_clk_divider("ipu2_di0_pre", "ipu2_di0_pre_sel", base + 0x38, 3, 3); |
@@ -448,6 +547,11 @@ int __init mx6q_clocks_init(void) | |||
448 | clk_register_clkdev(clk[cko1], "cko1", NULL); | 547 | clk_register_clkdev(clk[cko1], "cko1", NULL); |
449 | clk_register_clkdev(clk[arm], NULL, "cpu0"); | 548 | clk_register_clkdev(clk[arm], NULL, "cpu0"); |
450 | 549 | ||
550 | if (imx6q_revision() != IMX_CHIP_REVISION_1_0) { | ||
551 | clk_set_parent(clk[ldb_di0_sel], clk[pll5_video_div]); | ||
552 | clk_set_parent(clk[ldb_di1_sel], clk[pll5_video_div]); | ||
553 | } | ||
554 | |||
451 | /* | 555 | /* |
452 | * The gpmi needs 100MHz frequency in the EDO/Sync mode, | 556 | * The gpmi needs 100MHz frequency in the EDO/Sync mode, |
453 | * We can not get the 100MHz from the pll2_pfd0_352m. | 557 | * We can not get the 100MHz from the pll2_pfd0_352m. |