netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh_eth: add R8A77781 support
@ 2013-04-27 20:44 Sergei Shtylyov
  2013-04-28 20:33 ` Laurent Pinchart
  2013-04-29 18:25 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2013-04-27 20:44 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh

Add support for another ARM member of the R-Car family, R-Car M1A, also known as
R8A77781 -- it will share the code with previously added R8A77790.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is for the 'net-next.git' repository but it may not be fit for
immediate applying as R-Car M1A support will only be merged in 3.10-rc1...

 drivers/net/ethernet/renesas/Kconfig  |    3 ++-
 drivers/net/ethernet/renesas/sh_eth.c |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

Index: net-next/drivers/net/ethernet/renesas/Kconfig
===================================================================
--- net-next.orig/drivers/net/ethernet/renesas/Kconfig
+++ net-next/drivers/net/ethernet/renesas/Kconfig
@@ -8,7 +8,8 @@ config SH_ETH
 		(CPU_SUBTYPE_SH7710 || CPU_SUBTYPE_SH7712 || \
 		 CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \
 		 CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \
-		 CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || ARCH_R8A7779)
+		 CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || \
+		 ARCH_R8A7778 || ARCH_R8A7779)
 	select CRC32
 	select NET_CORE
 	select MII
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
@@ -342,7 +342,7 @@ static void sh_eth_select_mii(struct net
 #endif
 
 /* There is CPU dependent code */
-#if defined(CONFIG_ARCH_R8A7779)
+#if defined(CONFIG_ARCH_R8A7778) || defined(CONFIG_ARCH_R8A7779)
 #define SH_ETH_RESET_DEFAULT	1
 static void sh_eth_set_duplex(struct net_device *ndev)
 {
@@ -370,7 +370,7 @@ static void sh_eth_set_rate(struct net_d
 	}
 }
 
-/* R8A7779 */
+/* R8A7778/9 */
 static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
 	.set_duplex	= sh_eth_set_duplex,
 	.set_rate	= sh_eth_set_rate,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sh_eth: add R8A77781 support
  2013-04-27 20:44 [PATCH] sh_eth: add R8A77781 support Sergei Shtylyov
@ 2013-04-28 20:33 ` Laurent Pinchart
  2013-04-29 11:45   ` Sergei Shtylyov
  2013-04-29 18:25 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2013-04-28 20:33 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj, linux-sh

Hi Sergei,

Thank you for the patch.

On Sunday 28 April 2013 00:44:24 Sergei Shtylyov wrote:
> Add support for another ARM member of the R-Car family, R-Car M1A, also
> known as R8A77781 -- it will share the code with previously added R8A77790.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
> This patch is for the 'net-next.git' repository but it may not be fit for
> immediate applying as R-Car M1A support will only be merged in 3.10-rc1...
> 
>  drivers/net/ethernet/renesas/Kconfig  |    3 ++-
>  drivers/net/ethernet/renesas/sh_eth.c |    4 ++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> Index: net-next/drivers/net/ethernet/renesas/Kconfig
> ===================================================================
> --- net-next.orig/drivers/net/ethernet/renesas/Kconfig
> +++ net-next/drivers/net/ethernet/renesas/Kconfig
> @@ -8,7 +8,8 @@ config SH_ETH
>  		(CPU_SUBTYPE_SH7710 || CPU_SUBTYPE_SH7712 || \
>  		 CPU_SUBTYPE_SH7763 || CPU_SUBTYPE_SH7619 || \
>  		 CPU_SUBTYPE_SH7724 || CPU_SUBTYPE_SH7734 || \
> -		 CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || ARCH_R8A7779)
> +		 CPU_SUBTYPE_SH7757 || ARCH_R8A7740 || \
> +		 ARCH_R8A7778 || ARCH_R8A7779)
>  	select CRC32
>  	select NET_CORE
>  	select MII
> 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
> @@ -342,7 +342,7 @@ static void sh_eth_select_mii(struct net
>  #endif
> 
>  /* There is CPU dependent code */
> -#if defined(CONFIG_ARCH_R8A7779)
> +#if defined(CONFIG_ARCH_R8A7778) || defined(CONFIG_ARCH_R8A7779)
>  #define SH_ETH_RESET_DEFAULT	1
>  static void sh_eth_set_duplex(struct net_device *ndev)
>  {
> @@ -370,7 +370,7 @@ static void sh_eth_set_rate(struct net_d
>  	}
>  }
> 
> -/* R8A7779 */
> +/* R8A7778/9 */
>  static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
>  	.set_duplex	= sh_eth_set_duplex,
>  	.set_rate	= sh_eth_set_rate,

I was wondering if someone is working (or was planning to work in the near 
future) in getting rid of that #ifdef mess and add proper support for 
multiplatform kernels to the sh-eth driver ?

The patch looks good to me though, the above isn't a reason to delay it.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sh_eth: add R8A77781 support
  2013-04-28 20:33 ` Laurent Pinchart
@ 2013-04-29 11:45   ` Sergei Shtylyov
  2013-04-29 12:04     ` Laurent Pinchart
  0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2013-04-29 11:45 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: netdev, nobuhiro.iwamatsu.yj, linux-sh

Hello.

On 29-04-2013 0:33, Laurent Pinchart wrote:

> On Sunday 28 April 2013 00:44:24 Sergei Shtylyov wrote:
>> Add support for another ARM member of the R-Car family, R-Car M1A, also
>> known as R8A77781 -- it will share the code with previously added R8A77790.

>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

[...]

>> 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
>> @@ -342,7 +342,7 @@ static void sh_eth_select_mii(struct net
>>   #endif
>>
>>   /* There is CPU dependent code */
>> -#if defined(CONFIG_ARCH_R8A7779)
>> +#if defined(CONFIG_ARCH_R8A7778) || defined(CONFIG_ARCH_R8A7779)
>>   #define SH_ETH_RESET_DEFAULT	1
>>   static void sh_eth_set_duplex(struct net_device *ndev)
>>   {
>> @@ -370,7 +370,7 @@ static void sh_eth_set_rate(struct net_d
>>   	}
>>   }
>>
>> -/* R8A7779 */
>> +/* R8A7778/9 */
>>   static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
>>   	.set_duplex	= sh_eth_set_duplex,
>>   	.set_rate	= sh_eth_set_rate,

> I was wondering if someone is working (or was planning to work in the near
> future) in getting rid of that #ifdef mess and add proper support for
> multiplatform kernels to the sh-eth driver ?

    Yes, I'm still going to work on it.

> The patch looks good to me though, the above isn't a reason to delay it.

WBR, Sergei


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sh_eth: add R8A77781 support
  2013-04-29 11:45   ` Sergei Shtylyov
@ 2013-04-29 12:04     ` Laurent Pinchart
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2013-04-29 12:04 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj, linux-sh

Hi Sergei,

On Monday 29 April 2013 15:45:07 Sergei Shtylyov wrote:
> Hello.
> 
> On 29-04-2013 0:33, Laurent Pinchart wrote:
> > On Sunday 28 April 2013 00:44:24 Sergei Shtylyov wrote:
> >> Add support for another ARM member of the R-Car family, R-Car M1A, also
> >> known as R8A77781 -- it will share the code with previously added
> >> R8A77790.
> >> 
> >> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> [...]
> 
> >> 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
> >> @@ -342,7 +342,7 @@ static void sh_eth_select_mii(struct net
> >>   #endif
> >>   
> >>   /* There is CPU dependent code */
> >> -#if defined(CONFIG_ARCH_R8A7779)
> >> +#if defined(CONFIG_ARCH_R8A7778) || defined(CONFIG_ARCH_R8A7779)
> >>   #define SH_ETH_RESET_DEFAULT	1
> >>   static void sh_eth_set_duplex(struct net_device *ndev)
> >>   {
> >> @@ -370,7 +370,7 @@ static void sh_eth_set_rate(struct net_d
> >>   	}
> >>   }
> >> 
> >> -/* R8A7779 */
> >> +/* R8A7778/9 */
> >>   static struct sh_eth_cpu_data sh_eth_my_cpu_data = {
> >>   	.set_duplex	= sh_eth_set_duplex,
> >>   	.set_rate	= sh_eth_set_rate,
> > 
> > I was wondering if someone is working (or was planning to work in the near
> > future) in getting rid of that #ifdef mess and add proper support for
> > multiplatform kernels to the sh-eth driver ?
> 
> Yes, I'm still going to work on it.

Great. I would have cooked up a patch otherwise.

> > The patch looks good to me though, the above isn't a reason to delay it.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sh_eth: add R8A77781 support
  2013-04-27 20:44 [PATCH] sh_eth: add R8A77781 support Sergei Shtylyov
  2013-04-28 20:33 ` Laurent Pinchart
@ 2013-04-29 18:25 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2013-04-29 18:25 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj, linux-sh

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Sun, 28 Apr 2013 00:44:24 +0400

> Add support for another ARM member of the R-Car family, R-Car M1A, also known as
> R8A77781 -- it will share the code with previously added R8A77790.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-29 18:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-27 20:44 [PATCH] sh_eth: add R8A77781 support Sergei Shtylyov
2013-04-28 20:33 ` Laurent Pinchart
2013-04-29 11:45   ` Sergei Shtylyov
2013-04-29 12:04     ` Laurent Pinchart
2013-04-29 18:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).