diff mbox

[1/3] sh_eth: add RGMII support

Message ID 38a56174-c05d-8864-adf0-d3099e426a60@cogentembedded.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Sergei Shtylyov May 16, 2018, 7:56 p.m. UTC
The R-Car V3H (AKA R8A77980) GEther controller  adds support for the RGMII
PHY interface mode as a new  value  for the RMII_MII register.

Based on the original (and large) patch by Vladimir Barinov.

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
 drivers/net/ethernet/renesas/sh_eth.c |    3 +++
 1 file changed, 3 insertions(+)

Comments

Andrew Lunn May 16, 2018, 8:30 p.m. UTC | #1
On Wed, May 16, 2018 at 10:56:45PM +0300, Sergei Shtylyov wrote:
> The R-Car V3H (AKA R8A77980) GEther controller  adds support for the RGMII
> PHY interface mode as a new  value  for the RMII_MII register.
> 
> Based on the original (and large) patch by Vladimir Barinov.
> 
> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
>  drivers/net/ethernet/renesas/sh_eth.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
> ===================================================================
> --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
> +++ net-next/drivers/net/ethernet/renesas/sh_eth.c
> @@ -466,6 +466,9 @@ static void sh_eth_select_mii(struct net
>  	u32 value;
>  
>  	switch (mdp->phy_interface) {
> +	case PHY_INTERFACE_MODE_RGMII:
> +		value = 0x3;
> +		break;

Hi Sergei

What about
	PHY_INTERFACE_MODE_RGMII_ID,
	PHY_INTERFACE_MODE_RGMII_RXID,
	PHY_INTERFACE_MODE_RGMII_TXID,

     Andrew
Sergei Shtylyov May 16, 2018, 8:34 p.m. UTC | #2
On 05/16/2018 11:30 PM, Andrew Lunn wrote:

>> The R-Car V3H (AKA R8A77980) GEther controller  adds support for the RGMII
>> PHY interface mode as a new  value  for the RMII_MII register.
>>
>> Based on the original (and large) patch by Vladimir Barinov.
>>
>> Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>>  drivers/net/ethernet/renesas/sh_eth.c |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
>> ===================================================================
>> --- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
>> +++ net-next/drivers/net/ethernet/renesas/sh_eth.c
>> @@ -466,6 +466,9 @@ static void sh_eth_select_mii(struct net
>>  	u32 value;
>>  
>>  	switch (mdp->phy_interface) {
>> +	case PHY_INTERFACE_MODE_RGMII:
>> +		value = 0x3;
>> +		break;
> 
> Hi Sergei
> 
> What about
> 	PHY_INTERFACE_MODE_RGMII_ID,
> 	PHY_INTERFACE_MODE_RGMII_RXID,
> 	PHY_INTERFACE_MODE_RGMII_TXID,

   Oops, totally forgot about those... :-/

>      Andrew

MBR, Sergei
Andrew Lunn May 16, 2018, 8:37 p.m. UTC | #3
> > Hi Sergei
> > 
> > What about
> > 	PHY_INTERFACE_MODE_RGMII_ID,
> > 	PHY_INTERFACE_MODE_RGMII_RXID,
> > 	PHY_INTERFACE_MODE_RGMII_TXID,
> 
>    Oops, totally forgot about those... :-/

Everybody does. I keep intending to write a email template for
this, and phy_interface_mode_is_rgmii() :-)

	Andrew
Sergei Shtylyov May 17, 2018, 8:15 a.m. UTC | #4
On 5/16/2018 11:37 PM, Andrew Lunn wrote:

>>> What about
>>> 	PHY_INTERFACE_MODE_RGMII_ID,
>>> 	PHY_INTERFACE_MODE_RGMII_RXID,
>>> 	PHY_INTERFACE_MODE_RGMII_TXID,
>>
>>     Oops, totally forgot about those... :-/
> 
> Everybody does. I keep intending to write a email template for
> this, and phy_interface_mode_is_rgmii() :-)

    The latter doesn't fit for *switch*, anyway.

> 	Andrew

MBR, Sergei
diff mbox

Patch

Index: net-next/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net-next/drivers/net/ethernet/renesas/sh_eth.c
@@ -466,6 +466,9 @@  static void sh_eth_select_mii(struct net
 	u32 value;
 
 	switch (mdp->phy_interface) {
+	case PHY_INTERFACE_MODE_RGMII:
+		value = 0x3;
+		break;
 	case PHY_INTERFACE_MODE_GMII:
 		value = 0x2;
 		break;