sh_eth: add/use RMCR.RNC bit
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Tue, 15 Oct 2013 22:29:58 +0000 (02:29 +0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Oct 2013 20:49:58 +0000 (16:49 -0400)
Declare 'enum RMCR_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>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h

index 7258366f7e0b2bdfdc368a62db27636b17efe472..eaf11e47334fbcbca50cc8b6b27084f46f4b47c4 100644 (file)
@@ -483,7 +483,7 @@ static struct sh_eth_cpu_data sh7757_data = {
        .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_data_giga = {
                          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_data = {
                          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 a0db02c63b1157930ca0fca070dd733aa39b7c54..f32c1692d31017186e0e33aaf408eddf7d16a3fa 100644 (file)
@@ -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 */