85 const char *mac =
NULL;
93 pr_err(
"%s: ERROR: memory mapping failed", __func__);
97 if (pdev->
dev.of_node) {
102 pr_err(
"%s: ERROR: no memory", __func__);
106 ret = stmmac_probe_config_dt(pdev, plat_dat, &mac);
108 pr_err(
"%s: main dt probe failed", __func__);
112 plat_dat = pdev->
dev.platform_data;
116 if (plat_dat->
init) {
117 ret = plat_dat->
init(pdev);
124 pr_err(
"%s: main driver probe failed", __func__);
135 pr_err(
"%s: ERROR: MAC IRQ configuration "
136 "information not found\n", __func__);
154 platform_set_drvdata(pdev, priv->
dev);
156 pr_debug(
"STMMAC platform driver registration completed");
173 if (priv->
plat->exit)
174 priv->
plat->exit(pdev);
176 platform_set_drvdata(pdev,
NULL);
182 static int stmmac_pltfr_suspend(
struct device *dev)
189 static int stmmac_pltfr_resume(
struct device *dev)
196 int stmmac_pltfr_freeze(
struct device *dev)
205 plat_dat->
exit(pdev);
210 int stmmac_pltfr_restore(
struct device *dev)
217 plat_dat->
init(pdev);
222 static const struct dev_pm_ops stmmac_pltfr_pm_ops = {
223 .suspend = stmmac_pltfr_suspend,
224 .resume = stmmac_pltfr_resume,
225 .freeze = stmmac_pltfr_freeze,
226 .thaw = stmmac_pltfr_restore,
227 .restore = stmmac_pltfr_restore,
230 static const struct dev_pm_ops stmmac_pltfr_pm_ops;
234 { .compatible =
"st,spear600-gmac"},
235 { .compatible =
"snps,dwmac-3.70a"},
236 { .compatible =
"snps,dwmac"},
242 .probe = stmmac_pltfr_probe,
243 .remove = stmmac_pltfr_remove,
247 .pm = &stmmac_pltfr_pm_ops,