Lines Matching refs:hw

84 #define E1000_WRITE_FLUSH(hw)	E1000_READ_REG(hw, STATUS)
87 #define E1000_READ_OFFSET(hw, offset) \
88 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
89 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
93 #define E1000_WRITE_OFFSET(hw, offset, value) \
94 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
95 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
99 #define E1000_REG_TR(hw, reg) \
100 ((hw)->mac_type >= em_82543 ? \
105 #define E1000_READ_REG(hw, reg) \
106 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
107 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
108 E1000_REG_TR(hw, E1000_##reg))
110 #define E1000_WRITE_REG(hw, reg, value) \
111 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
112 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
113 E1000_REG_TR(hw, E1000_##reg), \
116 #define EM_READ_REG(hw, reg) \
117 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
118 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
121 #define EM_WRITE_REG(hw, reg, value) \
122 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
123 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
126 #define EM_READ_REG_ARRAY(hw, reg, index) \
127 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
128 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
131 #define EM_WRITE_REG_ARRAY(hw, reg, index, value) \
132 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
133 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
136 #define E1000_READ_REG_ARRAY(hw, reg, index) \
137 bus_space_read_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
138 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
139 E1000_REG_TR(hw, E1000_##reg) + ((index) << 2))
141 #define E1000_WRITE_REG_ARRAY(hw, reg, index, value) \
142 bus_space_write_4(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
143 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
144 E1000_REG_TR(hw, E1000_##reg) + ((index) << 2), \
150 #define E1000_WRITE_REG_ARRAY_BYTE(hw, reg, index, value) \
151 bus_space_write_1(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
152 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
153 E1000_REG_TR(hw, E1000_##reg) + index, \
156 #define E1000_WRITE_REG_ARRAY_WORD(hw, reg, index, value) \
157 bus_space_write_2(((struct em_osdep *)(hw)->back)->mem_bus_space_tag, \
158 ((struct em_osdep *)(hw)->back)->mem_bus_space_handle, \
159 E1000_REG_TR(hw, E1000_##reg) + (index << 1), \
162 #define E1000_READ_ICH_FLASH_REG(hw, reg) \
163 bus_space_read_4(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
164 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
165 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg)
167 #define E1000_READ_ICH_FLASH_REG16(hw, reg) \
168 bus_space_read_2(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
169 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
170 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg)
172 #define E1000_READ_ICH_FLASH_REG32(hw, reg) \
173 bus_space_read_4(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
174 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
175 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg)
178 #define E1000_WRITE_ICH_FLASH_REG8(hw, reg, value) \
179 bus_space_write_1(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
180 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
181 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg, \
184 #define E1000_WRITE_ICH_FLASH_REG16(hw, reg, value) \
185 bus_space_write_2(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
186 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
187 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg, \
190 #define E1000_WRITE_ICH_FLASH_REG32(hw, reg, value) \
191 bus_space_write_4(((struct em_osdep *)(hw)->back)->flash_bus_space_tag, \
192 ((struct em_osdep *)(hw)->back)->flash_bus_space_handle, \
193 ((struct em_osdep *)(hw)->back)->em_flashoffset + reg, \
196 #define em_io_read(hw, port) \
197 bus_space_read_4(((struct em_osdep *)(hw)->back)->io_bus_space_tag, \
198 ((struct em_osdep *)(hw)->back)->io_bus_space_handle, (port))
200 #define em_io_write(hw, port, value) \
201 bus_space_write_4(((struct em_osdep *)(hw)->back)->io_bus_space_tag, \
202 ((struct em_osdep *)(hw)->back)->io_bus_space_handle, \