diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-07-29 07:25:01 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-08-19 15:27:17 -0400 |
commit | 819c1de344c5b8350bffd35be9a0fa74541292d3 (patch) | |
tree | a7829ac81de6d968cc24516f17c87da98c528d06 /drivers/clk/mmp/clk-pxa910.c | |
parent | 71472c0c06cf9a3d1540762ea205654c584e3bc4 (diff) |
clk: add CLK_SET_RATE_NO_REPARENT flag
Add a CLK_SET_RATE_NO_REPARENT clock flag, which will prevent muxes
being reparented during clk_set_rate.
To avoid breaking existing platforms, all callers of clk_register_mux()
are adjusted to pass the new flag. Platform maintainers are encouraged
to remove the flag if they wish to allow mux reparenting on set_rate.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Viresh Kumar <viresh.linux@gmail.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: Chao Xie <xiechao.mail@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Emilio López" <emilio@elopez.com.ar>
Cc: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Paul Walmsley <pwalmsley@nvidia.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: spear-devel@list.st.com
Cc: linux-tegra@vger.kernel.org
Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com> [tegra]
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [sunxi]
Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> [Zynq]
Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/mmp/clk-pxa910.c')
-rw-r--r-- | drivers/clk/mmp/clk-pxa910.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/drivers/clk/mmp/clk-pxa910.c b/drivers/clk/mmp/clk-pxa910.c index 6ec05698ed38..9efc6a47535d 100644 --- a/drivers/clk/mmp/clk-pxa910.c +++ b/drivers/clk/mmp/clk-pxa910.c | |||
@@ -204,7 +204,8 @@ void __init pxa910_clk_init(void) | |||
204 | clk_register_clkdev(clk, NULL, "pxa910-pwm.3"); | 204 | clk_register_clkdev(clk, NULL, "pxa910-pwm.3"); |
205 | 205 | ||
206 | clk = clk_register_mux(NULL, "uart0_mux", uart_parent, | 206 | clk = clk_register_mux(NULL, "uart0_mux", uart_parent, |
207 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | 207 | ARRAY_SIZE(uart_parent), |
208 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
208 | apbc_base + APBC_UART0, 4, 3, 0, &clk_lock); | 209 | apbc_base + APBC_UART0, 4, 3, 0, &clk_lock); |
209 | clk_set_parent(clk, uart_pll); | 210 | clk_set_parent(clk, uart_pll); |
210 | clk_register_clkdev(clk, "uart_mux.0", NULL); | 211 | clk_register_clkdev(clk, "uart_mux.0", NULL); |
@@ -214,7 +215,8 @@ void __init pxa910_clk_init(void) | |||
214 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.0"); | 215 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.0"); |
215 | 216 | ||
216 | clk = clk_register_mux(NULL, "uart1_mux", uart_parent, | 217 | clk = clk_register_mux(NULL, "uart1_mux", uart_parent, |
217 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | 218 | ARRAY_SIZE(uart_parent), |
219 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
218 | apbc_base + APBC_UART1, 4, 3, 0, &clk_lock); | 220 | apbc_base + APBC_UART1, 4, 3, 0, &clk_lock); |
219 | clk_set_parent(clk, uart_pll); | 221 | clk_set_parent(clk, uart_pll); |
220 | clk_register_clkdev(clk, "uart_mux.1", NULL); | 222 | clk_register_clkdev(clk, "uart_mux.1", NULL); |
@@ -224,7 +226,8 @@ void __init pxa910_clk_init(void) | |||
224 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.1"); | 226 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.1"); |
225 | 227 | ||
226 | clk = clk_register_mux(NULL, "uart2_mux", uart_parent, | 228 | clk = clk_register_mux(NULL, "uart2_mux", uart_parent, |
227 | ARRAY_SIZE(uart_parent), CLK_SET_RATE_PARENT, | 229 | ARRAY_SIZE(uart_parent), |
230 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
228 | apbcp_base + APBCP_UART2, 4, 3, 0, &clk_lock); | 231 | apbcp_base + APBCP_UART2, 4, 3, 0, &clk_lock); |
229 | clk_set_parent(clk, uart_pll); | 232 | clk_set_parent(clk, uart_pll); |
230 | clk_register_clkdev(clk, "uart_mux.2", NULL); | 233 | clk_register_clkdev(clk, "uart_mux.2", NULL); |
@@ -234,7 +237,8 @@ void __init pxa910_clk_init(void) | |||
234 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.2"); | 237 | clk_register_clkdev(clk, NULL, "pxa2xx-uart.2"); |
235 | 238 | ||
236 | clk = clk_register_mux(NULL, "ssp0_mux", ssp_parent, | 239 | clk = clk_register_mux(NULL, "ssp0_mux", ssp_parent, |
237 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | 240 | ARRAY_SIZE(ssp_parent), |
241 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
238 | apbc_base + APBC_SSP0, 4, 3, 0, &clk_lock); | 242 | apbc_base + APBC_SSP0, 4, 3, 0, &clk_lock); |
239 | clk_register_clkdev(clk, "uart_mux.0", NULL); | 243 | clk_register_clkdev(clk, "uart_mux.0", NULL); |
240 | 244 | ||
@@ -243,7 +247,8 @@ void __init pxa910_clk_init(void) | |||
243 | clk_register_clkdev(clk, NULL, "mmp-ssp.0"); | 247 | clk_register_clkdev(clk, NULL, "mmp-ssp.0"); |
244 | 248 | ||
245 | clk = clk_register_mux(NULL, "ssp1_mux", ssp_parent, | 249 | clk = clk_register_mux(NULL, "ssp1_mux", ssp_parent, |
246 | ARRAY_SIZE(ssp_parent), CLK_SET_RATE_PARENT, | 250 | ARRAY_SIZE(ssp_parent), |
251 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
247 | apbc_base + APBC_SSP1, 4, 3, 0, &clk_lock); | 252 | apbc_base + APBC_SSP1, 4, 3, 0, &clk_lock); |
248 | clk_register_clkdev(clk, "ssp_mux.1", NULL); | 253 | clk_register_clkdev(clk, "ssp_mux.1", NULL); |
249 | 254 | ||
@@ -256,7 +261,8 @@ void __init pxa910_clk_init(void) | |||
256 | clk_register_clkdev(clk, NULL, "pxa3xx-nand.0"); | 261 | clk_register_clkdev(clk, NULL, "pxa3xx-nand.0"); |
257 | 262 | ||
258 | clk = clk_register_mux(NULL, "sdh0_mux", sdh_parent, | 263 | clk = clk_register_mux(NULL, "sdh0_mux", sdh_parent, |
259 | ARRAY_SIZE(sdh_parent), CLK_SET_RATE_PARENT, | 264 | ARRAY_SIZE(sdh_parent), |
265 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
260 | apmu_base + APMU_SDH0, 6, 1, 0, &clk_lock); | 266 | apmu_base + APMU_SDH0, 6, 1, 0, &clk_lock); |
261 | clk_register_clkdev(clk, "sdh0_mux", NULL); | 267 | clk_register_clkdev(clk, "sdh0_mux", NULL); |
262 | 268 | ||
@@ -265,7 +271,8 @@ void __init pxa910_clk_init(void) | |||
265 | clk_register_clkdev(clk, NULL, "sdhci-pxa.0"); | 271 | clk_register_clkdev(clk, NULL, "sdhci-pxa.0"); |
266 | 272 | ||
267 | clk = clk_register_mux(NULL, "sdh1_mux", sdh_parent, | 273 | clk = clk_register_mux(NULL, "sdh1_mux", sdh_parent, |
268 | ARRAY_SIZE(sdh_parent), CLK_SET_RATE_PARENT, | 274 | ARRAY_SIZE(sdh_parent), |
275 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
269 | apmu_base + APMU_SDH1, 6, 1, 0, &clk_lock); | 276 | apmu_base + APMU_SDH1, 6, 1, 0, &clk_lock); |
270 | clk_register_clkdev(clk, "sdh1_mux", NULL); | 277 | clk_register_clkdev(clk, "sdh1_mux", NULL); |
271 | 278 | ||
@@ -282,7 +289,8 @@ void __init pxa910_clk_init(void) | |||
282 | clk_register_clkdev(clk, "sph_clk", NULL); | 289 | clk_register_clkdev(clk, "sph_clk", NULL); |
283 | 290 | ||
284 | clk = clk_register_mux(NULL, "disp0_mux", disp_parent, | 291 | clk = clk_register_mux(NULL, "disp0_mux", disp_parent, |
285 | ARRAY_SIZE(disp_parent), CLK_SET_RATE_PARENT, | 292 | ARRAY_SIZE(disp_parent), |
293 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
286 | apmu_base + APMU_DISP0, 6, 1, 0, &clk_lock); | 294 | apmu_base + APMU_DISP0, 6, 1, 0, &clk_lock); |
287 | clk_register_clkdev(clk, "disp_mux.0", NULL); | 295 | clk_register_clkdev(clk, "disp_mux.0", NULL); |
288 | 296 | ||
@@ -291,7 +299,8 @@ void __init pxa910_clk_init(void) | |||
291 | clk_register_clkdev(clk, NULL, "mmp-disp.0"); | 299 | clk_register_clkdev(clk, NULL, "mmp-disp.0"); |
292 | 300 | ||
293 | clk = clk_register_mux(NULL, "ccic0_mux", ccic_parent, | 301 | clk = clk_register_mux(NULL, "ccic0_mux", ccic_parent, |
294 | ARRAY_SIZE(ccic_parent), CLK_SET_RATE_PARENT, | 302 | ARRAY_SIZE(ccic_parent), |
303 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, | ||
295 | apmu_base + APMU_CCIC0, 6, 1, 0, &clk_lock); | 304 | apmu_base + APMU_CCIC0, 6, 1, 0, &clk_lock); |
296 | clk_register_clkdev(clk, "ccic_mux.0", NULL); | 305 | clk_register_clkdev(clk, "ccic_mux.0", NULL); |
297 | 306 | ||
@@ -301,8 +310,8 @@ void __init pxa910_clk_init(void) | |||
301 | 310 | ||
302 | clk = clk_register_mux(NULL, "ccic0_phy_mux", ccic_phy_parent, | 311 | clk = clk_register_mux(NULL, "ccic0_phy_mux", ccic_phy_parent, |
303 | ARRAY_SIZE(ccic_phy_parent), | 312 | ARRAY_SIZE(ccic_phy_parent), |
304 | CLK_SET_RATE_PARENT, apmu_base + APMU_CCIC0, | 313 | CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT, |
305 | 7, 1, 0, &clk_lock); | 314 | apmu_base + APMU_CCIC0, 7, 1, 0, &clk_lock); |
306 | clk_register_clkdev(clk, "ccic_phy_mux.0", NULL); | 315 | clk_register_clkdev(clk, "ccic_phy_mux.0", NULL); |
307 | 316 | ||
308 | clk = mmp_clk_register_apmu("ccic0_phy", "ccic0_phy_mux", | 317 | clk = mmp_clk_register_apmu("ccic0_phy", "ccic0_phy_mux", |