diff options
author | Marek Vasut <marek.vasut+renesas@gmail.com> | 2018-01-22 01:42:32 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-01-27 20:38:53 +0100 |
commit | effb79027e9a178c14e80f48c907332048d0fb3d (patch) | |
tree | 94f680be9a5f5e90a21a796c7bd51f76d6044273 | |
parent | e3105eacf5c876e817f5a45628c4504b0f6142bf (diff) |
net: sh_eth: Unify CONFIG_R8A779[01234] as CONFIG_RCAR_GEN2
Use the common RCAR_GEN2 config option instead of enumerating
each SoC and having a lengthy ifdef clause. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r-- | drivers/net/sh_eth.c | 7 | ||||
-rw-r--r-- | drivers/net/sh_eth.h | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 6edb51e12f..d065141bf9 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -421,8 +421,7 @@ static int sh_eth_config(struct sh_eth_dev *eth) #if defined(CONFIG_CPU_SH7734) || defined(CONFIG_R8A7740) sh_eth_write(port_info, CONFIG_SH_ETHER_SH7734_MII, RMII_MII); -#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || \ - defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794) +#elif defined(CONFIG_RCAR_GEN2) sh_eth_write(port_info, sh_eth_read(port_info, RMIIMR) | 0x1, RMIIMR); #endif /* Configure phy */ @@ -447,9 +446,7 @@ static int sh_eth_config(struct sh_eth_dev *eth) sh_eth_write(port_info, GECMR_100B, GECMR); #elif defined(CONFIG_CPU_SH7757) || defined(CONFIG_CPU_SH7752) sh_eth_write(port_info, 1, RTRATE); -#elif defined(CONFIG_CPU_SH7724) || defined(CONFIG_R8A7790) || \ - defined(CONFIG_R8A7791) || defined(CONFIG_R8A7793) || \ - defined(CONFIG_R8A7794) +#elif defined(CONFIG_CPU_SH7724) || defined(CONFIG_RCAR_GEN2) val = ECMR_RTM; #endif } else if (phy->speed == 10) { diff --git a/drivers/net/sh_eth.h b/drivers/net/sh_eth.h index a0dcfcae09..ea4aa105bc 100644 --- a/drivers/net/sh_eth.h +++ b/drivers/net/sh_eth.h @@ -302,8 +302,7 @@ static const u16 sh_eth_offset_fast_sh4[SH_ETH_MAX_REGISTER_OFFSET] = { #elif defined(CONFIG_R8A7740) #define SH_ETH_TYPE_GETHER #define BASE_IO_ADDR 0xE9A00000 -#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || \ - defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794) +#elif defined(CONFIG_RCAR_GEN2) #define SH_ETH_TYPE_ETHER #define BASE_IO_ADDR 0xEE700200 #elif defined(CONFIG_R7S72100) @@ -514,8 +513,7 @@ enum FELIC_MODE_BIT { ECMR_PRM = 0x00000001, #ifdef CONFIG_CPU_SH7724 ECMR_RTM = 0x00000010, -#elif defined(CONFIG_R8A7790) || defined(CONFIG_R8A7791) || \ - defined(CONFIG_R8A7793) || defined(CONFIG_R8A7794) +#elif defined(CONFIG_RCAR_GEN2) ECMR_RTM = 0x00000004, #endif |