diff options
author | Stephen Boyd <sboyd@kernel.org> | 2018-03-12 18:06:38 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2018-03-12 18:06:38 -0400 |
commit | a88bb86d58ceb785d86db2b77a613a04ae2366f2 (patch) | |
tree | 32cc3e52ea6cc1d446e2f0ea61468086308e5441 | |
parent | 957a42e8599a26e0b5d6b274680a386b721b6242 (diff) | |
parent | a275b315334dea3c2151094765387ede421aac92 (diff) |
Merge tag 'clk-imx-fixes-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-fixes
Pull i.MX clock fixes for 4.16 from Shawn Guo:
- Update i.MX5 clock driver to register UART4/5 clock only on i.MX50
and i.MX53. It fixes a kernel warning seen on i.MX53, caused by
commit 59dc3d8c8673 ("clk: imx51: uart4, uart5 gates only exist on
imx50, imx53").
* tag 'clk-imx-fixes-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
clk: imx51-imx53: Fix UART4/5 registration on i.MX50 and i.MX53
-rw-r--r-- | drivers/clk/imx/clk-imx51-imx53.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/clk/imx/clk-imx51-imx53.c b/drivers/clk/imx/clk-imx51-imx53.c index c864992e6983..caa8bd40692c 100644 --- a/drivers/clk/imx/clk-imx51-imx53.c +++ b/drivers/clk/imx/clk-imx51-imx53.c | |||
@@ -131,7 +131,17 @@ static const char *ieee1588_sels[] = { "pll3_sw", "pll4_sw", "dummy" /* usbphy2_ | |||
131 | static struct clk *clk[IMX5_CLK_END]; | 131 | static struct clk *clk[IMX5_CLK_END]; |
132 | static struct clk_onecell_data clk_data; | 132 | static struct clk_onecell_data clk_data; |
133 | 133 | ||
134 | static struct clk ** const uart_clks[] __initconst = { | 134 | static struct clk ** const uart_clks_mx51[] __initconst = { |
135 | &clk[IMX5_CLK_UART1_IPG_GATE], | ||
136 | &clk[IMX5_CLK_UART1_PER_GATE], | ||
137 | &clk[IMX5_CLK_UART2_IPG_GATE], | ||
138 | &clk[IMX5_CLK_UART2_PER_GATE], | ||
139 | &clk[IMX5_CLK_UART3_IPG_GATE], | ||
140 | &clk[IMX5_CLK_UART3_PER_GATE], | ||
141 | NULL | ||
142 | }; | ||
143 | |||
144 | static struct clk ** const uart_clks_mx50_mx53[] __initconst = { | ||
135 | &clk[IMX5_CLK_UART1_IPG_GATE], | 145 | &clk[IMX5_CLK_UART1_IPG_GATE], |
136 | &clk[IMX5_CLK_UART1_PER_GATE], | 146 | &clk[IMX5_CLK_UART1_PER_GATE], |
137 | &clk[IMX5_CLK_UART2_IPG_GATE], | 147 | &clk[IMX5_CLK_UART2_IPG_GATE], |
@@ -321,8 +331,6 @@ static void __init mx5_clocks_common_init(void __iomem *ccm_base) | |||
321 | clk_prepare_enable(clk[IMX5_CLK_TMAX1]); | 331 | clk_prepare_enable(clk[IMX5_CLK_TMAX1]); |
322 | clk_prepare_enable(clk[IMX5_CLK_TMAX2]); /* esdhc2, fec */ | 332 | clk_prepare_enable(clk[IMX5_CLK_TMAX2]); /* esdhc2, fec */ |
323 | clk_prepare_enable(clk[IMX5_CLK_TMAX3]); /* esdhc1, esdhc4 */ | 333 | clk_prepare_enable(clk[IMX5_CLK_TMAX3]); /* esdhc1, esdhc4 */ |
324 | |||
325 | imx_register_uart_clocks(uart_clks); | ||
326 | } | 334 | } |
327 | 335 | ||
328 | static void __init mx50_clocks_init(struct device_node *np) | 336 | static void __init mx50_clocks_init(struct device_node *np) |
@@ -388,6 +396,8 @@ static void __init mx50_clocks_init(struct device_node *np) | |||
388 | 396 | ||
389 | r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); | 397 | r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); |
390 | clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); | 398 | clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); |
399 | |||
400 | imx_register_uart_clocks(uart_clks_mx50_mx53); | ||
391 | } | 401 | } |
392 | CLK_OF_DECLARE(imx50_ccm, "fsl,imx50-ccm", mx50_clocks_init); | 402 | CLK_OF_DECLARE(imx50_ccm, "fsl,imx50-ccm", mx50_clocks_init); |
393 | 403 | ||
@@ -477,6 +487,8 @@ static void __init mx51_clocks_init(struct device_node *np) | |||
477 | val = readl(MXC_CCM_CLPCR); | 487 | val = readl(MXC_CCM_CLPCR); |
478 | val |= 1 << 23; | 488 | val |= 1 << 23; |
479 | writel(val, MXC_CCM_CLPCR); | 489 | writel(val, MXC_CCM_CLPCR); |
490 | |||
491 | imx_register_uart_clocks(uart_clks_mx51); | ||
480 | } | 492 | } |
481 | CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init); | 493 | CLK_OF_DECLARE(imx51_ccm, "fsl,imx51-ccm", mx51_clocks_init); |
482 | 494 | ||
@@ -606,5 +618,7 @@ static void __init mx53_clocks_init(struct device_node *np) | |||
606 | 618 | ||
607 | r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); | 619 | r = clk_round_rate(clk[IMX5_CLK_USBOH3_PER_GATE], 54000000); |
608 | clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); | 620 | clk_set_rate(clk[IMX5_CLK_USBOH3_PER_GATE], r); |
621 | |||
622 | imx_register_uart_clocks(uart_clks_mx50_mx53); | ||
609 | } | 623 | } |
610 | CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init); | 624 | CLK_OF_DECLARE(imx53_ccm, "fsl,imx53-ccm", mx53_clocks_init); |