From: Andrew Lunn <andrew@lunn.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
Krzysztof Halasa <khalasa@piap.pl>
Subject: Re: [PATCH 8/8] net: ethernet: ixp4xx: Support device tree probing
Date: Fri, 24 May 2019 22:21:00 +0200 [thread overview]
Message-ID: <20190524202100.GR21208@lunn.ch> (raw)
In-Reply-To: <20190524162023.9115-9-linus.walleij@linaro.org>
> + /* FIXME: get from MDIO handle */
> + ret = of_property_read_u32(np, "phy", &val);
> + if (ret) {
> + dev_err(dev, "no phy\n");
> + return NULL;
> + }
> + plat->phy = val;
Hi Linus
You might want to work on the MDIO code first. It is O.K. to do
something like:
np = NULL;
if (dev->of_node)
np = of_get_child_by_name(dev->of_node, "mdio");
of_mdiobus_register(np, mdio_bus)
If np is NULL, it will fall back to mdiobus_register().
Then here you can do the correct
priv->phy_node = of_parse_phandle(dev->of_node, "phy-handle", 0);
and later call
phy = of_phy_connect(ndev, priv->phy_node, &ixp4xx_adjust_link,
PHY_INTERFACE_MODE_MII);
You just need to watch out for the -EPROBE_DEFFERED.
Andrew
prev parent reply other threads:[~2019-05-24 20:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 16:20 [PATCH 0/8] Xscale IXP4xx ethernet refurbishing Linus Walleij
2019-05-24 16:20 ` [PATCH 1/8] net: ethernet: ixp4xx: Standard module init Linus Walleij
2019-05-24 19:46 ` Andrew Lunn
2019-05-29 7:10 ` Linus Walleij
2019-05-24 16:20 ` [PATCH 2/8] net: ethernet: ixp4xx: Use distinct local variable Linus Walleij
2019-05-24 16:20 ` [PATCH 3/8] net: ehernet: ixp4xx: Use devm_alloc_etherdev() Linus Walleij
2019-05-24 19:52 ` Andrew Lunn
2019-05-24 16:20 ` [PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as resource Linus Walleij
2019-05-24 20:00 ` Andrew Lunn
2019-05-25 9:14 ` Sergei Shtylyov
2019-05-28 13:21 ` Andrew Lunn
2019-05-24 16:20 ` [PATCH 5/8] net: ethernet: ixp4xx: Get port ID from base address Linus Walleij
2019-05-24 16:20 ` [PATCH 6/8] net: ethernet: ixp4xx: Use parent dev for DMA pool Linus Walleij
2019-05-24 16:20 ` [PATCH 7/8] net: ethernet: ixp4xx: Add DT bindings Linus Walleij
2019-05-24 20:06 ` Andrew Lunn
2019-05-29 7:13 ` Linus Walleij
2019-05-24 16:20 ` [PATCH 8/8] net: ethernet: ixp4xx: Support device tree probing Linus Walleij
2019-05-24 20:21 ` Andrew Lunn [this message]
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=20190524202100.GR21208@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=khalasa@piap.pl \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
/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).