@@ -493,6 +493,7 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
493493
494494 plat_dat -> bsp_priv = dwmac ;
495495 plat_dat -> fix_mac_speed = socfpga_dwmac_fix_mac_speed ;
496+ plat_dat -> init = socfpga_dwmac_init ;
496497 plat_dat -> pcs_init = socfpga_dwmac_pcs_init ;
497498 plat_dat -> pcs_exit = socfpga_dwmac_pcs_exit ;
498499 plat_dat -> select_pcs = socfpga_dwmac_select_pcs ;
@@ -516,40 +517,6 @@ static int socfpga_dwmac_probe(struct platform_device *pdev)
516517 return ret ;
517518}
518519
519- #ifdef CONFIG_PM_SLEEP
520- static int socfpga_dwmac_resume (struct device * dev )
521- {
522- struct socfpga_dwmac * dwmac_priv = get_stmmac_bsp_priv (dev );
523-
524- socfpga_dwmac_init (to_platform_device (dev ), dwmac_priv );
525-
526- return stmmac_resume (dev );
527- }
528- #endif /* CONFIG_PM_SLEEP */
529-
530- static int __maybe_unused socfpga_dwmac_runtime_suspend (struct device * dev )
531- {
532- struct net_device * ndev = dev_get_drvdata (dev );
533- struct stmmac_priv * priv = netdev_priv (ndev );
534-
535- stmmac_bus_clks_config (priv , false);
536-
537- return 0 ;
538- }
539-
540- static int __maybe_unused socfpga_dwmac_runtime_resume (struct device * dev )
541- {
542- struct net_device * ndev = dev_get_drvdata (dev );
543- struct stmmac_priv * priv = netdev_priv (ndev );
544-
545- return stmmac_bus_clks_config (priv , true);
546- }
547-
548- static const struct dev_pm_ops socfpga_dwmac_pm_ops = {
549- SET_SYSTEM_SLEEP_PM_OPS (stmmac_suspend , socfpga_dwmac_resume )
550- SET_RUNTIME_PM_OPS (socfpga_dwmac_runtime_suspend , socfpga_dwmac_runtime_resume , NULL )
551- };
552-
553520static const struct socfpga_dwmac_ops socfpga_gen5_ops = {
554521 .set_phy_mode = socfpga_gen5_set_phy_mode ,
555522};
@@ -570,7 +537,7 @@ static struct platform_driver socfpga_dwmac_driver = {
570537 .remove = stmmac_pltfr_remove ,
571538 .driver = {
572539 .name = "socfpga-dwmac" ,
573- .pm = & socfpga_dwmac_pm_ops ,
540+ .pm = & stmmac_pltfr_pm_ops ,
574541 .of_match_table = socfpga_dwmac_match ,
575542 },
576543};
0 commit comments