From: Tony Lindgren <tony@atomide.com>
To: Neil Armstrong <narmstrong@baylibre.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Felipe Balbi <balbi@ti.com>,
"Mark A. Greer" <mgreer@animalcreek.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: davinci_emac: Add support for fixed-link PHY
Date: Tue, 22 Sep 2015 18:10:20 -0700 [thread overview]
Message-ID: <20150923011019.GE23801@atomide.com> (raw)
In-Reply-To: <560117E0.20307@baylibre.com>
* Neil Armstrong <narmstrong@baylibre.com> [150922 02:01]:
> In case the DaVinci Emac is directly connected to a
> non-mdio PHY/device, it should be possible to provide
> a fixed link configuration in the DT.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Ethernet works for me with this patch:
Tested-by: Tony Lindgren <tony@atomide.com>
> ---
> drivers/net/ethernet/ti/davinci_emac.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
> index aeebc0a..6521dfb 100644
> --- a/drivers/net/ethernet/ti/davinci_emac.c
> +++ b/drivers/net/ethernet/ti/davinci_emac.c
> @@ -1861,8 +1861,12 @@ davinci_emac_of_get_pdata(struct platform_device *pdev, struct emac_priv *priv)
> pdata->no_bd_ram = of_property_read_bool(np, "ti,davinci-no-bd-ram");
>
> priv->phy_node = of_parse_phandle(np, "phy-handle", 0);
> - if (!priv->phy_node)
> - pdata->phy_id = NULL;
> + if (!priv->phy_node) {
> + if (!of_phy_is_fixed_link(np))
> + pdata->phy_id = NULL;
> + else if (of_phy_register_fixed_link(np) >= 0)
> + priv->phy_node = of_node_get(np);
> + }
>
> auxdata = pdev->dev.platform_data;
> if (auxdata) {
> --
> 1.9.1
next prev parent reply other threads:[~2015-09-23 1:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 8:57 [PATCH] net: davinci_emac: Add support for fixed-link PHY Neil Armstrong
2015-09-23 1:10 ` Tony Lindgren [this message]
2015-09-23 22:06 ` David Miller
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=20150923011019.GE23801@atomide.com \
--to=tony@atomide.com \
--cc=balbi@ti.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mgreer@animalcreek.com \
--cc=narmstrong@baylibre.com \
--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).