提交 50d5d2bd 编写于 作者: D David S. Miller

Merge branch 'sh_eth-next'

Sergei Shtylyov says:

====================
sh_eth: couple of software reset bit cleanups

   Here's a set of 2 patches against DaveM's 'net-next.git' repo. We clean up
the use of the software reset bits...
====================
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
...@@ -482,7 +482,7 @@ static void sh_eth_chip_reset(struct net_device *ndev) ...@@ -482,7 +482,7 @@ static void sh_eth_chip_reset(struct net_device *ndev)
struct sh_eth_private *mdp = netdev_priv(ndev); struct sh_eth_private *mdp = netdev_priv(ndev);
/* reset device */ /* reset device */
sh_eth_tsu_write(mdp, ARSTR_ARSTR, ARSTR); sh_eth_tsu_write(mdp, ARSTR_ARST, ARSTR);
mdelay(1); mdelay(1);
} }
...@@ -540,7 +540,7 @@ static void sh_eth_chip_reset_r8a7740(struct net_device *ndev) ...@@ -540,7 +540,7 @@ static void sh_eth_chip_reset_r8a7740(struct net_device *ndev)
struct sh_eth_private *mdp = netdev_priv(ndev); struct sh_eth_private *mdp = netdev_priv(ndev);
/* reset device */ /* reset device */
sh_eth_tsu_write(mdp, ARSTR_ARSTR, ARSTR); sh_eth_tsu_write(mdp, ARSTR_ARST, ARSTR);
mdelay(1); mdelay(1);
sh_eth_select_mii(ndev); sh_eth_select_mii(ndev);
...@@ -735,7 +735,7 @@ static void sh_eth_chip_reset_giga(struct net_device *ndev) ...@@ -735,7 +735,7 @@ static void sh_eth_chip_reset_giga(struct net_device *ndev)
} }
/* reset device */ /* reset device */
iowrite32(ARSTR_ARSTR, (void *)(SH_GIGA_ETH_BASE + 0x1800)); iowrite32(ARSTR_ARST, (void *)(SH_GIGA_ETH_BASE + 0x1800));
mdelay(1); mdelay(1);
/* restore MAHR and MALR */ /* restore MAHR and MALR */
...@@ -899,7 +899,7 @@ static int sh_eth_check_reset(struct net_device *ndev) ...@@ -899,7 +899,7 @@ static int sh_eth_check_reset(struct net_device *ndev)
int cnt = 100; int cnt = 100;
while (cnt > 0) { while (cnt > 0) {
if (!(sh_eth_read(ndev, EDMR) & 0x3)) if (!(sh_eth_read(ndev, EDMR) & EDMR_SRST_GETHER))
break; break;
mdelay(1); mdelay(1);
cnt--; cnt--;
......
...@@ -394,7 +394,7 @@ enum RPADIR_BIT { ...@@ -394,7 +394,7 @@ enum RPADIR_BIT {
#define DEFAULT_FDR_INIT 0x00000707 #define DEFAULT_FDR_INIT 0x00000707
/* ARSTR */ /* ARSTR */
enum ARSTR_BIT { ARSTR_ARSTR = 0x00000001, }; enum ARSTR_BIT { ARSTR_ARST = 0x00000001, };
/* TSU_FWEN0 */ /* TSU_FWEN0 */
enum TSU_FWEN0_BIT { enum TSU_FWEN0_BIT {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册