Lines Matching refs:bus

98 static int config_access(unsigned char access_type, struct pci_bus *bus,  in config_access()  argument
101 struct alchemy_pci_context *ctx = bus->sysdata; in config_access()
128 if (bus->number == 0) in config_access()
131 cfg_base = 0x80000000 | (bus->number << 16) | (device << 11); in config_access()
160 access_type, bus->number, device, where, *data, offset); in config_access()
168 access_type, bus->number, device); in config_access()
187 static int read_config_byte(struct pci_bus *bus, unsigned int devfn, in read_config_byte() argument
191 int ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte()
201 static int read_config_word(struct pci_bus *bus, unsigned int devfn, in read_config_word() argument
205 int ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word()
213 static int read_config_dword(struct pci_bus *bus, unsigned int devfn, in read_config_dword() argument
216 return config_access(PCI_ACCESS_READ, bus, devfn, where, val); in read_config_dword()
219 static int write_config_byte(struct pci_bus *bus, unsigned int devfn, in write_config_byte() argument
224 if (config_access(PCI_ACCESS_READ, bus, devfn, where, &data)) in write_config_byte()
230 if (config_access(PCI_ACCESS_WRITE, bus, devfn, where, &data)) in write_config_byte()
236 static int write_config_word(struct pci_bus *bus, unsigned int devfn, in write_config_word() argument
241 if (config_access(PCI_ACCESS_READ, bus, devfn, where, &data)) in write_config_word()
247 if (config_access(PCI_ACCESS_WRITE, bus, devfn, where, &data)) in write_config_word()
253 static int write_config_dword(struct pci_bus *bus, unsigned int devfn, in write_config_dword() argument
256 return config_access(PCI_ACCESS_WRITE, bus, devfn, where, &val); in write_config_dword()
259 static int alchemy_pci_read(struct pci_bus *bus, unsigned int devfn, in alchemy_pci_read() argument
265 int rc = read_config_byte(bus, devfn, where, &_val); in alchemy_pci_read()
272 int rc = read_config_word(bus, devfn, where, &_val); in alchemy_pci_read()
278 return read_config_dword(bus, devfn, where, val); in alchemy_pci_read()
282 static int alchemy_pci_write(struct pci_bus *bus, unsigned int devfn, in alchemy_pci_write() argument
287 return write_config_byte(bus, devfn, where, (u8) val); in alchemy_pci_write()
289 return write_config_word(bus, devfn, where, (u16) val); in alchemy_pci_write()
291 return write_config_dword(bus, devfn, where, val); in alchemy_pci_write()