Lines Matching refs:offset

166 #define ether_inb(device, offset)  			(*((volatile uint8*)(device->reg_base + (offset)))); __eieio()
167 #define ether_inw(device, offset) (*((volatile uint16*)(device->reg_base + (offset)))); __eieio()
168 #define ether_outb(device, offset, value) (*((volatile uint8 *)(device->reg_base + (offset))) = (value)); __eieio()
169 #define ether_outw(device, offset, value) (*((volatile uint16*)(device->reg_base + (offset))) = (value)); __eieio()
173 #define ether_outb(device, offset, value) (*gPCIModInfo->write_io_8)((device->reg_base + (offset)), (value))
174 #define ether_outw(device, offset, value) (*gPCIModInfo->write_io_16)((device->reg_base + (offset)), (value))
175 #define ether_inb(device, offset) ((*gPCIModInfo->read_io_8)(device->reg_base + (offset)))
176 #define ether_inw(device, offset) ((*gPCIModInfo->read_io_16)(device->reg_base + (offset)))
183 uint8 ether_inb(etherpci_private_t *device, uint32 offset) {
185 result = ((*gPCIModInfo->read_io_8)(device->reg_base + (offset)));
186 ETHER_DEBUG(PCI_IO, device->debug, " inb(%x) %x \n", offset, result);
189 uint16 ether_inw(etherpci_private_t *device, uint32 offset) {
191 result = ((*gPCIModInfo->read_io_16)(device->reg_base + (offset)));
192 ETHER_DEBUG(PCI_IO, device->debug, " inw(%x) %x \n", offset, result);
195 void ether_outb(etherpci_private_t *device, uint32 offset, uint8 value) {
196 (*gPCIModInfo->write_io_8)((device->reg_base + (offset)), (value));
197 ETHER_DEBUG(PCI_IO, device->debug, " outb(%x) %x \n", offset, value);
199 void ether_outw(etherpci_private_t *device, uint32 offset, uint16 value) {
200 (*gPCIModInfo->write_io_16)((device->reg_base + (offset)), (value));
201 ETHER_DEBUG(PCI_IO, device->debug, " outb(%x) %x \n", offset, value);
207 uint8 ether_inb(etherpci_private_t *device, uint32 offset) {
209 result = (*((volatile uint8*) (device->reg_base + (offset)))); __eieio();
210 ETHER_DEBUG(PCI_IO, device->debug, " inb(%x) %x \n", offset, result);
214 uint16 ether_inw(etherpci_private_t *device, uint32 offset) {
216 result = (*((volatile uint16*) (device->reg_base + (offset)))); __eieio();
217 ETHER_DEBUG(PCI_IO, device->debug, " inw(%x) %x \n", offset, result);
221 void ether_outb(etherpci_private_t *device, uint32 offset, uint8 value) {
222 (*((volatile uint8 *)(device->reg_base + (offset))) = (value)); __eieio();
223 ETHER_DEBUG(PCI_IO, device->debug, " outb(%x) %x \n", offset, value);
225 void ether_outw(etherpci_private_t *device, uint32 offset, uint16 value) {
226 (*((volatile uint16 *)(device->reg_base + (offset))) = (value)); __eieio();
227 ETHER_DEBUG(PCI_IO, device->debug, " outb(%x) %x \n", offset, value);
663 unsigned offset;
676 offset = data->boundary << EC_PAGE_SHIFT;
677 etherpci_mout(data, offset, (unsigned char *)&ring, sizeof(ring));
840 int offset, int len)
845 roffset = offset - data->EC_RINGSTART;
848 etherpci_min(data, &ether_buf[0], offset, rem);
851 etherpci_min(data, &ether_buf[0], offset, len);
1027 unsigned offset;
1030 offset = data->boundary << EC_PAGE_SHIFT;
1031 etherpci_min(data, (unsigned char *)&ring, offset, sizeof(ring));
1066 unsigned offset;
1090 offset = data->boundary << EC_PAGE_SHIFT;
1091 etherpci_min(data, (unsigned char *)&ring, offset, sizeof(ring));
1130 ringcopy(data, ether_buf, offset + 4, rlen);
1187 uint32 base, size, offset;
1195 offset = data->pciInfo->u.h0.base_registers[0] - base;
1196 size += offset;
1199 dprintf(kDevName ": PCI base=%x size=%x offset=%x\n", base, size, offset);
1207 data->reg_base = data->reg_base + offset;