netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sh_eth: add/use RMCR.RNC bit
@ 2013-10-15 22:29 Sergei Shtylyov
  2013-10-16  0:34 ` Simon Horman
  2013-10-22 22:16 ` Sergei Shtylyov
  0 siblings, 2 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2013-10-15 22:29 UTC (permalink / raw)
  To: netdev; +Cc: nobuhiro.iwamatsu.yj, linux-sh, davem, horms

Declare 'enum EMCR_BIT' containing the single member for the RMCR.RNC bit and
replace bare numbers in the driver by  this mnemonic.

Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against DaveM's 'net.git' repo but it intended for 'net-next.git'
repo -- it's  because 'net-next.git' doesn't contain the required Simon Horman's
patch yet.

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

Index: net/drivers/net/ethernet/renesas/sh_eth.c
===================================================================
--- net.orig/drivers/net/ethernet/renesas/sh_eth.c
+++ net/drivers/net/ethernet/renesas/sh_eth.c
@@ -483,7 +483,7 @@ static struct sh_eth_cpu_data sh7757_dat
 	.register_type	= SH_ETH_REG_FAST_SH4,
 
 	.eesipr_value	= DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
-	.rmcr_value	= 0x00000001,
+	.rmcr_value	= RMCR_RNC,
 
 	.tx_check	= EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
 	.eesr_err_check	= EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
@@ -561,7 +561,7 @@ static struct sh_eth_cpu_data sh7757_dat
 			  EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
 			  EESR_TDE | EESR_ECI,
 	.fdr_value	= 0x0000072f,
-	.rmcr_value	= 0x00000001,
+	.rmcr_value	= RMCR_RNC,
 
 	.irq_flags	= IRQF_SHARED,
 	.apr		= 1,
@@ -689,7 +689,7 @@ static struct sh_eth_cpu_data r8a7740_da
 			  EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
 			  EESR_TDE | EESR_ECI,
 	.fdr_value	= 0x0000070f,
-	.rmcr_value	= 0x00000001,
+	.rmcr_value	= RMCR_RNC,
 
 	.apr		= 1,
 	.mpr		= 1,
Index: net/drivers/net/ethernet/renesas/sh_eth.h
===================================================================
--- net.orig/drivers/net/ethernet/renesas/sh_eth.h
+++ net/drivers/net/ethernet/renesas/sh_eth.h
@@ -321,6 +321,9 @@ enum TD_STS_BIT {
 #define TD_TFP	(TD_TFP1|TD_TFP0)
 
 /* RMCR */
+enum RMCR_BIT {
+	RMCR_RNC = 0x00000001,
+};
 #define DEFAULT_RMCR_VALUE	0x00000000
 
 /* ECMR */

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

* Re: [PATCH] sh_eth: add/use RMCR.RNC bit
  2013-10-15 22:29 [PATCH] sh_eth: add/use RMCR.RNC bit Sergei Shtylyov
@ 2013-10-16  0:34 ` Simon Horman
  2013-10-22 22:16 ` Sergei Shtylyov
  1 sibling, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-10-16  0:34 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj, linux-sh, davem

On Wed, Oct 16, 2013 at 02:29:58AM +0400, Sergei Shtylyov wrote:
> Declare 'enum EMCR_BIT' containing the single member for the RMCR.RNC bit and
> replace bare numbers in the driver by  this mnemonic.
> 
> Suggested-by: David Miller <davem@davemloft.net>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

Thanks Sergei,

this seems to move things in the right direction.

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

> ---
> This patch is against DaveM's 'net.git' repo but it intended for 'net-next.git'
> repo -- it's  because 'net-next.git' doesn't contain the required Simon Horman's
> patch yet.
> 
>  drivers/net/ethernet/renesas/sh_eth.c |    6 +++---
>  drivers/net/ethernet/renesas/sh_eth.h |    3 +++
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> Index: net/drivers/net/ethernet/renesas/sh_eth.c
> ===================================================================
> --- net.orig/drivers/net/ethernet/renesas/sh_eth.c
> +++ net/drivers/net/ethernet/renesas/sh_eth.c
> @@ -483,7 +483,7 @@ static struct sh_eth_cpu_data sh7757_dat
>  	.register_type	= SH_ETH_REG_FAST_SH4,
>  
>  	.eesipr_value	= DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
> -	.rmcr_value	= 0x00000001,
> +	.rmcr_value	= RMCR_RNC,
>  
>  	.tx_check	= EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
>  	.eesr_err_check	= EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
> @@ -561,7 +561,7 @@ static struct sh_eth_cpu_data sh7757_dat
>  			  EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
>  			  EESR_TDE | EESR_ECI,
>  	.fdr_value	= 0x0000072f,
> -	.rmcr_value	= 0x00000001,
> +	.rmcr_value	= RMCR_RNC,
>  
>  	.irq_flags	= IRQF_SHARED,
>  	.apr		= 1,
> @@ -689,7 +689,7 @@ static struct sh_eth_cpu_data r8a7740_da
>  			  EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
>  			  EESR_TDE | EESR_ECI,
>  	.fdr_value	= 0x0000070f,
> -	.rmcr_value	= 0x00000001,
> +	.rmcr_value	= RMCR_RNC,
>  
>  	.apr		= 1,
>  	.mpr		= 1,
> Index: net/drivers/net/ethernet/renesas/sh_eth.h
> ===================================================================
> --- net.orig/drivers/net/ethernet/renesas/sh_eth.h
> +++ net/drivers/net/ethernet/renesas/sh_eth.h
> @@ -321,6 +321,9 @@ enum TD_STS_BIT {
>  #define TD_TFP	(TD_TFP1|TD_TFP0)
>  
>  /* RMCR */
> +enum RMCR_BIT {
> +	RMCR_RNC = 0x00000001,
> +};
>  #define DEFAULT_RMCR_VALUE	0x00000000
>  
>  /* ECMR */
> 

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

* Re: [PATCH] sh_eth: add/use RMCR.RNC bit
  2013-10-15 22:29 [PATCH] sh_eth: add/use RMCR.RNC bit Sergei Shtylyov
  2013-10-16  0:34 ` Simon Horman
@ 2013-10-22 22:16 ` Sergei Shtylyov
  2013-10-22 23:08   ` David Miller
  2013-10-23 20:50   ` David Miller
  1 sibling, 2 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2013-10-22 22:16 UTC (permalink / raw)
  To: netdev, David Miller; +Cc: nobuhiro.iwamatsu.yj, linux-sh, davem, horms

Hello.

On 10/16/2013 02:29 AM, Sergei Shtylyov wrote:

> Declare 'enum EMCR_BIT' containing the single member for the RMCR.RNC bit and

    Hm, looks like I typoed here, should have been RMCR_BIT. David, should I 
resubmit or you can fix it while applying? Or simply not worth the trouble?

> replace bare numbers in the driver by  this mnemonic.

> Suggested-by: David Miller <davem@davemloft.net>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

> ---
> This patch is against DaveM's 'net.git' repo but it intended for 'net-next.git'
> repo -- it's  because 'net-next.git' doesn't contain the required Simon Horman's
> patch yet.

WBR, Sergei


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

* Re: [PATCH] sh_eth: add/use RMCR.RNC bit
  2013-10-22 22:16 ` Sergei Shtylyov
@ 2013-10-22 23:08   ` David Miller
  2013-10-23 20:50   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2013-10-22 23:08 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj, linux-sh, horms

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 23 Oct 2013 02:16:46 +0400

> Hello.
> 
> On 10/16/2013 02:29 AM, Sergei Shtylyov wrote:
> 
>> Declare 'enum EMCR_BIT' containing the single member for the RMCR.RNC
>> bit and
> 
>    Hm, looks like I typoed here, should have been RMCR_BIT. David, should
>    I resubmit or you can fix it while applying? Or simply not worth the
>    trouble?

I'll fix it when I apply it, thanks.

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

* Re: [PATCH] sh_eth: add/use RMCR.RNC bit
  2013-10-22 22:16 ` Sergei Shtylyov
  2013-10-22 23:08   ` David Miller
@ 2013-10-23 20:50   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2013-10-23 20:50 UTC (permalink / raw)
  To: sergei.shtylyov; +Cc: netdev, nobuhiro.iwamatsu.yj, linux-sh, horms

From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 23 Oct 2013 02:16:46 +0400

> Hello.
> 
> On 10/16/2013 02:29 AM, Sergei Shtylyov wrote:
> 
>> Declare 'enum EMCR_BIT' containing the single member for the RMCR.RNC
>> bit and
> 
>    Hm, looks like I typoed here, should have been RMCR_BIT. David, should
>    I resubmit or you can fix it while applying? Or simply not worth the
>    trouble?

Applied, with the typo fixed, thanks.

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

end of thread, other threads:[~2013-10-23 20:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 22:29 [PATCH] sh_eth: add/use RMCR.RNC bit Sergei Shtylyov
2013-10-16  0:34 ` Simon Horman
2013-10-22 22:16 ` Sergei Shtylyov
2013-10-22 23:08   ` David Miller
2013-10-23 20:50   ` 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).