Lines Matching defs:hw
83 #define E1000_WRITE_FLUSH(hw) E1000_READ_REG(hw, STATUS)
86 #define E1000_READ_OFFSET(hw, offset) \
87 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
88 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
92 #define E1000_WRITE_OFFSET(hw, offset, value) \
93 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
94 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
98 #define E1000_REG_TR(hw, reg) \
99 ((hw)->mac_type >= em_82543 ? \
104 #define E1000_READ_REG(hw, reg) \
105 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
106 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
107 E1000_REG_TR(hw, E1000_##reg))
109 #define E1000_WRITE_REG(hw, reg, value) \
110 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
111 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
112 E1000_REG_TR(hw, E1000_##reg), \
115 #define EM_READ_REG(hw, reg) \
116 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
117 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
120 #define EM_WRITE_REG(hw, reg, value) \
121 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
122 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
125 #define EM_READ_REG_ARRAY(hw, reg, index) \
126 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
127 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
130 #define EM_WRITE_REG_ARRAY(hw, reg, index, value) \
131 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
132 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
135 #define E1000_READ_REG_ARRAY(hw, reg, index) \
136 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
137 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
138 E1000_REG_TR(hw, E1000_##reg) + ((index) << 2))
140 #define E1000_WRITE_REG_ARRAY(hw, reg, index, value) \
141 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
142 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
143 E1000_REG_TR(hw, E1000_##reg) + ((index) << 2), \
149 #define E1000_WRITE_REG_ARRAY_BYTE(hw, reg, index, value) \
150 bus_space_write_1(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
151 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
152 E1000_REG_TR(hw, E1000_##reg) + index, \
155 #define E1000_WRITE_REG_ARRAY_WORD(hw, reg, index, value) \
156 bus_space_write_2(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
157 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
158 E1000_REG_TR(hw, E1000_##reg) + (index << 1), \
161 #define E1000_READ_ICH_FLASH_REG(hw, reg) \
162 bus_space_read_4(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
163 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
164 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg)
166 #define E1000_READ_ICH_FLASH_REG16(hw, reg) \
167 bus_space_read_2(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
168 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
169 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg)
171 #define E1000_READ_ICH_FLASH_REG32(hw, reg) \
172 bus_space_read_4(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
173 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
174 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg)
177 #define E1000_WRITE_ICH_FLASH_REG8(hw, reg, value) \
178 bus_space_write_1(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
179 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
180 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg, \
183 #define E1000_WRITE_ICH_FLASH_REG16(hw, reg, value) \
184 bus_space_write_2(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
185 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
186 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg, \
189 #define E1000_WRITE_ICH_FLASH_REG32(hw, reg, value) \
190 bus_space_write_4(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
191 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
192 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg, \
195 #define em_io_read(hw, port) \
196 bus_space_read_4(((struct em_osdep *)(hw)->back)->io_bus_space_tag, \
197 ((struct em_osdep *)(hw)->back)->io_bus_space_handle, (port))
199 #define em_io_write(hw, port, value) \
200 bus_space_write_4(((struct em_osdep *)(hw)->back)->io_bus_space_tag, \
201 ((struct em_osdep *)(hw)->back)->io_bus_space_handle, \