提交 1dc32918 编写于 作者: J Joe Perches 提交者: Jeff Garzik

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: NAuke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 64798845
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -55,13 +55,13 @@ ...@@ -55,13 +55,13 @@
#define DEBUGOUT7 DEBUGOUT3 #define DEBUGOUT7 DEBUGOUT3
#define E1000_WRITE_REG(a, reg, value) ( \ #define er32(reg)\
writel((value), ((a)->hw_addr + \ (readl(hw->hw_addr + ((hw->mac_type >= e1000_82543) \
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg)))) ? E1000_##reg : E1000_82542_##reg)))
#define E1000_READ_REG(a, reg) ( \ #define ew32(reg, value) \
readl((a)->hw_addr + \ (writel((value), (hw->hw_addr + ((hw->mac_type >= e1000_82543) \
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg))) ? E1000_##reg : E1000_82542_##reg))))
#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \ #define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \
writel((value), ((a)->hw_addr + \ writel((value), ((a)->hw_addr + \
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \ (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
(offset))) (offset)))
#define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS) #define E1000_WRITE_FLUSH() er32(STATUS)
#define E1000_WRITE_ICH_FLASH_REG(a, reg, value) ( \ #define E1000_WRITE_ICH_FLASH_REG(a, reg, value) ( \
writel((value), ((a)->flash_address + reg))) writel((value), ((a)->flash_address + reg)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册