Commit 24de5285 authored by Denis Kirjanov's avatar Denis Kirjanov Committed by David S. Miller

sundance: Wrap up acceess to ASICCtrl high word with a macro

Wrap up acceess to ASICCtrl high word with a macro
Signed-off-by: default avatarDenis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 12b16dad
...@@ -294,6 +294,9 @@ enum alta_offsets { ...@@ -294,6 +294,9 @@ enum alta_offsets {
/* Aliased and bogus values! */ /* Aliased and bogus values! */
RxStatus = 0x0c, RxStatus = 0x0c,
}; };
#define ASIC_HI_WORD(x) ((x) + 2)
enum ASICCtrl_HiWord_bit { enum ASICCtrl_HiWord_bit {
GlobalReset = 0x0001, GlobalReset = 0x0001,
RxReset = 0x0002, RxReset = 0x0002,
...@@ -1772,10 +1775,10 @@ static int netdev_close(struct net_device *dev) ...@@ -1772,10 +1775,10 @@ static int netdev_close(struct net_device *dev)
} }
iowrite16(GlobalReset | DMAReset | FIFOReset | NetworkReset, iowrite16(GlobalReset | DMAReset | FIFOReset | NetworkReset,
ioaddr +ASICCtrl + 2); ioaddr + ASIC_HI_WORD(ASICCtrl));
for (i = 2000; i > 0; i--) { for (i = 2000; i > 0; i--) {
if ((ioread16(ioaddr + ASICCtrl +2) & ResetBusy) == 0) if ((ioread16(ioaddr + ASIC_HI_WORD(ASICCtrl)) & ResetBusy) == 0)
break; break;
mdelay(1); mdelay(1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment