|
@@ -482,10 +482,19 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
|
|
|
goto err_put_clk_mod;
|
|
|
}
|
|
|
|
|
|
+ if (phy->variant->has_second_pll) {
|
|
|
+ phy->clk_pll1 = of_clk_get_by_name(node, "pll-1");
|
|
|
+ if (IS_ERR(phy->clk_pll1)) {
|
|
|
+ dev_err(dev, "Could not get pll-1 clock\n");
|
|
|
+ ret = PTR_ERR(phy->clk_pll1);
|
|
|
+ goto err_put_clk_pll0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
ret = sun8i_phy_clk_create(phy, dev);
|
|
|
if (ret) {
|
|
|
dev_err(dev, "Couldn't create the PHY clock\n");
|
|
|
- goto err_put_clk_pll0;
|
|
|
+ goto err_put_clk_pll1;
|
|
|
}
|
|
|
|
|
|
clk_prepare_enable(phy->clk_phy);
|
|
@@ -528,9 +537,10 @@ err_put_rst_phy:
|
|
|
reset_control_put(phy->rst_phy);
|
|
|
err_disable_clk_phy:
|
|
|
clk_disable_unprepare(phy->clk_phy);
|
|
|
+err_put_clk_pll1:
|
|
|
+ clk_put(phy->clk_pll1);
|
|
|
err_put_clk_pll0:
|
|
|
- if (phy->variant->has_phy_clk)
|
|
|
- clk_put(phy->clk_pll0);
|
|
|
+ clk_put(phy->clk_pll0);
|
|
|
err_put_clk_mod:
|
|
|
clk_put(phy->clk_mod);
|
|
|
err_put_clk_bus:
|
|
@@ -551,8 +561,8 @@ void sun8i_hdmi_phy_remove(struct sun8i_dw_hdmi *hdmi)
|
|
|
|
|
|
reset_control_put(phy->rst_phy);
|
|
|
|
|
|
- if (phy->variant->has_phy_clk)
|
|
|
- clk_put(phy->clk_pll0);
|
|
|
+ clk_put(phy->clk_pll0);
|
|
|
+ clk_put(phy->clk_pll1);
|
|
|
clk_put(phy->clk_mod);
|
|
|
clk_put(phy->clk_bus);
|
|
|
}
|