Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-06 Thread Alistair Popple
On Wed, 6 Nov 2013 16:40:10 Ben Hutchings wrote: > On Wed, 2013-11-06 at 12:34 +1100, Alistair Popple wrote: > > On Tue, 5 Nov 2013 23:11:50 Ben Hutchings wrote: > > > On Wed, 2013-11-06 at 06:54 +1100, Benjamin Herrenschmidt wrote: > > [snip] > > > > > > It's an SoC bit so there's little point ma

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-06 Thread Ben Hutchings
On Wed, 2013-11-06 at 12:34 +1100, Alistair Popple wrote: > On Tue, 5 Nov 2013 23:11:50 Ben Hutchings wrote: > > On Wed, 2013-11-06 at 06:54 +1100, Benjamin Herrenschmidt wrote: > > [snip] > > > > It's an SoC bit so there's little point making it generally > > > selectable by the user. > > > > I

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Florian Fainelli
2013/11/5 Benjamin Herrenschmidt : > On Wed, 2013-11-06 at 12:38 +1100, Alistair Popple wrote: >> > Right, rgmii_mode_name() just has informative purposes and should be >> > removed, I would suggest using standard device tree bindings >> property >> > (phy-mode) anyway such that you could use of_ge

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Benjamin Herrenschmidt
On Wed, 2013-11-06 at 12:38 +1100, Alistair Popple wrote: > > Right, rgmii_mode_name() just has informative purposes and should be > > removed, I would suggest using standard device tree bindings > property > > (phy-mode) anyway such that you could use of_get_phy_mode() and use > > phy_interface_t

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Alistair Popple
On Tue, 5 Nov 2013 16:16:08 Florian Fainelli wrote: [snip] > 2013/11/5 Alistair Popple : > >> Any reasons why you are duplicating what is available in > >> drivers/of/of_net.c ::of_get_phy_mode()? > > > > Unless I'm missing something of_get_phy_mode() is going the other way. > > rgmii_mode_name(

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Alistair Popple
On Tue, 5 Nov 2013 23:11:50 Ben Hutchings wrote: > On Wed, 2013-11-06 at 06:54 +1100, Benjamin Herrenschmidt wrote: [snip] > > It's an SoC bit so there's little point making it generally > > selectable by the user. > > I think a better way to do this is: > > config IBM_EMAC_RGMII_WOL > bo

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Florian Fainelli
2013/11/5 Alistair Popple : > On Tue, 5 Nov 2013 10:47:22 Florian Fainelli wrote: >> [snip] >> >> > +/* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */ >> > +static inline int rgmii_valid_mode(int phy_mode) >> > +{ >> > + return phy_mode == PHY_MODE_GMII || >> > + ph

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Alistair Popple
On Tue, 5 Nov 2013 10:47:22 Florian Fainelli wrote: > [snip] > > > +/* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */ > > +static inline int rgmii_valid_mode(int phy_mode) > > +{ > > + return phy_mode == PHY_MODE_GMII || > > + phy_mode == PHY_MODE_MII || > > +

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Ben Hutchings
On Wed, 2013-11-06 at 06:54 +1100, Benjamin Herrenschmidt wrote: > On Tue, 2013-11-05 at 18:16 +, Ben Hutchings wrote: > > On Tue, 2013-11-05 at 16:31 +1100, Alistair Popple wrote: > > [...] > > > --- a/drivers/net/ethernet/ibm/emac/Kconfig > > > +++ b/drivers/net/ethernet/ibm/emac/Kconfig > >

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Florian Fainelli
[snip] > +/* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */ > +static inline int rgmii_valid_mode(int phy_mode) > +{ > + return phy_mode == PHY_MODE_GMII || > + phy_mode == PHY_MODE_MII || > + phy_mode == PHY_MODE_RGMII || > + phy_mode =

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Benjamin Herrenschmidt
On Tue, 2013-11-05 at 18:16 +, Ben Hutchings wrote: > On Tue, 2013-11-05 at 16:31 +1100, Alistair Popple wrote: > [...] > > --- a/drivers/net/ethernet/ibm/emac/Kconfig > > +++ b/drivers/net/ethernet/ibm/emac/Kconfig > > @@ -55,6 +55,10 @@ config IBM_EMAC_RGMII > > bool > > default n > >

Re: [PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-05 Thread Ben Hutchings
On Tue, 2013-11-05 at 16:31 +1100, Alistair Popple wrote: [...] > --- a/drivers/net/ethernet/ibm/emac/Kconfig > +++ b/drivers/net/ethernet/ibm/emac/Kconfig > @@ -55,6 +55,10 @@ config IBM_EMAC_RGMII > bool > default n > > +config IBM_EMAC_RGMII_WOL > + bool > + default n > + [

[PATCH 3/7] IBM Akebono: Add support for a new PHY to the IBM emac driver

2013-11-04 Thread Alistair Popple
The IBM Akebono board uses a different ethernet PHY that has wake on lan (WOL) support with the IBM emac. This patch adds suppot to the IBM emac driver for this new PHY. At this stage the wake on lan functionality has not been implemented. Signed-off-by: Alistair Popple Cc: "David S. Miller" Cc