aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_osdep.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2008-07-11 18:17:08 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-07-22 19:38:47 -0400
commit1dc329180fe22ff8651e0ef550ba17ca1cc7bf22 (patch)
tree720ae356d0b4997baa2a0389e896fc6d2930a2bf /drivers/net/e1000/e1000_osdep.h
parent6479884509e6cd30c6708fbf05fafc0d1fc85f7a (diff)
e1000: Use hw, er32, and ew32
Use struct e1000_hw *hw = adapter->hw; where necessary Change macros E1000_READ_REG and E1000_WRITE_REG to er32 and ew32 Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/e1000/e1000_osdep.h')
-rw-r--r--drivers/net/e1000/e1000_osdep.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h
index 365626d3177e..acb5134ab22e 100644
--- a/drivers/net/e1000/e1000_osdep.h
+++ b/drivers/net/e1000/e1000_osdep.h
@@ -55,13 +55,13 @@
55#define DEBUGOUT7 DEBUGOUT3 55#define DEBUGOUT7 DEBUGOUT3
56 56
57 57
58#define E1000_WRITE_REG(a, reg, value) ( \ 58#define er32(reg)\
59 writel((value), ((a)->hw_addr + \ 59 (readl(hw->hw_addr + ((hw->mac_type >= e1000_82543) \
60 (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg)))) 60 ? E1000_##reg : E1000_82542_##reg)))
61 61
62#define E1000_READ_REG(a, reg) ( \ 62#define ew32(reg, value) \
63 readl((a)->hw_addr + \ 63 (writel((value), (hw->hw_addr + ((hw->mac_type >= e1000_82543) \
64 (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg))) 64 ? E1000_##reg : E1000_82542_##reg))))
65 65
66#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \ 66#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \
67 writel((value), ((a)->hw_addr + \ 67 writel((value), ((a)->hw_addr + \
@@ -96,7 +96,7 @@
96 (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \ 96 (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
97 (offset))) 97 (offset)))
98 98
99#define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS) 99#define E1000_WRITE_FLUSH() er32(STATUS)
100 100
101#define E1000_WRITE_ICH_FLASH_REG(a, reg, value) ( \ 101#define E1000_WRITE_ICH_FLASH_REG(a, reg, value) ( \
102 writel((value), ((a)->flash_address + reg))) 102 writel((value), ((a)->flash_address + reg)))