|
@@ -209,7 +209,7 @@ Signed-off-by: Stephen Boyd <[email protected]>
|
|
if (r)
|
|
if (r)
|
|
--- a/drivers/clk/mediatek/clk-mt2701.c
|
|
--- a/drivers/clk/mediatek/clk-mt2701.c
|
|
+++ b/drivers/clk/mediatek/clk-mt2701.c
|
|
+++ b/drivers/clk/mediatek/clk-mt2701.c
|
|
-@@ -683,8 +683,8 @@ static int mtk_topckgen_init(struct plat
|
|
|
|
|
|
+@@ -685,8 +685,8 @@ static int mtk_topckgen_init(struct plat
|
|
mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
|
|
mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
|
|
base, &mt2701_clk_lock, clk_data);
|
|
base, &mt2701_clk_lock, clk_data);
|
|
|
|
|
|
@@ -220,7 +220,7 @@ Signed-off-by: Stephen Boyd <[email protected]>
|
|
|
|
|
|
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
|
return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
|
}
|
|
}
|
|
-@@ -783,8 +783,8 @@ static int mtk_infrasys_init(struct plat
|
|
|
|
|
|
+@@ -789,8 +789,8 @@ static int mtk_infrasys_init(struct plat
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -231,9 +231,9 @@ Signed-off-by: Stephen Boyd <[email protected]>
|
|
mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs),
|
|
mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs),
|
|
infra_clk_data);
|
|
infra_clk_data);
|
|
|
|
|
|
-@@ -894,8 +894,8 @@ static int mtk_pericfg_init(struct platf
|
|
|
|
-
|
|
|
|
- clk_data = mtk_alloc_clk_data(CLK_PERI_NR);
|
|
|
|
|
|
+@@ -902,8 +902,8 @@ static int mtk_pericfg_init(struct platf
|
|
|
|
+ if (!clk_data)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
|
|
- mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
|
|
- mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
|
|
- clk_data);
|
|
- clk_data);
|
|
@@ -397,9 +397,9 @@ Signed-off-by: Stephen Boyd <[email protected]>
|
|
&mt7622_clk_lock, clk_data);
|
|
&mt7622_clk_lock, clk_data);
|
|
--- a/drivers/clk/mediatek/clk-mt7629-eth.c
|
|
--- a/drivers/clk/mediatek/clk-mt7629-eth.c
|
|
+++ b/drivers/clk/mediatek/clk-mt7629-eth.c
|
|
+++ b/drivers/clk/mediatek/clk-mt7629-eth.c
|
|
-@@ -80,7 +80,8 @@ static int clk_mt7629_ethsys_init(struct
|
|
|
|
-
|
|
|
|
- clk_data = mtk_alloc_clk_data(CLK_ETH_NR_CLK);
|
|
|
|
|
|
+@@ -82,7 +82,8 @@ static int clk_mt7629_ethsys_init(struct
|
|
|
|
+ if (!clk_data)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
|
|
- mtk_clk_register_gates(node, eth_clks, CLK_ETH_NR_CLK, clk_data);
|
|
- mtk_clk_register_gates(node, eth_clks, CLK_ETH_NR_CLK, clk_data);
|
|
+ mtk_clk_register_gates(&pdev->dev, node, eth_clks,
|
|
+ mtk_clk_register_gates(&pdev->dev, node, eth_clks,
|
|
@@ -407,9 +407,9 @@ Signed-off-by: Stephen Boyd <[email protected]>
|
|
|
|
|
|
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
|
r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
|
|
if (r)
|
|
if (r)
|
|
-@@ -102,8 +103,8 @@ static int clk_mt7629_sgmiisys_init(stru
|
|
|
|
-
|
|
|
|
- clk_data = mtk_alloc_clk_data(CLK_SGMII_NR_CLK);
|
|
|
|
|
|
+@@ -106,8 +107,8 @@ static int clk_mt7629_sgmiisys_init(stru
|
|
|
|
+ if (!clk_data)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
|
|
- mtk_clk_register_gates(node, sgmii_clks[id++], CLK_SGMII_NR_CLK,
|
|
- mtk_clk_register_gates(node, sgmii_clks[id++], CLK_SGMII_NR_CLK,
|
|
- clk_data);
|
|
- clk_data);
|
|
@@ -444,9 +444,9 @@ Signed-off-by: Stephen Boyd <[email protected]>
|
|
if (r)
|
|
if (r)
|
|
--- a/drivers/clk/mediatek/clk-mt7629.c
|
|
--- a/drivers/clk/mediatek/clk-mt7629.c
|
|
+++ b/drivers/clk/mediatek/clk-mt7629.c
|
|
+++ b/drivers/clk/mediatek/clk-mt7629.c
|
|
-@@ -581,8 +581,8 @@ static int mtk_infrasys_init(struct plat
|
|
|
|
-
|
|
|
|
- clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
|
|
|
|
|
|
+@@ -585,8 +585,8 @@ static int mtk_infrasys_init(struct plat
|
|
|
|
+ if (!clk_data)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
|
|
- mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
|
|
- mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
|
|
- clk_data);
|
|
- clk_data);
|
|
@@ -455,9 +455,9 @@ Signed-off-by: Stephen Boyd <[email protected]>
|
|
|
|
|
|
mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes),
|
|
mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes),
|
|
clk_data);
|
|
clk_data);
|
|
-@@ -604,8 +604,8 @@ static int mtk_pericfg_init(struct platf
|
|
|
|
-
|
|
|
|
- clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
|
|
|
|
|
|
+@@ -610,8 +610,8 @@ static int mtk_pericfg_init(struct platf
|
|
|
|
+ if (!clk_data)
|
|
|
|
+ return -ENOMEM;
|
|
|
|
|
|
- mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
|
|
- mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
|
|
- clk_data);
|
|
- clk_data);
|
|
@@ -466,7 +466,7 @@ Signed-off-by: Stephen Boyd <[email protected]>
|
|
|
|
|
|
mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
|
|
mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
|
|
&mt7629_clk_lock, clk_data);
|
|
&mt7629_clk_lock, clk_data);
|
|
-@@ -631,7 +631,7 @@ static int mtk_apmixedsys_init(struct pl
|
|
|
|
|
|
+@@ -637,7 +637,7 @@ static int mtk_apmixedsys_init(struct pl
|
|
mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls),
|
|
mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls),
|
|
clk_data);
|
|
clk_data);
|
|
|
|
|