@@ -52,15 +52,6 @@ static const struct pll_params_table sys_pll_params_table[] = {
5252 { /* sentinel */ },
5353};
5454
55- static struct clk_fixed_rate meson8b_xtal = {
56- .fixed_rate = 24000000 ,
57- .hw .init = & (struct clk_init_data ){
58- .name = "xtal" ,
59- .num_parents = 0 ,
60- .ops = & clk_fixed_rate_ops ,
61- },
62- };
63-
6455static struct clk_regmap meson8b_fixed_pll_dco = {
6556 .data = & (struct meson_clk_pll_data ){
6657 .en = {
@@ -2715,7 +2706,6 @@ static MESON_GATE(meson8b_ao_iface, HHI_GCLK_AO, 3);
27152706
27162707static struct clk_hw_onecell_data meson8_hw_onecell_data = {
27172708 .hws = {
2718- [CLKID_XTAL ] = & meson8b_xtal .hw ,
27192709 [CLKID_PLL_FIXED ] = & meson8b_fixed_pll .hw ,
27202710 [CLKID_PLL_VID ] = & meson8b_vid_pll .hw ,
27212711 [CLKID_PLL_SYS ] = & meson8b_sys_pll .hw ,
@@ -2922,7 +2912,6 @@ static struct clk_hw_onecell_data meson8_hw_onecell_data = {
29222912
29232913static struct clk_hw_onecell_data meson8b_hw_onecell_data = {
29242914 .hws = {
2925- [CLKID_XTAL ] = & meson8b_xtal .hw ,
29262915 [CLKID_PLL_FIXED ] = & meson8b_fixed_pll .hw ,
29272916 [CLKID_PLL_VID ] = & meson8b_vid_pll .hw ,
29282917 [CLKID_PLL_SYS ] = & meson8b_sys_pll .hw ,
@@ -3140,7 +3129,6 @@ static struct clk_hw_onecell_data meson8b_hw_onecell_data = {
31403129
31413130static struct clk_hw_onecell_data meson8m2_hw_onecell_data = {
31423131 .hws = {
3143- [CLKID_XTAL ] = & meson8b_xtal .hw ,
31443132 [CLKID_PLL_FIXED ] = & meson8b_fixed_pll .hw ,
31453133 [CLKID_PLL_VID ] = & meson8b_vid_pll .hw ,
31463134 [CLKID_PLL_SYS ] = & meson8b_sys_pll .hw ,
@@ -3725,36 +3713,19 @@ static struct meson8b_nb_data meson8b_cpu_nb_data = {
37253713 .nb .notifier_call = meson8b_cpu_clk_notifier_cb ,
37263714};
37273715
3728- static const struct regmap_config clkc_regmap_config = {
3729- .reg_bits = 32 ,
3730- .val_bits = 32 ,
3731- .reg_stride = 4 ,
3732- };
3733-
37343716static void __init meson8b_clkc_init_common (struct device_node * np ,
37353717 struct clk_hw_onecell_data * clk_hw_onecell_data )
37363718{
37373719 struct meson8b_clk_reset * rstc ;
37383720 const char * notifier_clk_name ;
37393721 struct clk * notifier_clk ;
3740- void __iomem * clk_base ;
37413722 struct regmap * map ;
37423723 int i , ret ;
37433724
37443725 map = syscon_node_to_regmap (of_get_parent (np ));
37453726 if (IS_ERR (map )) {
3746- pr_info ("failed to get HHI regmap - Trying obsolete regs\n" );
3747-
3748- /* Generic clocks, PLLs and some of the reset-bits */
3749- clk_base = of_iomap (np , 1 );
3750- if (!clk_base ) {
3751- pr_err ("%s: Unable to map clk base\n" , __func__ );
3752- return ;
3753- }
3754-
3755- map = regmap_init_mmio (NULL , clk_base , & clkc_regmap_config );
3756- if (IS_ERR (map ))
3757- return ;
3727+ pr_err ("failed to get HHI regmap - Trying obsolete regs\n" );
3728+ return ;
37583729 }
37593730
37603731 rstc = kzalloc (sizeof (* rstc ), GFP_KERNEL );
@@ -3778,16 +3749,10 @@ static void __init meson8b_clkc_init_common(struct device_node *np,
37783749 meson8b_clk_regmaps [i ]-> map = map ;
37793750
37803751 /*
3781- * always skip CLKID_UNUSED and also skip XTAL if the .dtb provides the
3782- * XTAL clock as input.
3752+ * register all clks and start with the first used ID (which is
3753+ * CLKID_PLL_FIXED)
37833754 */
3784- if (!IS_ERR (of_clk_get_by_name (np , "xtal" )))
3785- i = CLKID_PLL_FIXED ;
3786- else
3787- i = CLKID_XTAL ;
3788-
3789- /* register all clks */
3790- for (; i < CLK_NR_CLKS ; i ++ ) {
3755+ for (i = CLKID_PLL_FIXED ; i < CLK_NR_CLKS ; i ++ ) {
37913756 /* array might be sparse */
37923757 if (!clk_hw_onecell_data -> hws [i ])
37933758 continue ;
0 commit comments