Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1229987 > unrolled thread
| Started by | Neil Armstrong <narmstrong@baylibre.com> |
|---|---|
| First post | 2015-09-22 11:00 +0200 |
| Last post | 2015-09-24 00:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] net: davinci_emac: Add support for fixed-link PHY Neil Armstrong <narmstrong@baylibre.com> - 2015-09-22 11:00 +0200
Re: [PATCH] net: davinci_emac: Add support for fixed-link PHY Tony Lindgren <tony@atomide.com> - 2015-09-23 03:20 +0200
Re: [PATCH] net: davinci_emac: Add support for fixed-link PHY David Miller <davem@davemloft.net> - 2015-09-24 00:10 +0200
| From | Neil Armstrong <narmstrong@baylibre.com> |
|---|---|
| Date | 2015-09-22 11:00 +0200 |
| Subject | [PATCH] net: davinci_emac: Add support for fixed-link PHY |
| Message-ID | <qbrAC-qV-17@gated-at.bofh.it> |
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>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2015-09-23 03:20 +0200 |
| Message-ID | <qbGSZ-5LA-1@gated-at.bofh.it> |
| In reply to | #1229987 |
* 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-09-24 00:10 +0200 |
| Message-ID | <qc0oG-oQ-21@gated-at.bofh.it> |
| In reply to | #1229987 |
From: Neil Armstrong <narmstrong@baylibre.com> Date: Tue, 22 Sep 2015 10:57:04 +0200 > 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> Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web