aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/mvmdio.c
diff options
context:
space:
mode:
authorMarcin Wojtas <mw@semihalf.com>2021-06-21 19:30:26 +0200
committerDavid S. Miller <davem@davemloft.net>2021-06-22 09:54:55 -0700
commitc54da4c1acb1d62b3aec36b18473c430675e26d4 (patch)
tree4c3cf4e8ffb934e2d089ceb807c8206ad710dcb4 /drivers/net/ethernet/marvell/mvmdio.c
parentnet/fsl: switch to fwnode_mdiobus_register (diff)
downloadlinux-dev-c54da4c1acb1d62b3aec36b18473c430675e26d4.tar.xz
linux-dev-c54da4c1acb1d62b3aec36b18473c430675e26d4.zip
net: mvmdio: add ACPI support
This patch introducing ACPI support for the mvmdio driver by adding acpi_match_table with two entries: * "MRVL0100" for the SMI operation * "MRVL0101" for the XSMI mode Signed-off-by: Marcin Wojtas <mw@semihalf.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvmdio.c')
-rw-r--r--drivers/net/ethernet/marvell/mvmdio.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index d14762d93640..7537ee3f6622 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -17,8 +17,10 @@
* warranty of any kind, whether express or implied.
*/
+#include <linux/acpi.h>
#include <linux/clk.h>
#include <linux/delay.h>
+#include <linux/fwnode_mdio.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
@@ -281,7 +283,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
struct orion_mdio_dev *dev;
int i, ret;
- type = (enum orion_mdio_bus_type)of_device_get_match_data(&pdev->dev);
+ type = (enum orion_mdio_bus_type)device_get_match_data(&pdev->dev);
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r) {
@@ -369,7 +371,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
goto out_mdio;
}
- ret = of_mdiobus_register(bus, pdev->dev.of_node);
+ ret = fwnode_mdiobus_register(bus, pdev->dev.fwnode);
if (ret < 0) {
dev_err(&pdev->dev, "Cannot register MDIO bus (%d)\n", ret);
goto out_mdio;
@@ -421,12 +423,20 @@ static const struct of_device_id orion_mdio_match[] = {
};
MODULE_DEVICE_TABLE(of, orion_mdio_match);
+static const struct acpi_device_id orion_mdio_acpi_match[] = {
+ { "MRVL0100", BUS_TYPE_SMI },
+ { "MRVL0101", BUS_TYPE_XSMI },
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, orion_mdio_acpi_match);
+
static struct platform_driver orion_mdio_driver = {
.probe = orion_mdio_probe,
.remove = orion_mdio_remove,
.driver = {
.name = "orion-mdio",
.of_match_table = orion_mdio_match,
+ .acpi_match_table = ACPI_PTR(orion_mdio_acpi_match),
},
};