* [PATCH 1/1] designware: fix 100mps phy support
@ 2012-10-14 14:23 Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 14:25 ` [PATCH 1/1] net:designware: allow to pass the phy interface Jean-Christophe PLAGNIOL-VILLARD
2012-10-15 6:55 ` [PATCH 1/1] designware: fix 100mps phy support Sascha Hauer
0 siblings, 2 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-10-14 14:23 UTC (permalink / raw)
To: barebox
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
drivers/net/designware.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 63b199f..7eadd92 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -244,6 +244,16 @@ static void dwc_update_linkspeed(struct eth_device *edev)
conf &= ~MII_PORTSELECT;
else
conf |= MII_PORTSELECT;
+
+ if ((edev->phydev->interface != PHY_INTERFACE_MODE_MII) &&
+ (edev->phydev->interface != PHY_INTERFACE_MODE_GMII)) {
+
+ if (edev->phydev->speed == 100)
+ conf |= FES_100;
+ else
+ conf &= ~FES_100;
+ }
+
writel(conf, &mac_p->conf);
}
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] net:designware: allow to pass the phy interface
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
2012-10-15 6:55 ` [PATCH 1/1] designware: fix 100mps phy support Sascha Hauer
1 sibling, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-10-14 14:25 UTC (permalink / raw)
To: barebox
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] designware: fix 100mps phy support
2012-10-14 14:23 [PATCH 1/1] designware: fix 100mps phy support Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 14:25 ` [PATCH 1/1] net:designware: allow to pass the phy interface Jean-Christophe PLAGNIOL-VILLARD
@ 2012-10-15 6:55 ` Sascha Hauer
2012-10-16 11:34 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2012-10-15 6:55 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Sun, Oct 14, 2012 at 04:23:18PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Applied, thanks
Sascha
> ---
> drivers/net/designware.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index 63b199f..7eadd92 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
> @@ -244,6 +244,16 @@ static void dwc_update_linkspeed(struct eth_device *edev)
> conf &= ~MII_PORTSELECT;
> else
> conf |= MII_PORTSELECT;
> +
> + if ((edev->phydev->interface != PHY_INTERFACE_MODE_MII) &&
> + (edev->phydev->interface != PHY_INTERFACE_MODE_GMII)) {
> +
> + if (edev->phydev->speed == 100)
> + conf |= FES_100;
> + else
> + conf &= ~FES_100;
> + }
> +
> writel(conf, &mac_p->conf);
> }
>
> --
> 1.7.10.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] designware: fix 100mps phy support
2012-10-15 6:55 ` [PATCH 1/1] designware: fix 100mps phy support Sascha Hauer
@ 2012-10-16 11:34 ` Jean-Christophe PLAGNIOL-VILLARD
2012-10-16 20:35 ` Sascha Hauer
0 siblings, 1 reply; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-10-16 11:34 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 08:55 Mon 15 Oct , Sascha Hauer wrote:
> On Sun, Oct 14, 2012 at 04:23:18PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>
need both patch
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] designware: fix 100mps phy support
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
0 siblings, 1 reply; 6+ messages in thread
From: Sascha Hauer @ 2012-10-16 20:35 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
On Tue, Oct 16, 2012 at 01:34:04PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 08:55 Mon 15 Oct , Sascha Hauer wrote:
> > On Sun, Oct 14, 2012 at 04:23:18PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >
> need both patch
apply both patch
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] designware: fix 100mps phy support
2012-10-16 20:35 ` Sascha Hauer
@ 2012-10-21 18:37 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-10-21 18:37 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 22:35 Tue 16 Oct , Sascha Hauer wrote:
> On Tue, Oct 16, 2012 at 01:34:04PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 08:55 Mon 15 Oct , Sascha Hauer wrote:
> > > On Sun, Oct 14, 2012 at 04:23:18PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > >
> > need both patch
>
> apply both patch
I do not see it on master as we need both on master
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-10-21 18:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-14 14:23 [PATCH 1/1] designware: fix 100mps phy support Jean-Christophe PLAGNIOL-VILLARD
2012-10-14 14:25 ` [PATCH 1/1] net:designware: allow to pass the phy interface Jean-Christophe PLAGNIOL-VILLARD
2012-10-15 6:55 ` [PATCH 1/1] designware: fix 100mps phy support 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox