@@ -71,22 +71,25 @@ static struct hisi_gate_clock hi6220_separated_gate_clks_ao[] __initdata = {
7171 { HI6220_UART0_PCLK , "uart0_pclk" , "clk_tcxo" , CLK_SET_RATE_PARENT |CLK_IGNORE_UNUSED , 0x630 , 24 , 0 , },
7272};
7373
74+ static struct hisi_clock_data * clk_data_ao ;
75+
7476static void __init hi6220_clk_ao_init (struct device_node * np )
7577{
76- struct hisi_clock_data * clk_data ;
77-
78- clk_data = hisi_clk_init (np , HI6220_AO_NR_CLKS );
79- if (!clk_data )
78+ clk_data_ao = hisi_clk_init (np , HI6220_AO_NR_CLKS );
79+ if (!clk_data_ao )
8080 return ;
8181
8282 hisi_clk_register_fixed_rate (hi6220_fixed_rate_clks ,
83- ARRAY_SIZE (hi6220_fixed_rate_clks ), clk_data );
83+ ARRAY_SIZE (hi6220_fixed_rate_clks ),
84+ clk_data_ao );
8485
8586 hisi_clk_register_fixed_factor (hi6220_fixed_factor_clks ,
86- ARRAY_SIZE (hi6220_fixed_factor_clks ), clk_data );
87+ ARRAY_SIZE (hi6220_fixed_factor_clks ),
88+ clk_data_ao );
8789
8890 hisi_clk_register_gate_sep (hi6220_separated_gate_clks_ao ,
89- ARRAY_SIZE (hi6220_separated_gate_clks_ao ), clk_data );
91+ ARRAY_SIZE (hi6220_separated_gate_clks_ao ),
92+ clk_data_ao );
9093}
9194CLK_OF_DECLARE (hi6220_clk_ao , "hisilicon,hi6220-clock-ao" , hi6220_clk_ao_init );
9295
@@ -193,6 +196,13 @@ static void __init hi6220_clk_sys_init(struct device_node *np)
193196
194197 hi6220_clk_register_divider (hi6220_div_clks_sys ,
195198 ARRAY_SIZE (hi6220_div_clks_sys ), clk_data );
199+
200+ if (!clk_data_ao )
201+ return ;
202+
203+ /* enable high speed clock on UART1 mux */
204+ clk_set_parent (clk_data -> clk_data .clks [HI6220_UART1_SRC ],
205+ clk_data_ao -> clk_data .clks [HI6220_150M ]);
196206}
197207CLK_OF_DECLARE (hi6220_clk_sys , "hisilicon,hi6220-clock-sys" , hi6220_clk_sys_init );
198208
0 commit comments