mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/1] net:designware: allow to pass the phy interface
Date: Sun, 14 Oct 2012 16:25:01 +0200	[thread overview]
Message-ID: <1350224701-17223-1-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1350224598-16979-1-git-send-email-plagnioj@jcrosoft.com>

If none set use NA (0) as before.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/net/designware.c |    4 +++-
 include/net/designware.h |    3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 1cbcd5a..bf71d15 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -55,6 +55,7 @@ struct dw_eth_dev {
 	struct eth_mac_regs *mac_regs_p;
 	struct eth_dma_regs *dma_regs_p;
 	int phy_addr;
+	phy_interface_t interface;
 };
 
 /* Speed specific definitions */
@@ -254,7 +255,7 @@ static int dwc_ether_open(struct eth_device *dev)
 	int ret;
 
 	ret = phy_device_connect(dev, &priv->miibus, priv->phy_addr,
-				 dwc_update_linkspeed, 0, PHY_INTERFACE_MODE_NA);
+				 dwc_update_linkspeed, 0, priv->interface);
 	if (ret)
 		return ret;
 
@@ -427,6 +428,7 @@ static int dwc_ether_probe(struct device_d *dev)
 	edev->set_ethaddr = dwc_ether_set_ethaddr;
 
 	priv->phy_addr = pdata->phy_addr;
+	priv->interface = pdata->interface;
 	miibus->read = dwc_ether_mii_read;
 	miibus->write = dwc_ether_mii_write;
 	miibus->priv = priv;
diff --git a/include/net/designware.h b/include/net/designware.h
index 1c8a00e..3f31c97 100644
--- a/include/net/designware.h
+++ b/include/net/designware.h
@@ -1,8 +1,11 @@
 #ifndef __DWC_UNIMAC_H
 #define __DWC_UNIMAC_H
 
+#include <linux/phy.h>
+
 struct dwc_ether_platform_data {
 	int phy_addr;
+	phy_interface_t interface;
 	void (*fix_mac_speed)(int speed);
 };
 
-- 
1.7.10.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-10-14 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-14 14:23 [PATCH 1/1] designware: fix 100mps phy support Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 14:25 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-10-15  6:55 ` Sascha Hauer
2012-10-16 11:34   ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-16 20:35     ` Sascha Hauer
2012-10-21 18:37       ` Jean-Christophe PLAGNIOL-VILLARD

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=1350224701-17223-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.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