|
@@ -257,9 +257,28 @@ static int socfpga_dwmac_init(struct platform_device *pdev, void *priv)
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-const struct stmmac_of_data socfpga_gmac_data = {
|
|
|
+static const struct stmmac_of_data socfpga_gmac_data = {
|
|
|
.setup = socfpga_dwmac_probe,
|
|
|
.init = socfpga_dwmac_init,
|
|
|
.exit = socfpga_dwmac_exit,
|
|
|
.fix_mac_speed = socfpga_dwmac_fix_mac_speed,
|
|
|
};
|
|
|
+
|
|
|
+static const struct of_device_id socfpga_dwmac_match[] = {
|
|
|
+ { .compatible = "altr,socfpga-stmmac", .data = &socfpga_gmac_data },
|
|
|
+ { }
|
|
|
+};
|
|
|
+MODULE_DEVICE_TABLE(of, socfpga_dwmac_match);
|
|
|
+
|
|
|
+static struct platform_driver socfpga_dwmac_driver = {
|
|
|
+ .probe = stmmac_pltfr_probe,
|
|
|
+ .remove = stmmac_pltfr_remove,
|
|
|
+ .driver = {
|
|
|
+ .name = "socfpga-dwmac",
|
|
|
+ .pm = &stmmac_pltfr_pm_ops,
|
|
|
+ .of_match_table = socfpga_dwmac_match,
|
|
|
+ },
|
|
|
+};
|
|
|
+module_platform_driver(socfpga_dwmac_driver);
|
|
|
+
|
|
|
+MODULE_LICENSE("GPL v2");
|