aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.c
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@kernel.org>2010-12-20 21:01:36 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-21 16:25:08 -0500
commit24de5285dce378e4170e068f2662236d2b46c033 (patch)
tree4df29407b95ad489977a4a76749f12097c83c1a0 /drivers/net/sundance.c
parent12b16dadbc2406144d408754f96d0f44aa016239 (diff)
sundance: Wrap up acceess to ASICCtrl high word with a macro
Wrap up acceess to ASICCtrl high word with a macro Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r--drivers/net/sundance.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 3ed2a67bd6d3..8916f29301d6 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -294,6 +294,9 @@ enum alta_offsets {
294 /* Aliased and bogus values! */ 294 /* Aliased and bogus values! */
295 RxStatus = 0x0c, 295 RxStatus = 0x0c,
296}; 296};
297
298#define ASIC_HI_WORD(x) ((x) + 2)
299
297enum ASICCtrl_HiWord_bit { 300enum ASICCtrl_HiWord_bit {
298 GlobalReset = 0x0001, 301 GlobalReset = 0x0001,
299 RxReset = 0x0002, 302 RxReset = 0x0002,
@@ -1772,10 +1775,10 @@ static int netdev_close(struct net_device *dev)
1772 } 1775 }
1773 1776
1774 iowrite16(GlobalReset | DMAReset | FIFOReset | NetworkReset, 1777 iowrite16(GlobalReset | DMAReset | FIFOReset | NetworkReset,
1775 ioaddr +ASICCtrl + 2); 1778 ioaddr + ASIC_HI_WORD(ASICCtrl));
1776 1779
1777 for (i = 2000; i > 0; i--) { 1780 for (i = 2000; i > 0; i--) {
1778 if ((ioread16(ioaddr + ASICCtrl +2) & ResetBusy) == 0) 1781 if ((ioread16(ioaddr + ASIC_HI_WORD(ASICCtrl)) & ResetBusy) == 0)
1779 break; 1782 break;
1780 mdelay(1); 1783 mdelay(1);
1781 } 1784 }