Lines Matching refs:reg

24 static int set_config_address(unsigned int busno, unsigned int devfn, int reg)  in set_config_address()  argument
26 if ((devfn > 255) || (reg > 255)) in set_config_address()
35 (reg & 0xfc); in set_config_address()
40 static int pcimt_read(struct pci_bus *bus, unsigned int devfn, int reg, in pcimt_read() argument
45 if ((res = set_config_address(bus->number, devfn, reg))) in pcimt_read()
50 *val = inb(PCIMT_CONFIG_DATA + (reg & 3)); in pcimt_read()
53 *val = inw(PCIMT_CONFIG_DATA + (reg & 2)); in pcimt_read()
63 static int pcimt_write(struct pci_bus *bus, unsigned int devfn, int reg, in pcimt_write() argument
68 if ((res = set_config_address(bus->number, devfn, reg))) in pcimt_write()
73 outb(val, PCIMT_CONFIG_DATA + (reg & 3)); in pcimt_write()
76 outw(val, PCIMT_CONFIG_DATA + (reg & 2)); in pcimt_write()
91 static int pcit_set_config_address(unsigned int busno, unsigned int devfn, int reg) in pcit_set_config_address() argument
93 if ((devfn > 255) || (reg > 255) || (busno > 255)) in pcit_set_config_address()
96 outl((1 << 31) | ((busno & 0xff) << 16) | ((devfn & 0xff) << 8) | (reg & 0xfc), 0xcf8); in pcit_set_config_address()
100 static int pcit_read(struct pci_bus *bus, unsigned int devfn, int reg, in pcit_read() argument
120 if ((res = pcit_set_config_address(bus->number, devfn, reg))) in pcit_read()
125 *val = inb(PCIMT_CONFIG_DATA + (reg & 3)); in pcit_read()
128 *val = inw(PCIMT_CONFIG_DATA + (reg & 2)); in pcit_read()
137 static int pcit_write(struct pci_bus *bus, unsigned int devfn, int reg, in pcit_write() argument
142 if ((res = pcit_set_config_address(bus->number, devfn, reg))) in pcit_write()
147 outb(val, PCIMT_CONFIG_DATA + (reg & 3)); in pcit_write()
150 outw(val, PCIMT_CONFIG_DATA + (reg & 2)); in pcit_write()