From: Marcin Wojtas <mw@semihalf.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk,
jaz@semihalf.com, gjb@semihalf.com, upstream@semihalf.com,
Samer.El-Haj-Mahmoud@arm.com, jon@solid-run.com, tn@semihalf.com,
rjw@rjwysocki.net, lenb@kernel.org,
Marcin Wojtas <mw@semihalf.com>
Subject: [net-next: PATCH v3 3/6] net/fsl: switch to fwnode_mdiobus_register
Date: Mon, 21 Jun 2021 19:30:25 +0200 [thread overview]
Message-ID: <20210621173028.3541424-4-mw@semihalf.com> (raw)
In-Reply-To: <20210621173028.3541424-1-mw@semihalf.com>
Utilize the newly added helper routine
for registering the MDIO bus via fwnode_
interface.
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
drivers/net/ethernet/freescale/xgmac_mdio.c | 11 ++---------
drivers/net/ethernet/freescale/Kconfig | 4 +---
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
index 0b68852379da..2d99edc8a647 100644
--- a/drivers/net/ethernet/freescale/xgmac_mdio.c
+++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
@@ -13,7 +13,7 @@
*/
#include <linux/acpi.h>
-#include <linux/acpi_mdio.h>
+#include <linux/fwnode_mdio.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mdio.h>
@@ -246,7 +246,6 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
static int xgmac_mdio_probe(struct platform_device *pdev)
{
- struct fwnode_handle *fwnode;
struct mdio_fsl_priv *priv;
struct resource *res;
struct mii_bus *bus;
@@ -291,13 +290,7 @@ static int xgmac_mdio_probe(struct platform_device *pdev)
priv->has_a011043 = device_property_read_bool(&pdev->dev,
"fsl,erratum-a011043");
- fwnode = pdev->dev.fwnode;
- if (is_of_node(fwnode))
- ret = of_mdiobus_register(bus, to_of_node(fwnode));
- else if (is_acpi_node(fwnode))
- ret = acpi_mdiobus_register(bus, fwnode);
- else
- ret = -EINVAL;
+ ret = fwnode_mdiobus_register(bus, pdev->dev.fwnode);
if (ret) {
dev_err(&pdev->dev, "cannot register MDIO bus\n");
goto err_registration;
diff --git a/drivers/net/ethernet/freescale/Kconfig b/drivers/net/ethernet/freescale/Kconfig
index 2d1abdd58fab..92a390576b88 100644
--- a/drivers/net/ethernet/freescale/Kconfig
+++ b/drivers/net/ethernet/freescale/Kconfig
@@ -67,9 +67,7 @@ config FSL_PQ_MDIO
config FSL_XGMAC_MDIO
tristate "Freescale XGMAC MDIO"
- select PHYLIB
- depends on OF
- select OF_MDIO
+ depends on FWNODE_MDIO
help
This driver supports the MDIO bus on the Fman 10G Ethernet MACs, and
on the FMan mEMAC (which supports both Clauses 22 and 45)
--
2.29.0
next prev parent reply other threads:[~2021-06-21 17:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 17:30 [net-next: PATCH v3 0/6] ACPI MDIO support for Marvell controllers Marcin Wojtas
2021-06-21 17:30 ` [net-next: PATCH v3 1/6] Documentation: ACPI: DSD: describe additional MAC configuration Marcin Wojtas
2021-06-23 20:18 ` Andrew Lunn
2021-06-23 21:00 ` Marcin Wojtas
2021-06-23 21:36 ` Andrew Lunn
2021-06-23 21:42 ` Vladimir Oltean
2021-06-21 17:30 ` [net-next: PATCH v3 2/6] net: mdiobus: Introduce fwnode_mdbiobus_register() Marcin Wojtas
2021-06-23 20:22 ` Andrew Lunn
2021-06-23 22:10 ` Marcin Wojtas
2021-06-24 11:10 ` Marcin Wojtas
2021-06-21 17:30 ` Marcin Wojtas [this message]
2021-06-23 20:24 ` [net-next: PATCH v3 3/6] net/fsl: switch to fwnode_mdiobus_register Andrew Lunn
2021-06-21 17:30 ` [net-next: PATCH v3 4/6] net: mvmdio: add ACPI support Marcin Wojtas
2021-06-23 20:28 ` Andrew Lunn
2021-06-23 21:58 ` Marcin Wojtas
2021-06-24 1:24 ` Andrew Lunn
2021-06-21 17:30 ` [net-next: PATCH v3 5/6] net: mvpp2: enable using phylink with ACPI Marcin Wojtas
2021-06-23 20:37 ` Andrew Lunn
2021-06-23 21:45 ` Marcin Wojtas
2021-06-24 1:17 ` Andrew Lunn
2021-06-21 17:30 ` [net-next: PATCH v3 6/6] net: mvpp2: remove unused 'has_phy' field Marcin Wojtas
2021-06-23 11:56 ` [net-next: PATCH v3 0/6] ACPI MDIO support for Marvell controllers Marcin Wojtas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210621173028.3541424-4-mw@semihalf.com \
--to=mw@semihalf.com \
--cc=Samer.El-Haj-Mahmoud@arm.com \
--cc=davem@davemloft.net \
--cc=gjb@semihalf.com \
--cc=jaz@semihalf.com \
--cc=jon@solid-run.com \
--cc=kuba@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=tn@semihalf.com \
--cc=upstream@semihalf.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).