@@ -482,10 +482,19 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
482
482
goto err_put_clk_mod ;
483
483
}
484
484
485
+ if (phy -> variant -> has_second_pll ) {
486
+ phy -> clk_pll1 = of_clk_get_by_name (node , "pll-1" );
487
+ if (IS_ERR (phy -> clk_pll1 )) {
488
+ dev_err (dev , "Could not get pll-1 clock\n" );
489
+ ret = PTR_ERR (phy -> clk_pll1 );
490
+ goto err_put_clk_pll0 ;
491
+ }
492
+ }
493
+
485
494
ret = sun8i_phy_clk_create (phy , dev );
486
495
if (ret ) {
487
496
dev_err (dev , "Couldn't create the PHY clock\n" );
488
- goto err_put_clk_pll0 ;
497
+ goto err_put_clk_pll1 ;
489
498
}
490
499
491
500
clk_prepare_enable (phy -> clk_phy );
@@ -528,9 +537,10 @@ int sun8i_hdmi_phy_probe(struct sun8i_dw_hdmi *hdmi, struct device_node *node)
528
537
reset_control_put (phy -> rst_phy );
529
538
err_disable_clk_phy :
530
539
clk_disable_unprepare (phy -> clk_phy );
540
+ err_put_clk_pll1 :
541
+ clk_put (phy -> clk_pll1 );
531
542
err_put_clk_pll0 :
532
- if (phy -> variant -> has_phy_clk )
533
- clk_put (phy -> clk_pll0 );
543
+ clk_put (phy -> clk_pll0 );
534
544
err_put_clk_mod :
535
545
clk_put (phy -> clk_mod );
536
546
err_put_clk_bus :
@@ -551,8 +561,8 @@ void sun8i_hdmi_phy_remove(struct sun8i_dw_hdmi *hdmi)
551
561
552
562
reset_control_put (phy -> rst_phy );
553
563
554
- if (phy -> variant -> has_phy_clk )
555
- clk_put (phy -> clk_pll0 );
564
+ clk_put (phy -> clk_pll0 );
565
+ clk_put (phy -> clk_pll1 );
556
566
clk_put (phy -> clk_mod );
557
567
clk_put (phy -> clk_bus );
558
568
}
0 commit comments