sh_eth: stop using bare numbers for EESIPR values
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sun, 29 Jan 2017 12:13:48 +0000 (15:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Jan 2017 03:05:43 +0000 (22:05 -0500)
Now  that we  have almost all EESIPR bits declared (and those  that are
still not are most probably reserved anyway) we can at last replace the
bare  numbers used for 'sh_eth_cpu_data::eesipr_value' initializers with
the bit names ORed together...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c

index 34c5df827bf4971f61d7794ebb076d352078f078..2f08d2735fe25e4dee67231cc6b58f2616c9f3ed 100644 (file)
@@ -518,7 +518,14 @@ static struct sh_eth_cpu_data r7s72100_data = {
 
        .ecsr_value     = ECSR_ICD,
        .ecsipr_value   = ECSIPR_ICDIP,
-       .eesipr_value   = 0xe77f009f,
+       .eesipr_value   = EESIPR_TWB1IP | EESIPR_TWBIP | EESIPR_TC1IP |
+                         EESIPR_TABTIP | EESIPR_RABTIP | EESIPR_RFCOFIP |
+                         EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         EESIPR_RMAFIP | EESIPR_RRFIP |
+                         EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_TC1 | EESR_FTC,
        .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
@@ -556,7 +563,14 @@ static struct sh_eth_cpu_data r8a7740_data = {
 
        .ecsr_value     = ECSR_ICD | ECSR_MPD,
        .ecsipr_value   = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
-       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP | 0x003fffff,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         0x0000f000 | EESIPR_CNDIP | EESIPR_DLCIP |
+                         EESIPR_CDIP | EESIPR_TROIP | EESIPR_RMAFIP |
+                         EESIPR_CEEFIP | EESIPR_CELFIP |
+                         EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_TC1 | EESR_FTC,
        .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
@@ -603,7 +617,12 @@ static struct sh_eth_cpu_data r8a777x_data = {
 
        .ecsr_value     = ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD,
        .ecsipr_value   = ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP,
-       .eesipr_value   = 0x01ff009f,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ADEIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         EESIPR_RMAFIP | EESIPR_RRFIP |
+                         EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
        .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
@@ -626,7 +645,12 @@ static struct sh_eth_cpu_data r8a779x_data = {
        .ecsr_value     = ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD | ECSR_MPD,
        .ecsipr_value   = ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP |
                          ECSIPR_MPDIP,
-       .eesipr_value   = 0x01ff009f,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ADEIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         EESIPR_RMAFIP | EESIPR_RRFIP |
+                         EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
        .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
@@ -667,7 +691,12 @@ static struct sh_eth_cpu_data sh7724_data = {
 
        .ecsr_value     = ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD,
        .ecsipr_value   = ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP,
-       .eesipr_value   = 0x01ff009f,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ADEIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         EESIPR_RMAFIP | EESIPR_RRFIP |
+                         EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
        .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
@@ -702,7 +731,14 @@ static struct sh_eth_cpu_data sh7757_data = {
 
        .register_type  = SH_ETH_REG_FAST_SH4,
 
-       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP | 0x003fffff,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         0x0000f000 | EESIPR_CNDIP | EESIPR_DLCIP |
+                         EESIPR_CDIP | EESIPR_TROIP | EESIPR_RMAFIP |
+                         EESIPR_CEEFIP | EESIPR_CELFIP |
+                         EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
        .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
@@ -769,7 +805,14 @@ static struct sh_eth_cpu_data sh7757_data_giga = {
 
        .ecsr_value     = ECSR_ICD | ECSR_MPD,
        .ecsipr_value   = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
-       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP | 0x003fffff,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         0x0000f000 | EESIPR_CNDIP | EESIPR_DLCIP |
+                         EESIPR_CDIP | EESIPR_TROIP | EESIPR_RMAFIP |
+                         EESIPR_CEEFIP | EESIPR_CELFIP |
+                         EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_TC1 | EESR_FTC,
        .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
@@ -800,7 +843,13 @@ static struct sh_eth_cpu_data sh7734_data = {
 
        .ecsr_value     = ECSR_ICD | ECSR_MPD,
        .ecsipr_value   = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
-       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP | 0x003f07ff,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         EESIPR_DLCIP | EESIPR_CDIP | EESIPR_TROIP |
+                         EESIPR_RMAFIP | EESIPR_CEEFIP | EESIPR_CELFIP |
+                         EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_TC1 | EESR_FTC,
        .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
@@ -830,7 +879,13 @@ static struct sh_eth_cpu_data sh7763_data = {
 
        .ecsr_value     = ECSR_ICD | ECSR_MPD,
        .ecsipr_value   = ECSIPR_LCHNGIP | ECSIPR_ICDIP | ECSIPR_MPDIP,
-       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP | 0x003f07ff,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         EESIPR_DLCIP | EESIPR_CDIP | EESIPR_TROIP |
+                         EESIPR_RMAFIP | EESIPR_CEEFIP | EESIPR_CELFIP |
+                         EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .tx_check       = EESR_TC1 | EESR_FTC,
        .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
@@ -851,7 +906,14 @@ static struct sh_eth_cpu_data sh7763_data = {
 static struct sh_eth_cpu_data sh7619_data = {
        .register_type  = SH_ETH_REG_FAST_SH3_SH2,
 
-       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP | 0x003fffff,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         0x0000f000 | EESIPR_CNDIP | EESIPR_DLCIP |
+                         EESIPR_CDIP | EESIPR_TROIP | EESIPR_RMAFIP |
+                         EESIPR_CEEFIP | EESIPR_CELFIP |
+                         EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
 
        .apr            = 1,
        .mpr            = 1,
@@ -862,7 +924,14 @@ static struct sh_eth_cpu_data sh7619_data = {
 static struct sh_eth_cpu_data sh771x_data = {
        .register_type  = SH_ETH_REG_FAST_SH3_SH2,
 
-       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP | 0x003fffff,
+       .eesipr_value   = EESIPR_RFCOFIP | EESIPR_ECIIP |
+                         EESIPR_FTCIP | EESIPR_TDEIP | EESIPR_TFUFIP |
+                         EESIPR_FRIP | EESIPR_RDEIP | EESIPR_RFOFIP |
+                         0x0000f000 | EESIPR_CNDIP | EESIPR_DLCIP |
+                         EESIPR_CDIP | EESIPR_TROIP | EESIPR_RMAFIP |
+                         EESIPR_CEEFIP | EESIPR_CELFIP |
+                         EESIPR_RRFIP | EESIPR_RTLFIP | EESIPR_RTSFIP |
+                         EESIPR_PREIP | EESIPR_CERFIP,
        .tsu            = 1,
 };