diff options
Diffstat (limited to 'drivers/net/ethernet/renesas/sh_eth.c')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index af0b867a6cf6..bad8f2eec9b4 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
@@ -78,7 +78,7 @@ static void sh_eth_select_mii(struct net_device *ndev) | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | /* There is CPU dependent code */ | 80 | /* There is CPU dependent code */ |
81 | #if defined(CONFIG_CPU_SUBTYPE_SH7724) | 81 | #if defined(CONFIG_CPU_SUBTYPE_SH7724) || defined(CONFIG_ARCH_R8A7779) |
82 | #define SH_ETH_RESET_DEFAULT 1 | 82 | #define SH_ETH_RESET_DEFAULT 1 |
83 | static void sh_eth_set_duplex(struct net_device *ndev) | 83 | static void sh_eth_set_duplex(struct net_device *ndev) |
84 | { | 84 | { |
@@ -93,13 +93,18 @@ static void sh_eth_set_duplex(struct net_device *ndev) | |||
93 | static void sh_eth_set_rate(struct net_device *ndev) | 93 | static void sh_eth_set_rate(struct net_device *ndev) |
94 | { | 94 | { |
95 | struct sh_eth_private *mdp = netdev_priv(ndev); | 95 | struct sh_eth_private *mdp = netdev_priv(ndev); |
96 | unsigned int bits = ECMR_RTM; | ||
97 | |||
98 | #if defined(CONFIG_ARCH_R8A7779) | ||
99 | bits |= ECMR_ELB; | ||
100 | #endif | ||
96 | 101 | ||
97 | switch (mdp->speed) { | 102 | switch (mdp->speed) { |
98 | case 10: /* 10BASE */ | 103 | case 10: /* 10BASE */ |
99 | sh_eth_write(ndev, sh_eth_read(ndev, ECMR) & ~ECMR_RTM, ECMR); | 104 | sh_eth_write(ndev, sh_eth_read(ndev, ECMR) & ~bits, ECMR); |
100 | break; | 105 | break; |
101 | case 100:/* 100BASE */ | 106 | case 100:/* 100BASE */ |
102 | sh_eth_write(ndev, sh_eth_read(ndev, ECMR) | ECMR_RTM, ECMR); | 107 | sh_eth_write(ndev, sh_eth_read(ndev, ECMR) | bits, ECMR); |
103 | break; | 108 | break; |
104 | default: | 109 | default: |
105 | break; | 110 | break; |