diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2015-09-21 12:54:00 -0400 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2015-09-26 00:58:53 -0400 |
commit | 5c678cdd02f25398b4908638d672b134cff9d59c (patch) | |
tree | 76f150d9e6a3a4b6834d85fa3e12c5b39335b8a4 | |
parent | 6f1871316347a5ef098d85305d5eb5ac6ac1f52a (diff) |
clk: imx31: retain early UART clocks during kernel init
Make sure to keep UART clocks enabled during kernel init if
earlyprintk or earlycon are active.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r-- | drivers/clk/imx/clk-imx31.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-imx31.c b/drivers/clk/imx/clk-imx31.c index 1f8383475bb3..5520e20eaceb 100644 --- a/drivers/clk/imx/clk-imx31.c +++ b/drivers/clk/imx/clk-imx31.c | |||
@@ -62,6 +62,16 @@ enum mx31_clks { | |||
62 | static struct clk *clk[clk_max]; | 62 | static struct clk *clk[clk_max]; |
63 | static struct clk_onecell_data clk_data; | 63 | static struct clk_onecell_data clk_data; |
64 | 64 | ||
65 | static struct clk ** const uart_clks[] __initconst = { | ||
66 | &clk[ipg], | ||
67 | &clk[uart1_gate], | ||
68 | &clk[uart2_gate], | ||
69 | &clk[uart3_gate], | ||
70 | &clk[uart4_gate], | ||
71 | &clk[uart5_gate], | ||
72 | NULL | ||
73 | }; | ||
74 | |||
65 | int __init mx31_clocks_init(unsigned long fref) | 75 | int __init mx31_clocks_init(unsigned long fref) |
66 | { | 76 | { |
67 | void __iomem *base; | 77 | void __iomem *base; |
@@ -200,6 +210,8 @@ int __init mx31_clocks_init(unsigned long fref) | |||
200 | mx31_revision(); | 210 | mx31_revision(); |
201 | clk_disable_unprepare(clk[iim_gate]); | 211 | clk_disable_unprepare(clk[iim_gate]); |
202 | 212 | ||
213 | imx_register_uart_clocks(uart_clks); | ||
214 | |||
203 | mxc_timer_init(MX31_GPT1_BASE_ADDR, MX31_INT_GPT, GPT_TYPE_IMX31); | 215 | mxc_timer_init(MX31_GPT1_BASE_ADDR, MX31_INT_GPT, GPT_TYPE_IMX31); |
204 | 216 | ||
205 | return 0; | 217 | return 0; |