/linux-4.4.14/arch/mips/pci/ |
D | ops-rc32434.c | 47 struct pci_bus *bus, unsigned int devfn, in config_access() argument 50 unsigned int slot = PCI_SLOT(devfn); in config_access() 51 u8 func = PCI_FUNC(devfn); in config_access() 72 static int read_config_byte(struct pci_bus *bus, unsigned int devfn, in read_config_byte() argument 78 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte() 83 static int read_config_word(struct pci_bus *bus, unsigned int devfn, in read_config_word() argument 89 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word() 94 static int read_config_dword(struct pci_bus *bus, unsigned int devfn, in read_config_dword() argument 104 if (bus->number == 0 && PCI_SLOT(devfn) > 21) in read_config_dword() 108 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, val); in read_config_dword() [all …]
|
D | ops-sni.c | 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() 29 if (busno == 0 && devfn >= PCI_DEVFN(8, 0)) in set_config_address() 34 ((devfn & 0xff) << 8) | 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() 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() 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() [all …]
|
D | ops-emma2rh.c | 39 static int check_args(struct pci_bus *bus, u32 devfn, u32 * bus_num) in check_args() argument 49 if (PCI_SLOT(devfn) >= 10) in check_args() 53 if ((*bus_num >= 64) || (PCI_SLOT(devfn) >= 16)) in check_args() 60 unsigned int devfn, int where) in set_pci_configuration_address() argument 69 config_win0 = (1 << (22 + PCI_SLOT(devfn))) | (5 << 9); in set_pci_configuration_address() 74 config_win0 = (bus_num << 26) | (PCI_SLOT(devfn) << 22) | in set_pci_configuration_address() 82 static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_read() argument 92 if (check_args(bus, devfn, &bus_num) == PCIBIOS_DEVICE_NOT_FOUND) in pci_config_read() 97 if (set_pci_configuration_address(bus_num, devfn, where) < 0) in pci_config_read() 101 *(volatile u32 *)(base + (PCI_FUNC(devfn) << 8) + in pci_config_read() [all …]
|
D | ops-loongson2.c | 37 unsigned int devfn, int where, in loongson_pcibios_config_access() argument 44 int device = PCI_SLOT(devfn); in loongson_pcibios_config_access() 45 int function = PCI_FUNC(devfn); in loongson_pcibios_config_access() 121 static int loongson_pcibios_read(struct pci_bus *bus, unsigned int devfn, in loongson_pcibios_read() argument 131 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in loongson_pcibios_read() 145 static int loongson_pcibios_write(struct pci_bus *bus, unsigned int devfn, in loongson_pcibios_write() argument 158 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in loongson_pcibios_write() 170 if (loongson_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, in loongson_pcibios_write() 190 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); in _rdmsr() local 194 loongson_pcibios_write(&bus, devfn, PCI_MSR_ADDR, 4, msr); in _rdmsr() [all …]
|
D | ops-pmcmsp.c | 362 unsigned int devfn, in msp_pcibios_config_access() argument 368 unsigned char dev_fn = (unsigned char)devfn; in msp_pcibios_config_access() 491 unsigned int devfn, in msp_pcibios_read_config_byte() argument 502 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msp_pcibios_read_config_byte() 539 unsigned int devfn, in msp_pcibios_read_config_word() argument 561 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msp_pcibios_read_config_word() 596 unsigned int devfn, in msp_pcibios_read_config_dword() argument 613 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msp_pcibios_read_config_dword() 649 unsigned int devfn, in msp_pcibios_write_config_byte() argument 656 if (msp_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msp_pcibios_write_config_byte() [all …]
|
D | ops-bcm63xx.c | 65 unsigned int devfn, int where) in bcm63xx_setup_cfg_access() argument 70 slot = PCI_SLOT(devfn); in bcm63xx_setup_cfg_access() 71 func = PCI_FUNC(devfn); in bcm63xx_setup_cfg_access() 101 unsigned int devfn, int where, int size, in bcm63xx_do_cfg_read() argument 109 if (bcm63xx_setup_cfg_access(type, busn, devfn, where)) in bcm63xx_do_cfg_read() 122 unsigned int devfn, int where, int size, in bcm63xx_do_cfg_write() argument 130 if (bcm63xx_setup_cfg_access(type, busn, devfn, where)) in bcm63xx_do_cfg_write() 147 static int bcm63xx_pci_read(struct pci_bus *bus, unsigned int devfn, in bcm63xx_pci_read() argument 154 if (type == 0 && PCI_SLOT(devfn) == CARDBUS_PCI_IDSEL) in bcm63xx_pci_read() 157 return bcm63xx_do_cfg_read(type, bus->number, devfn, in bcm63xx_pci_read() [all …]
|
D | pci-bcm1480ht.c | 51 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) argument 52 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) argument 88 static int bcm1480ht_can_access(struct pci_bus *bus, int devfn) in bcm1480ht_can_access() argument 96 devno = PCI_SLOT(devfn); in bcm1480ht_can_access() 109 static int bcm1480ht_pcibios_read(struct pci_bus *bus, unsigned int devfn, in bcm1480ht_pcibios_read() argument 119 if (bcm1480ht_can_access(bus, devfn)) in bcm1480ht_pcibios_read() 120 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480ht_pcibios_read() 134 static int bcm1480ht_pcibios_write(struct pci_bus *bus, unsigned int devfn, in bcm1480ht_pcibios_write() argument 137 u32 cfgaddr = CFGADDR(bus, devfn, where); in bcm1480ht_pcibios_write() 145 if (!bcm1480ht_can_access(bus, devfn)) in bcm1480ht_pcibios_write()
|
D | pci-xlp.c | 60 #define pci_cfg_addr(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) argument 63 static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, in pci_cfg_read_32bit() argument 74 if (PCI_SLOT(devfn) != 0 || in pci_cfg_read_32bit() 75 !nlm_node_present(PCI_FUNC(devfn))) in pci_cfg_read_32bit() 78 if (PCI_SLOT(devfn) == 0) /* b.0.0 hangs */ in pci_cfg_read_32bit() 80 if (devfn == 44) /* b.5.4 hangs */ in pci_cfg_read_32bit() 83 } else if (bus->number == 0 && PCI_SLOT(devfn) == 1 && where == 0x954) { in pci_cfg_read_32bit() 87 pci_cfg_addr(bus->number, devfn, where)); in pci_cfg_read_32bit() 92 static inline void pci_cfg_write_32bit(struct pci_bus *bus, unsigned int devfn, in pci_cfg_write_32bit() argument 98 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_write_32bit() [all …]
|
D | ops-nile4.c | 17 struct pci_bus *bus, unsigned int devfn, int where, u32 *val) in nile4_pcibios_config_access() argument 22 if ((busnum == 0) && (PCI_SLOT(devfn) > 8)) in nile4_pcibios_config_access() 28 if ((busnum == 0) && (devfn == PCI_DEVFN(0, 0))) { in nile4_pcibios_config_access() 51 ((1 << (PCI_SLOT(devfn) + 15)) | (PCI_FUNC(devfn) << 8) in nile4_pcibios_config_access() 54 adr = KSEG1ADDR(PCI_WINDOW1) | (busnum << 16) | (devfn << 8) | in nile4_pcibios_config_access() 74 static int nile4_pcibios_read(struct pci_bus *bus, unsigned int devfn, in nile4_pcibios_read() argument 85 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in nile4_pcibios_read() 100 static int nile4_pcibios_write(struct pci_bus *bus, unsigned int devfn, in nile4_pcibios_write() argument 111 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in nile4_pcibios_write() 126 (PCI_ACCESS_WRITE, bus, devfn, where, &data)) in nile4_pcibios_write()
|
D | ops-lantiq.c | 29 unsigned int devfn, unsigned int where, u32 *data) in ltq_pci_config_access() argument 37 if ((bus->number != 0) || ((devfn & 0xf8) > 0x78) in ltq_pci_config_access() 38 || ((devfn & 0xf8) == 0) || ((devfn & 0xf8) == 0x68)) in ltq_pci_config_access() 44 cfg_base |= (bus->number << LTQ_PCI_CFG_BUSNUM_SHF) | (devfn << in ltq_pci_config_access() 73 int ltq_pci_read_config_dword(struct pci_bus *bus, unsigned int devfn, in ltq_pci_read_config_dword() argument 78 if (ltq_pci_config_access(PCI_ACCESS_READ, bus, devfn, where, &data)) in ltq_pci_read_config_dword() 91 int ltq_pci_write_config_dword(struct pci_bus *bus, unsigned int devfn, in ltq_pci_write_config_dword() argument 100 devfn, where, &data)) in ltq_pci_write_config_dword() 111 if (ltq_pci_config_access(PCI_ACCESS_WRITE, bus, devfn, where, &data)) in ltq_pci_write_config_dword()
|
D | ops-gt64xxx_pci0.c | 43 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in gt64xxx_pci0_pcibios_config_access() argument 48 if ((busnum == 0) && (devfn >= PCI_DEVFN(31, 0))) in gt64xxx_pci0_pcibios_config_access() 58 (devfn << GT_PCI0_CFGADDR_FUNCTNUM_SHF) | in gt64xxx_pci0_pcibios_config_access() 63 if (busnum == 0 && PCI_SLOT(devfn) == 0) { in gt64xxx_pci0_pcibios_config_access() 72 if (busnum == 0 && PCI_SLOT(devfn) == 0) { in gt64xxx_pci0_pcibios_config_access() 103 static int gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn, in gt64xxx_pci0_pcibios_read() argument 108 if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in gt64xxx_pci0_pcibios_read() 122 static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, in gt64xxx_pci0_pcibios_write() argument 131 devfn, where, &data)) in gt64xxx_pci0_pcibios_write() 142 if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, in gt64xxx_pci0_pcibios_write()
|
D | ops-vr41xx.c | 36 unsigned int devfn, int where) in set_pci_configuration_address() argument 42 if (PCI_SLOT(devfn) < 11 || where > 0xff) in set_pci_configuration_address() 45 writel((1U << PCI_SLOT(devfn)) | (PCI_FUNC(devfn) << 8) | in set_pci_configuration_address() 54 writel(((uint32_t)number << 16) | ((devfn & 0xff) << 8) | in set_pci_configuration_address() 61 static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_read() argument 67 if (set_pci_configuration_address(bus->number, devfn, where) < 0) in pci_config_read() 89 static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_write() argument 95 if (set_pci_configuration_address(bus->number, devfn, where) < 0) in pci_config_write()
|
D | pci-sb1250.c | 53 #define CFGOFFSET(bus, devfn, where) (((bus)<<16) + ((devfn)<<8) + (where)) argument 54 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) argument 104 static int sb1250_pci_can_access(struct pci_bus *bus, int devfn) in sb1250_pci_can_access() argument 112 devno = PCI_SLOT(devfn); in sb1250_pci_can_access() 129 static int sb1250_pcibios_read(struct pci_bus *bus, unsigned int devfn, in sb1250_pcibios_read() argument 139 if (sb1250_pci_can_access(bus, devfn)) in sb1250_pcibios_read() 140 data = READCFG32(CFGADDR(bus, devfn, where)); in sb1250_pcibios_read() 154 static int sb1250_pcibios_write(struct pci_bus *bus, unsigned int devfn, in sb1250_pcibios_write() argument 157 u32 cfgaddr = CFGADDR(bus, devfn, where); in sb1250_pcibios_write() 165 if (!sb1250_pci_can_access(bus, devfn)) in sb1250_pcibios_write()
|
D | pci-bcm1480.c | 53 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) argument 54 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) argument 97 static int bcm1480_pci_can_access(struct pci_bus *bus, int devfn) in bcm1480_pci_can_access() argument 105 devno = PCI_SLOT(devfn); in bcm1480_pci_can_access() 120 static int bcm1480_pcibios_read(struct pci_bus *bus, unsigned int devfn, in bcm1480_pcibios_read() argument 130 if (bcm1480_pci_can_access(bus, devfn)) in bcm1480_pcibios_read() 131 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480_pcibios_read() 145 static int bcm1480_pcibios_write(struct pci_bus *bus, unsigned int devfn, in bcm1480_pcibios_write() argument 148 u32 cfgaddr = CFGADDR(bus, devfn, where); in bcm1480_pcibios_write() 156 if (!bcm1480_pci_can_access(bus, devfn)) in bcm1480_pcibios_write()
|
D | ops-bridge.c | 43 static int pci_conf0_read_config(struct pci_bus *bus, unsigned int devfn, in pci_conf0_read_config() argument 48 int slot = PCI_SLOT(devfn); in pci_conf0_read_config() 49 int fn = PCI_FUNC(devfn); in pci_conf0_read_config() 103 static int pci_conf1_read_config(struct pci_bus *bus, unsigned int devfn, in pci_conf1_read_config() argument 109 int slot = PCI_SLOT(devfn); in pci_conf1_read_config() 110 int fn = PCI_FUNC(devfn); in pci_conf1_read_config() 167 static int pci_read_config(struct pci_bus *bus, unsigned int devfn, in pci_read_config() argument 171 return pci_conf1_read_config(bus, devfn, where, size, value); in pci_read_config() 173 return pci_conf0_read_config(bus, devfn, where, size, value); in pci_read_config() 176 static int pci_conf0_write_config(struct pci_bus *bus, unsigned int devfn, in pci_conf0_write_config() argument [all …]
|
D | ops-mace.c | 30 static inline int mkaddr(struct pci_bus *bus, unsigned int devfn, in mkaddr() argument 34 ((devfn & 0xff) << 8) | in mkaddr() 40 mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, in mace_pci_read_config() argument 47 mace->pci.config_addr = mkaddr(bus, devfn, reg); in mace_pci_read_config() 67 (devfn == (1 << 3) || devfn == (2 << 3))) in mace_pci_read_config() 76 mace_pci_write_config(struct pci_bus *bus, unsigned int devfn, in mace_pci_write_config() argument 79 mace->pci.config_addr = mkaddr(bus, devfn, reg); in mace_pci_write_config()
|
D | ops-loongson3.c | 16 struct pci_bus *bus, unsigned int devfn, in loongson3_pci_config_access() argument 22 int device = PCI_SLOT(devfn); in loongson3_pci_config_access() 23 int function = PCI_FUNC(devfn); in loongson3_pci_config_access() 50 static int loongson3_pci_pcibios_read(struct pci_bus *bus, unsigned int devfn, in loongson3_pci_pcibios_read() argument 55 bus, devfn, where, &data); in loongson3_pci_pcibios_read() 70 static int loongson3_pci_pcibios_write(struct pci_bus *bus, unsigned int devfn, in loongson3_pci_pcibios_write() argument 80 bus, devfn, where, &data); in loongson3_pci_pcibios_write() 93 bus, devfn, where, &data); in loongson3_pci_pcibios_write()
|
D | ops-msc.c | 47 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in msc_pcibios_config_access() argument 58 (PCI_SLOT(devfn) << MSC01_PCI_CFGADDR_DNUM_SHF) | in msc_pcibios_config_access() 59 (PCI_FUNC(devfn) << MSC01_PCI_CFGADDR_FNUM_SHF) | in msc_pcibios_config_access() 88 static int msc_pcibios_read(struct pci_bus *bus, unsigned int devfn, in msc_pcibios_read() argument 98 if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in msc_pcibios_read() 112 static int msc_pcibios_write(struct pci_bus *bus, unsigned int devfn, in msc_pcibios_write() argument 125 if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in msc_pcibios_write() 137 if (msc_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, in msc_pcibios_write()
|
D | ops-bonito64.c | 38 unsigned int devfn, int where, in bonito64_pcibios_config_access() argument 45 int device = PCI_SLOT(devfn); in bonito64_pcibios_config_access() 46 int function = PCI_FUNC(devfn); in bonito64_pcibios_config_access() 101 static int bonito64_pcibios_read(struct pci_bus *bus, unsigned int devfn, in bonito64_pcibios_read() argument 111 if (bonito64_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in bonito64_pcibios_read() 125 static int bonito64_pcibios_write(struct pci_bus *bus, unsigned int devfn, in bonito64_pcibios_write() argument 138 if (bonito64_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in bonito64_pcibios_write() 150 if (bonito64_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, in bonito64_pcibios_write()
|
D | pci-ar2315.c | 198 static int ar2315_pci_cfg_access(struct ar2315_pci_ctrl *apc, unsigned devfn, in ar2315_pci_cfg_access() argument 201 int func = PCI_FUNC(devfn); in ar2315_pci_cfg_access() 202 int dev = PCI_SLOT(devfn); in ar2315_pci_cfg_access() 254 unsigned devfn, int where, u32 *val) in ar2315_pci_local_cfg_rd() argument 256 return ar2315_pci_cfg_access(apc, devfn, where, sizeof(u32), val, in ar2315_pci_local_cfg_rd() 261 unsigned devfn, int where, u32 val) in ar2315_pci_local_cfg_wr() argument 263 return ar2315_pci_cfg_access(apc, devfn, where, sizeof(u32), &val, in ar2315_pci_local_cfg_wr() 267 static int ar2315_pci_cfg_read(struct pci_bus *bus, unsigned devfn, int where, in ar2315_pci_cfg_read() argument 272 if (PCI_SLOT(devfn) == AR2315_PCI_HOST_SLOT) in ar2315_pci_cfg_read() 275 return ar2315_pci_cfg_access(apc, devfn, where, size, value, false); in ar2315_pci_cfg_read() [all …]
|
D | pci-xlr.c | 59 #define pci_cfg_addr(bus, devfn, off) (((bus) << 16) | ((devfn) << 8) | (off)) argument 62 static inline u32 pci_cfg_read_32bit(struct pci_bus *bus, unsigned int devfn, in pci_cfg_read_32bit() argument 69 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_read_32bit() 74 static inline void pci_cfg_write_32bit(struct pci_bus *bus, unsigned int devfn, in pci_cfg_write_32bit() argument 80 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_write_32bit() 84 static int nlm_pcibios_read(struct pci_bus *bus, unsigned int devfn, in nlm_pcibios_read() argument 94 data = pci_cfg_read_32bit(bus, devfn, where); in nlm_pcibios_read() 107 static int nlm_pcibios_write(struct pci_bus *bus, unsigned int devfn, in nlm_pcibios_write() argument 117 data = pci_cfg_read_32bit(bus, devfn, where); in nlm_pcibios_write() 128 pci_cfg_write_32bit(bus, devfn, where, data); in nlm_pcibios_write() [all …]
|
D | pci-alchemy.c | 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 [all …]
|
D | pci-virtio-guest.c | 44 unsigned int devfn, int reg) in pci_virtio_guest_write_config_addr() argument 49 pca.devfn_number = devfn; in pci_virtio_guest_write_config_addr() 57 unsigned int devfn, int reg, int size, u32 val) in pci_virtio_guest_write_config() argument 59 pci_virtio_guest_write_config_addr(bus, devfn, reg); in pci_virtio_guest_write_config() 76 static int pci_virtio_guest_read_config(struct pci_bus *bus, unsigned int devfn, in pci_virtio_guest_read_config() argument 79 pci_virtio_guest_write_config_addr(bus, devfn, reg); in pci_virtio_guest_read_config()
|
D | ops-tx3927.c | 48 static int mkaddr(struct pci_bus *bus, unsigned char devfn, unsigned char where) in mkaddr() argument 51 devfn >= PCI_DEVFN(TX3927_PCIC_MAX_DEVNU, 0)) in mkaddr() 55 ((devfn & 0xff) << 0x08) | in mkaddr() 76 static int tx3927_pci_read_config(struct pci_bus *bus, unsigned int devfn, in tx3927_pci_read_config() argument 79 if (mkaddr(bus, devfn, where)) { in tx3927_pci_read_config() 101 static int tx3927_pci_write_config(struct pci_bus *bus, unsigned int devfn, in tx3927_pci_write_config() argument 104 if (mkaddr(bus, devfn, where)) in tx3927_pci_write_config()
|
D | pci-ar71xx.c | 83 static inline u32 ar71xx_pci_bus_addr(struct pci_bus *bus, unsigned int devfn, in ar71xx_pci_bus_addr() argument 90 ret = (1 << PCI_SLOT(devfn)) | (PCI_FUNC(devfn) << 8) | in ar71xx_pci_bus_addr() 94 ret = (bus->number << 16) | (PCI_SLOT(devfn) << 11) | in ar71xx_pci_bus_addr() 95 (PCI_FUNC(devfn) << 8) | (where & ~3) | 1; in ar71xx_pci_bus_addr() 163 unsigned int devfn, in ar71xx_pci_set_cfgaddr() argument 170 addr = ar71xx_pci_bus_addr(bus, devfn, where); in ar71xx_pci_set_cfgaddr() 179 static int ar71xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, in ar71xx_pci_read_config() argument 191 err = ar71xx_pci_set_cfgaddr(bus, devfn, where, size, in ar71xx_pci_read_config() 203 static int ar71xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, in ar71xx_pci_write_config() argument 214 err = ar71xx_pci_set_cfgaddr(bus, devfn, where, size, in ar71xx_pci_write_config()
|
D | pcie-octeon.c | 1541 unsigned int devfn, int reg, int size, in octeon_pcie_read_config() argument 1581 if ((bus->parent == NULL) && (devfn >> 3 != 0)) in octeon_pcie_read_config() 1599 if ((bus->parent == NULL) && (devfn >= 2)) in octeon_pcie_read_config() 1615 if ((bus_number == 2) && (devfn >> 3 != 2)) in octeon_pcie_read_config() 1622 if ((bus_number == 2) && (devfn >> 3 != 3)) in octeon_pcie_read_config() 1627 !((devfn == (2 << 3)) || (devfn == (3 << 3)))) in octeon_pcie_read_config() 1638 !((devfn >> 3 >= 1) && (devfn >> 3 <= 4))) in octeon_pcie_read_config() 1641 if ((bus_number == 5) && (devfn >> 3 != 0)) in octeon_pcie_read_config() 1644 if ((bus_number == 6) && (devfn >> 3 != 0)) in octeon_pcie_read_config() 1647 if ((bus_number == 7) && (devfn >> 3 != 0)) in octeon_pcie_read_config() [all …]
|
D | pci-rt2880.c | 67 static int rt2880_pci_config_read(struct pci_bus *bus, unsigned int devfn, in rt2880_pci_config_read() argument 74 address = rt2880_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn), in rt2880_pci_config_read() 75 PCI_FUNC(devfn), where); in rt2880_pci_config_read() 97 static int rt2880_pci_config_write(struct pci_bus *bus, unsigned int devfn, in rt2880_pci_config_write() argument 104 address = rt2880_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn), in rt2880_pci_config_write() 105 PCI_FUNC(devfn), where); in rt2880_pci_config_write() 193 switch (PCI_SLOT(dev->devfn)) { in pcibios_map_irq()
|
D | fixup-rc32434.c | 43 if (dev->bus->number < 2 && PCI_SLOT(dev->devfn) < 12) in pcibios_map_irq() 44 irq = irq_map[dev->bus->number][PCI_SLOT(dev->devfn)]; in pcibios_map_irq() 51 if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) { in rc32434_pci_early_fixup()
|
D | fixup-lemote2f.c | 58 if ((PCI_SLOT(dev->devfn) != PCI_IDSEL_CS5536) in pcibios_map_irq() 59 && (PCI_SLOT(dev->devfn) < 32)) { in pcibios_map_irq() 67 } else if (PCI_SLOT(dev->devfn) == PCI_IDSEL_CS5536) { /* cs5536 */ in pcibios_map_irq() 68 switch (PCI_FUNC(dev->devfn)) { in pcibios_map_irq()
|
D | pci-rt3883.c | 233 static int rt3883_pci_config_read(struct pci_bus *bus, unsigned int devfn, in rt3883_pci_config_read() argument 246 address = rt3883_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn), in rt3883_pci_config_read() 247 PCI_FUNC(devfn), where); in rt3883_pci_config_read() 267 static int rt3883_pci_config_write(struct pci_bus *bus, unsigned int devfn, in rt3883_pci_config_write() argument 280 address = rt3883_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn), in rt3883_pci_config_write() 281 PCI_FUNC(devfn), where); in rt3883_pci_config_write() 467 int devfn; in rt3883_pci_probe() local 473 devfn = of_pci_get_devfn(child); in rt3883_pci_probe() 474 if (devfn < 0) in rt3883_pci_probe() 477 switch (PCI_SLOT(devfn)) { in rt3883_pci_probe()
|
D | pci-lantiq.h | 14 unsigned int devfn, int where, int size, u32 *val); 16 unsigned int devfn, int where, int size, u32 val);
|
D | pci-octeon.c | 247 dev_num = dev->devfn >> 3; in octeon_pci_pcibios_map_irq() 260 static int octeon_read_config(struct pci_bus *bus, unsigned int devfn, in octeon_read_config() argument 272 pci_addr.s.dev = devfn >> 3; in octeon_read_config() 273 pci_addr.s.func = devfn & 0x7; in octeon_read_config() 294 static int octeon_write_config(struct pci_bus *bus, unsigned int devfn, in octeon_write_config() argument 306 pci_addr.s.dev = devfn >> 3; in octeon_write_config() 307 pci_addr.s.func = devfn & 0x7; in octeon_write_config()
|
D | fixup-emma2rh.c | 57 if (PCI_SLOT(dev->devfn) == EMMA2RH_USB_SLOT) in nec_usb_controller_fixup() 74 if (PCI_SLOT(dev->devfn) == EMMA2RH_PCI_HOST_SLOT) { in emma2rh_pci_host_fixup()
|
D | ops-tx4927.c | 62 static int mkaddr(struct pci_bus *bus, unsigned int devfn, int where, in mkaddr() argument 66 devfn >= PCI_DEVFN(TX4927_PCIC_MAX_DEVNU, 0)) in mkaddr() 69 | ((devfn & 0xff) << 0x08) | (where & 0xfc) in mkaddr() 143 static int tx4927_pci_config_read(struct pci_bus *bus, unsigned int devfn, in tx4927_pci_config_read() argument 148 if (mkaddr(bus, devfn, where, pcicptr)) { in tx4927_pci_config_read() 165 static int tx4927_pci_config_write(struct pci_bus *bus, unsigned int devfn, in tx4927_pci_config_write() argument 170 if (mkaddr(bus, devfn, where, pcicptr)) in tx4927_pci_config_write()
|
D | pci-ip27.c | 165 int slot = PCI_SLOT(rdev->devfn); in pcibios_plat_dev_init() 196 int slot = PCI_SLOT(dev->devfn); in pci_disable_swapping() 207 int slot = PCI_SLOT(dev->devfn); in pci_enable_swapping()
|
D | fixup-cobalt.c | 41 if (dev->devfn == PCI_DEVFN(0, 0) && in qube_raq_galileo_early_fixup() 78 if (dev->devfn != PCI_DEVFN(0, 0)) in qube_raq_galileo_fixup()
|
D | pci-ar724x.c | 112 static int ar724x_pci_read(struct pci_bus *bus, unsigned int devfn, int where, in ar724x_pci_read() argument 123 if (devfn) in ar724x_pci_read() 159 static int ar724x_pci_write(struct pci_bus *bus, unsigned int devfn, int where, in ar724x_pci_write() argument 171 if (devfn) in ar724x_pci_write()
|
D | fixup-malta.c | 92 if (PCI_SLOT(pdev->devfn) == 10) { in malta_piix_func0_fixup() 126 if (PCI_SLOT(pdev->devfn) == 10) { in malta_piix_func1_fixup()
|
D | fixup-fuloong2e.c | 27 switch (PCI_FUNC(dev->devfn)) { in pcibios_map_irq() 67 sb_slot = PCI_SLOT(pdev->devfn); in loongson2e_686b_func0_fixup()
|
/linux-4.4.14/drivers/pci/hotplug/ |
D | cpci_hotplug_pci.c | 55 slot->devfn, in cpci_get_attention_status() 61 slot->devfn, in cpci_get_attention_status() 75 slot->devfn, in cpci_set_attention_status() 80 slot->devfn, in cpci_set_attention_status() 89 slot->devfn, in cpci_set_attention_status() 102 slot->devfn, in cpci_get_hs_csr() 107 slot->devfn, in cpci_get_hs_csr() 121 slot->devfn, in cpci_check_and_clear_ins() 126 slot->devfn, in cpci_check_and_clear_ins() 133 slot->devfn, in cpci_check_and_clear_ins() [all …]
|
D | ibmphp_pci.c | 107 unsigned int devfn = PCI_DEVFN(device, function); in ibmphp_configure_card() local 115 pci_bus_read_config_word (ibmphp_pci_bus, devfn, PCI_VENDOR_ID, &vendor_id); in ibmphp_configure_card() 129 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_HEADER_TYPE, &hdr_type); in ibmphp_configure_card() 130 pci_bus_read_config_dword (ibmphp_pci_bus, devfn, PCI_CLASS_REVISION, &class); in ibmphp_configure_card() 203 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); in ibmphp_configure_card() 275 pci_bus_read_config_byte (ibmphp_pci_bus, devfn, PCI_SECONDARY_BUS, &sec_number); in ibmphp_configure_card() 367 unsigned int devfn; in configure_device() local 371 devfn = PCI_DEVFN(func->device, func->function); in configure_device() 389 pci_bus_write_config_dword (ibmphp_pci_bus, devfn, address[count], 0xFFFFFFFF); in configure_device() 390 pci_bus_read_config_dword (ibmphp_pci_bus, devfn, address[count], &bar[count]); in configure_device() [all …]
|
D | cpqphp_pci.c | 142 static int PCI_RefinedAccessConfig(struct pci_bus *bus, unsigned int devfn, u8 offset, u32 *value) in PCI_RefinedAccessConfig() argument 146 if (pci_bus_read_config_dword (bus, devfn, PCI_VENDOR_ID, &vendID) == -1) in PCI_RefinedAccessConfig() 150 return pci_bus_read_config_dword (bus, devfn, offset, value); in PCI_RefinedAccessConfig() 178 fakedev->devfn = dev_num << 3; in cpqhp_set_irq() 253 tdevice = cpqhp_routing_table->slots[loop].devfn; in PCI_GetBusDevHelper() 565 unsigned int devfn; in cpqhp_save_base_addr_length() local 571 devfn = PCI_DEVFN(func->device, func->function); in cpqhp_save_base_addr_length() 574 pci_bus_read_config_byte (pci_bus, devfn, PCI_HEADER_TYPE, &header_type); in cpqhp_save_base_addr_length() 577 pci_bus_read_config_byte (pci_bus, devfn, PCI_SECONDARY_BUS, &secondary_bus); in cpqhp_save_base_addr_length() 598 pci_bus_write_config_dword (pci_bus, devfn, cloop, temp_register); in cpqhp_save_base_addr_length() [all …]
|
D | cpqphp_ctrl.c | 2086 unsigned int devfn; in cpqhp_process_SS() local 2100 devfn = PCI_DEVFN(func->device, func->function); in cpqhp_process_SS() 2103 rc = pci_bus_read_config_byte (pci_bus, devfn, 0x0B, &class_code); in cpqhp_process_SS() 2112 rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_HEADER_TYPE, &header_type); in cpqhp_process_SS() 2118 rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_BRIDGE_CONTROL, &BCR); in cpqhp_process_SS() 2380 unsigned int devfn; in configure_new_function() local 2396 devfn = PCI_DEVFN(func->device, func->function); in configure_new_function() 2399 rc = pci_bus_read_config_byte(pci_bus, devfn, PCI_HEADER_TYPE, &temp_byte); in configure_new_function() 2406 rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_PRIMARY_BUS, func->bus); in configure_new_function() 2421 rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_SECONDARY_BUS, temp_byte); in configure_new_function() [all …]
|
D | cpqphp_core.c | 187 tdevice = cpqhp_routing_table->slots[loop].devfn; in pci_print_IRQ_route() 349 tdevice = cpqhp_routing_table->slots[loop].devfn >> 3; in get_slot_mapping() 448 u8 devfn; in set_attention_status() local 454 if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1) in set_attention_status() 457 device = devfn >> 3; in set_attention_status() 458 function = devfn & 0x7; in set_attention_status() 475 u8 devfn; in process_SI() local 481 if (cpqhp_get_bus_dev(ctrl, &bus, &devfn, slot->number) == -1) in process_SI() 484 device = devfn >> 3; in process_SI() 485 function = devfn & 0x7; in process_SI() [all …]
|
D | shpchp_pci.c | 65 if (PCI_SLOT(dev->devfn) != p_slot->device) in shpchp_configure_device() 94 if (PCI_SLOT(dev->devfn) != p_slot->device) in shpchp_unconfigure_device()
|
/linux-4.4.14/arch/mn10300/unit-asb2305/ |
D | pci.c | 55 #define CONFIG_CMD(bus, devfn, where) \ argument 56 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) 68 static inline int __query(const struct pci_bus *bus, unsigned int devfn) in __query() argument 71 return bus->number == 0 && (devfn == PCI_DEVFN(0, 0)); in __query() 74 (devfn == PCI_DEVFN(2, 0) || devfn == PCI_DEVFN(3, 0)); in __query() 82 static int pci_ampci_read_config_byte(struct pci_bus *bus, unsigned int devfn, in pci_ampci_read_config_byte() argument 87 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_ampci_read_config_byte() 91 CONFIG_ADDRESS = CONFIG_CMD(bus, devfn, where); in pci_ampci_read_config_byte() 94 if (__query(bus, devfn)) in pci_ampci_read_config_byte() 95 __pcidebug("=> %02hx", bus, devfn, where, value); in pci_ampci_read_config_byte() [all …]
|
/linux-4.4.14/arch/powerpc/platforms/pasemi/ |
D | pci.c | 36 #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) argument 38 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) in pa_pxp_offset_valid() argument 44 if (bus == 0 && devfn == 0) in pa_pxp_offset_valid() 51 u8 bus, u8 devfn, int offset) in pa_pxp_cfg_addr() argument 53 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); in pa_pxp_cfg_addr() 56 static inline int is_root_port(int busno, int devfn) in is_root_port() argument 58 return ((busno == 0) && (PCI_FUNC(devfn) < 4) && in is_root_port() 59 ((PCI_SLOT(devfn) == 16) || (PCI_SLOT(devfn) == 17))); in is_root_port() 68 static int workaround_5945(struct pci_bus *bus, unsigned int devfn, in workaround_5945() argument 76 if (!is_root_port(bus->number, devfn) || !is_5945_reg(offset)) in workaround_5945() [all …]
|
/linux-4.4.14/arch/x86/pci/ |
D | intel_mid_pci.c | 60 static int fixed_bar_cap(struct pci_bus *bus, unsigned int devfn) in fixed_bar_cap() argument 72 devfn, pos, 4, &pcie_cap)) in fixed_bar_cap() 81 devfn, pos + 4, 4, &cap_data); in fixed_bar_cap() 92 static int pci_device_update_fixed(struct pci_bus *bus, unsigned int devfn, in pci_device_update_fixed() argument 105 raw_pci_ext_ops->read(domain, busnum, devfn, in pci_device_update_fixed() 128 return raw_pci_ext_ops->write(domain, busnum, devfn, reg, 4, in pci_device_update_fixed() 133 return raw_pci_ext_ops->write(domain, busnum, devfn, reg, len, val); in pci_device_update_fixed() 146 static bool type1_access_ok(unsigned int bus, unsigned int devfn, int reg) in type1_access_ok() argument 158 if (bus == 0 && (devfn == PCI_DEVFN(2, 0) in type1_access_ok() 159 || devfn == PCI_DEVFN(0, 0) in type1_access_ok() [all …]
|
D | direct.c | 16 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \ argument 18 | (devfn << 8) | (reg & 0xFC)) 21 unsigned int devfn, int reg, int len, u32 *value) in pci_conf1_read() argument 25 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) { in pci_conf1_read() 32 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_read() 52 unsigned int devfn, int reg, int len, u32 value) in pci_conf1_write() argument 56 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) in pci_conf1_write() 61 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_write() 95 unsigned int devfn, int reg, int len, u32 *value) in pci_conf2_read() argument 101 if ((bus > 255) || (devfn > 255) || (reg > 255)) { in pci_conf2_read() [all …]
|
D | numachip.c | 21 static inline char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) in pci_dev_base() argument 26 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); in pci_dev_base() 31 unsigned int devfn, int reg, int len, u32 *value) in pci_mmcfg_read_numachip() argument 36 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { in pci_mmcfg_read_numachip() 42 if (unlikely(bus == 0 && devfn >= limit)) { in pci_mmcfg_read_numachip() 48 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_read_numachip() 71 unsigned int devfn, int reg, int len, u32 value) in pci_mmcfg_write_numachip() argument 76 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) in pci_mmcfg_write_numachip() 80 if (unlikely(bus == 0 && devfn >= limit)) in pci_mmcfg_write_numachip() 84 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_write_numachip()
|
D | mmconfig_32.c | 28 static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) in get_base_addr() argument 40 static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn) in pci_exp_set_dev_base() argument 42 u32 dev_base = base | PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12); in pci_exp_set_dev_base() 53 unsigned int devfn, int reg, int len, u32 *value) in pci_mmcfg_read() argument 58 if ((bus > 255) || (devfn > 255) || (reg > 4095)) { in pci_mmcfg_read() 64 base = get_base_addr(seg, bus, devfn); in pci_mmcfg_read() 72 pci_exp_set_dev_base(base, bus, devfn); in pci_mmcfg_read() 92 unsigned int devfn, int reg, int len, u32 value) in pci_mmcfg_write() argument 97 if ((bus > 255) || (devfn > 255) || (reg > 4095)) in pci_mmcfg_write() 101 base = get_base_addr(seg, bus, devfn); in pci_mmcfg_write() [all …]
|
D | olpc.c | 177 static int is_simulated(unsigned int bus, unsigned int devfn) in is_simulated() argument 179 return (!bus && ((PCI_SLOT(devfn) == NB_SLOT) || in is_simulated() 180 (PCI_SLOT(devfn) == SB_SLOT))); in is_simulated() 205 unsigned int devfn, int reg, int len, uint32_t *value) in pci_olpc_read() argument 212 if (!is_simulated(bus, devfn)) in pci_olpc_read() 213 return pci_direct_conf1.read(seg, bus, devfn, reg, len, value); in pci_olpc_read() 222 switch (devfn) { in pci_olpc_read() 267 unsigned int devfn, int reg, int len, uint32_t value) in pci_olpc_write() argument 272 if (!is_simulated(bus, devfn)) in pci_olpc_write() 273 return pci_direct_conf1.write(seg, bus, devfn, reg, len, value); in pci_olpc_write() [all …]
|
D | legacy.c | 39 int devfn; in pcibios_scan_specific_bus() local 45 for (devfn = 0; devfn < 256; devfn += 8) { in pcibios_scan_specific_bus() 46 if (!raw_pci_read(0, busn, devfn, PCI_VENDOR_ID, 2, &l) && in pcibios_scan_specific_bus() 48 DBG("Found device at %02x:%02x [%04x]\n", busn, devfn, l); in pcibios_scan_specific_bus()
|
D | mmconfig_64.c | 18 static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) in pci_dev_base() argument 23 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); in pci_dev_base() 28 unsigned int devfn, int reg, int len, u32 *value) in pci_mmcfg_read() argument 33 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { in pci_mmcfg_read() 39 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_read() 62 unsigned int devfn, int reg, int len, u32 value) in pci_mmcfg_write() argument 67 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) in pci_mmcfg_write() 71 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_write()
|
D | ce4100.c | 200 int bridge_read(unsigned int devfn, int reg, int len, u32 *value) in bridge_read() argument 229 pci_direct_conf1.read(0, 0, devfn, in bridge_read() 269 unsigned int devfn, int reg, int len, u32 *value) in ce4100_conf_read() argument 276 if (bus1_fixups[i].dev_func == devfn && in ce4100_conf_read() 287 if (bus == 0 && (PCI_DEVFN(1, 0) == devfn) && in ce4100_conf_read() 288 !bridge_read(devfn, reg, len, value)) in ce4100_conf_read() 291 return pci_direct_conf1.read(seg, bus, devfn, reg, len, value); in ce4100_conf_read() 295 unsigned int devfn, int reg, int len, u32 value) in ce4100_conf_write() argument 302 if (bus1_fixups[i].dev_func == devfn && in ce4100_conf_write() 313 if (bus == 0 && PCI_DEVFN(1, 0) == devfn && in ce4100_conf_write() [all …]
|
D | common.c | 41 int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, in raw_pci_read() argument 45 return raw_pci_ops->read(domain, bus, devfn, reg, len, val); in raw_pci_read() 47 return raw_pci_ext_ops->read(domain, bus, devfn, reg, len, val); in raw_pci_read() 51 int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, in raw_pci_write() argument 55 return raw_pci_ops->write(domain, bus, devfn, reg, len, val); in raw_pci_write() 57 return raw_pci_ext_ops->write(domain, bus, devfn, reg, len, val); in raw_pci_write() 61 static int pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) in pci_read() argument 64 devfn, where, size, value); in pci_read() 67 static int pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value) in pci_write() argument 70 devfn, where, size, value); in pci_write() [all …]
|
D | pcbios.c | 178 unsigned int devfn, int reg, int len, u32 *value) in pci_bios_read() argument 182 unsigned long bx = (bus << 8) | devfn; in pci_bios_read() 185 if (!value || (bus > 255) || (devfn > 255) || (reg > 255)) in pci_bios_read() 245 unsigned int devfn, int reg, int len, u32 value) in pci_bios_write() argument 249 unsigned long bx = (bus << 8) | devfn; in pci_bios_write() 252 if ((bus > 255) || (devfn > 255) || (reg > 255)) in pci_bios_write() 441 "b" ((dev->bus->number << 8) | dev->devfn), in pcibios_set_irq_routing()
|
D | fixup.c | 204 static int quirk_pcie_aspm_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *… in quirk_pcie_aspm_read() argument 207 devfn, where, size, value); in quirk_pcie_aspm_read() 214 static int quirk_pcie_aspm_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 … in quirk_pcie_aspm_write() argument 218 offset = quirk_aspm_offset[GET_INDEX(bus->self->device, devfn)]; in quirk_pcie_aspm_write() 224 devfn, where, size, value); in quirk_pcie_aspm_write() 278 quirk_aspm_offset[GET_INDEX(pdev->device, dev->devfn)] = in pcie_rootport_aspm_quirk()
|
D | xen.c | 294 map_irq.devfn = dev->devfn; in xen_initdom_setup_msi_irqs() 367 restore_ext.devfn = dev->devfn; in xen_initdom_restore_msi_irqs() 378 restore.devfn = dev->devfn; in xen_initdom_restore_msi_irqs()
|
/linux-4.4.14/drivers/xen/ |
D | pci.c | 51 .add.devfn = pci_dev->devfn in xen_add_device() 63 add->physfn.devfn = physfn->devfn; in xen_add_device() 66 if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) in xen_add_device() 117 .devfn = pci_dev->devfn, in xen_add_device() 120 .physfn.devfn = physfn->devfn, in xen_add_device() 127 else if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) { in xen_add_device() 130 .devfn = pci_dev->devfn, in xen_add_device() 139 .devfn = pci_dev->devfn, in xen_add_device() 158 .devfn = pci_dev->devfn in xen_remove_device() 168 .devfn = pci_dev->devfn in xen_remove_device()
|
D | dbgp.c | 27 dbgp.u.pci.devfn = pdev->devfn; in xen_dbgp_op()
|
/linux-4.4.14/arch/powerpc/platforms/maple/ |
D | pci.c | 84 static unsigned long u3_agp_cfa0(u8 devfn, u8 off) in u3_agp_cfa0() argument 86 return (1 << (unsigned long)PCI_SLOT(devfn)) | in u3_agp_cfa0() 87 ((unsigned long)PCI_FUNC(devfn) << 8) | in u3_agp_cfa0() 91 static unsigned long u3_agp_cfa1(u8 bus, u8 devfn, u8 off) in u3_agp_cfa1() argument 94 ((unsigned long)devfn << 8) | in u3_agp_cfa1() 120 static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_read_config() argument 130 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_read_config() 151 static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_write_config() argument 161 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_write_config() 188 static unsigned long u3_ht_cfa0(u8 devfn, u8 off) in u3_ht_cfa0() argument [all …]
|
/linux-4.4.14/arch/sparc/kernel/ |
D | pci_common.c | 20 unsigned long devfn, in config_out_of_range() argument 31 unsigned long devfn, in sun4u_config_mkaddr() argument 36 if (config_out_of_range(pbm, bus, devfn, reg)) in sun4u_config_mkaddr() 40 devfn <<= rbits; in sun4u_config_mkaddr() 43 return (void *) (pbm->config_space | bus | devfn | reg); in sun4u_config_mkaddr() 52 unsigned char bus, unsigned int devfn, in sun4u_read_pci_cfg_host() argument 59 addr = sun4u_config_mkaddr(pbm, bus, devfn, where); in sun4u_read_pci_cfg_host() 94 sun4u_read_pci_cfg_host(pbm, bus, devfn, in sun4u_read_pci_cfg_host() 99 sun4u_read_pci_cfg_host(pbm, bus, devfn, in sun4u_read_pci_cfg_host() 107 static int sun4u_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, in sun4u_read_pci_cfg() argument [all …]
|
D | leon_pci_grpci1.c | 102 unsigned int devfn, int where, u32 val); 117 unsigned int devfn, int where, u32 *val) in grpci1_cfg_r32() argument 125 devfn += (0x8 * 6); /* start at AD16=Device0 */ in grpci1_cfg_r32() 128 devfn = 0; /* special case: bridge controller itself */ in grpci1_cfg_r32() 136 pci_conf = (u32 *) (priv->pci_conf | (devfn << 8) | (where & 0xfc)); in grpci1_cfg_r32() 154 unsigned int devfn, int where, u32 *val) in grpci1_cfg_r16() argument 161 ret = grpci1_cfg_r32(priv, bus, devfn, where & ~0x3, &v); in grpci1_cfg_r16() 167 unsigned int devfn, int where, u32 *val) in grpci1_cfg_r8() argument 172 ret = grpci1_cfg_r32(priv, bus, devfn, where & ~0x3, &v); in grpci1_cfg_r8() 179 unsigned int devfn, int where, u32 val) in grpci1_cfg_w32() argument [all …]
|
D | pcic.c | 59 unsigned char devfn; /* Configuration address */ member 175 static int pcic_read_config_dword(unsigned int busno, unsigned int devfn, in pcic_read_config_dword() argument 188 writel(CONFIG_CMD(busno, devfn, where), pcic->pcic_config_space_addr); in pcic_read_config_dword() 212 static int pcic_read_config(struct pci_bus *bus, unsigned int devfn, in pcic_read_config() argument 220 pcic_read_config_dword(bus->number, devfn, where&~3, &v); in pcic_read_config() 225 pcic_read_config_dword(bus->number, devfn, where&~3, &v); in pcic_read_config() 230 pcic_read_config_dword(bus->number, devfn, where&~3, val); in pcic_read_config() 236 static int pcic_write_config_dword(unsigned int busno, unsigned int devfn, in pcic_write_config_dword() argument 245 writel(CONFIG_CMD(busno, devfn, where), pcic->pcic_config_space_addr); in pcic_write_config_dword() 251 static int pcic_write_config(struct pci_bus *bus, unsigned int devfn, in pcic_write_config() argument [all …]
|
D | leon_pci_grpci2.c | 234 unsigned int devfn, int where, u32 *val) in grpci2_cfg_r32() argument 244 devfn += (0x8 * 6); /* start at AD16=Device0 */ in grpci2_cfg_r32() 247 devfn = 0; /* special case: bridge controller itself */ in grpci2_cfg_r32() 260 (devfn << 8) | (where & 0xfc)); in grpci2_cfg_r32() 280 unsigned int devfn, int where, u32 *val) in grpci2_cfg_r16() argument 287 ret = grpci2_cfg_r32(priv, bus, devfn, where & ~0x3, &v); in grpci2_cfg_r16() 293 unsigned int devfn, int where, u32 *val) in grpci2_cfg_r8() argument 298 ret = grpci2_cfg_r32(priv, bus, devfn, where & ~0x3, &v); in grpci2_cfg_r8() 305 unsigned int devfn, int where, u32 val) in grpci2_cfg_w32() argument 314 devfn += (0x8 * 6); /* start at AD16=Device0 */ in grpci2_cfg_w32() [all …]
|
D | prom_32.c | 98 unsigned int devfn; in pci_path_component() local 105 devfn = (regs->phys_hi >> 8) & 0xff; in pci_path_component() 106 if (devfn & 0x07) { in pci_path_component() 109 devfn >> 3, in pci_path_component() 110 devfn & 0x07); in pci_path_component() 114 devfn >> 3); in pci_path_component()
|
D | leon_pci.c | 76 pci_bus_read_config_word(pbus, dev->devfn, PCI_COMMAND, &cmd); in pcibios_fixup_bus() 83 pci_bus_write_config_word(pbus, dev->devfn, PCI_COMMAND, in pcibios_fixup_bus() 92 pci_bus_write_config_word(pbus, dev->devfn, PCI_COMMAND, in pcibios_fixup_bus()
|
D | psycho_common.h | 21 unsigned int devfn, in psycho_pci_config_mkaddr() argument 26 PSYCHO_CONFIG_ENCODE(bus, devfn, where)); in psycho_pci_config_mkaddr()
|
D | prom_64.c | 170 unsigned int devfn; in pci_path_component() local 177 devfn = (regs->phys_hi >> 8) & 0xff; in pci_path_component() 178 if (devfn & 0x07) { in pci_path_component() 181 devfn >> 3, in pci_path_component() 182 devfn & 0x07); in pci_path_component() 186 devfn >> 3); in pci_path_component()
|
D | pci.c | 250 struct pci_bus *bus, int devfn) in of_create_pci_dev() argument 283 devfn, type); in of_create_pci_dev() 289 dev->devfn = devfn; in of_create_pci_dev() 314 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); in of_create_pci_dev() 542 int reglen, devfn, prev_devfn; in pci_of_scan_bus() local 558 devfn = (reg[0] >> 8) & 0xff; in pci_of_scan_bus() 565 if (devfn == prev_devfn) in pci_of_scan_bus() 567 prev_devfn = devfn; in pci_of_scan_bus() 570 dev = of_create_pci_dev(pbm, child, bus, devfn); in pci_of_scan_bus()
|
/linux-4.4.14/arch/alpha/kernel/ |
D | sys_miata.c | 183 if((slot == 7) && (PCI_FUNC(dev->devfn) == 3)) { in miata_map_irq() 185 struct pci_dev *pdev = pci_get_slot(dev->bus, dev->devfn & ~7); in miata_map_irq() 205 slot = PCI_SLOT(dev->devfn); in miata_swizzle() 208 else if ((PCI_SLOT(dev->bus->self->devfn) == 8) || in miata_swizzle() 209 (PCI_SLOT(dev->bus->self->devfn) == 20)) { in miata_swizzle() 210 slot = PCI_SLOT(dev->devfn) + 9; in miata_swizzle() 216 if ((PCI_SLOT(dev->bus->self->devfn) == 8) || in miata_swizzle() 217 (PCI_SLOT(dev->bus->self->devfn) == 20)) { in miata_swizzle() 218 slot = PCI_SLOT(dev->devfn) + 9; in miata_swizzle() 226 slot = PCI_SLOT(dev->devfn); in miata_swizzle()
|
D | sys_ruffian.c | 148 slot = PCI_SLOT(dev->devfn); in ruffian_swizzle() 151 else if (PCI_SLOT(dev->bus->self->devfn) == 13) { in ruffian_swizzle() 152 slot = PCI_SLOT(dev->devfn) + 10; in ruffian_swizzle() 158 if (PCI_SLOT(dev->bus->self->devfn) == 13) { in ruffian_swizzle() 159 slot = PCI_SLOT(dev->devfn) + 10; in ruffian_swizzle() 167 slot = PCI_SLOT(dev->devfn); in ruffian_swizzle()
|
D | sys_noritake.c | 230 slot = PCI_SLOT(dev->devfn); in noritake_swizzle() 233 else if (PCI_SLOT(dev->bus->self->devfn) == 8) { in noritake_swizzle() 234 slot = PCI_SLOT(dev->devfn) + 15; /* WAG! */ in noritake_swizzle() 240 if (PCI_SLOT(dev->bus->self->devfn) == 8) { in noritake_swizzle() 241 slot = PCI_SLOT(dev->devfn) + 15; in noritake_swizzle() 249 slot = PCI_SLOT(dev->devfn); in noritake_swizzle()
|
D | core_polaris.c | 83 polaris_read_config(struct pci_bus *bus, unsigned int devfn, int where, in polaris_read_config() argument 89 if (mk_conf_addr(bus, devfn, where, &addr, &type1)) in polaris_read_config() 109 polaris_write_config(struct pci_bus *bus, unsigned int devfn, int where, in polaris_write_config() argument 115 if (mk_conf_addr(bus, devfn, where, &addr, &type1)) in polaris_write_config()
|
D | sys_sable.c | 413 slot = PCI_SLOT(dev->devfn); in lynx_swizzle() 416 else if (PCI_SLOT(dev->bus->self->devfn) == 3) { in lynx_swizzle() 417 slot = PCI_SLOT(dev->devfn) + 11; in lynx_swizzle() 423 if (PCI_SLOT(dev->bus->self->devfn) == 3) { in lynx_swizzle() 424 slot = PCI_SLOT(dev->devfn) + 11; in lynx_swizzle() 432 slot = PCI_SLOT(dev->devfn); in lynx_swizzle()
|
D | sys_eiger.c | 180 slot = PCI_SLOT(dev->devfn); in eiger_swizzle() 184 && (PCI_SLOT(dev->bus->self->devfn) in eiger_swizzle() 186 slot = PCI_SLOT(dev->devfn); in eiger_swizzle()
|
D | core_apecs.c | 274 apecs_read_config(struct pci_bus *bus, unsigned int devfn, int where, in apecs_read_config() argument 282 if (mk_conf_addr(bus, devfn, where, &pci_addr, &type1)) in apecs_read_config() 293 apecs_write_config(struct pci_bus *bus, unsigned int devfn, int where, in apecs_write_config() argument 300 if (mk_conf_addr(bus, devfn, where, &pci_addr, &type1)) in apecs_write_config()
|
D | core_mcpcia.c | 169 mk_conf_addr(struct pci_bus *pbus, unsigned int devfn, int where, in mk_conf_addr() argument 178 bus, devfn, hose->index, where, pci_addr, type1)); in mk_conf_addr() 185 addr = (bus << 16) | (devfn << 8) | (where); in mk_conf_addr() 195 mcpcia_read_config(struct pci_bus *bus, unsigned int devfn, int where, in mcpcia_read_config() argument 202 if (mk_conf_addr(bus, devfn, where, hose, &addr, &type1)) in mcpcia_read_config() 222 mcpcia_write_config(struct pci_bus *bus, unsigned int devfn, int where, in mcpcia_write_config() argument 229 if (mk_conf_addr(bus, devfn, where, hose, &addr, &type1)) in mcpcia_write_config()
|
D | sys_takara.c | 183 unsigned int busslot = PCI_SLOT(dev->bus->self->devfn); in takara_map_irq_srm() 216 int slot = PCI_SLOT(dev->devfn); in takara_swizzle() 224 busslot = PCI_SLOT(dev->bus->self->devfn); in takara_swizzle()
|
D | sys_dp264.c | 433 slot = PCI_SLOT(dev->devfn); in monet_swizzle() 436 else if (hose->index == 1 && PCI_SLOT(dev->bus->self->devfn) == 8) { in monet_swizzle() 437 slot = PCI_SLOT(dev->devfn); in monet_swizzle() 443 PCI_SLOT(dev->bus->self->devfn) == 8) { in monet_swizzle() 444 slot = PCI_SLOT(dev->devfn); in monet_swizzle() 452 slot = PCI_SLOT(dev->devfn); in monet_swizzle()
|
D | core_irongate.c | 102 irongate_read_config(struct pci_bus *bus, unsigned int devfn, int where, in irongate_read_config() argument 108 if (mk_conf_addr(bus, devfn, where, &addr, &type1)) in irongate_read_config() 127 irongate_write_config(struct pci_bus *bus, unsigned int devfn, int where, in irongate_write_config() argument 133 if (mk_conf_addr(bus, devfn, where, &addr, &type1)) in irongate_write_config()
|
D | core_lca.c | 201 lca_read_config(struct pci_bus *bus, unsigned int devfn, int where, in lca_read_config() argument 208 if (mk_conf_addr(bus, devfn, where, &pci_addr)) in lca_read_config() 219 lca_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size, in lca_write_config() argument 225 if (mk_conf_addr(bus, devfn, where, &pci_addr)) in lca_write_config()
|
D | core_marvel.c | 499 unsigned int devfn, int where) in build_conf_addr() argument 501 return (hose->config_space_base | (bus << 16) | (devfn << 8) | where); in build_conf_addr() 505 mk_conf_addr(struct pci_bus *pbus, unsigned int devfn, int where) in mk_conf_addr() argument 522 if (devfn >= PCI_DEVFN(21, 0)) in mk_conf_addr() 527 addr = build_conf_addr(hose, bus, devfn, where); in mk_conf_addr() 534 marvel_read_config(struct pci_bus *bus, unsigned int devfn, int where, in marvel_read_config() argument 539 if (0 == (addr = mk_conf_addr(bus, devfn, where))) in marvel_read_config() 560 marvel_write_config(struct pci_bus *bus, unsigned int devfn, int where, in marvel_write_config() argument 565 if (0 == (addr = mk_conf_addr(bus, devfn, where))) in marvel_write_config()
|
/linux-4.4.14/arch/powerpc/sysdev/ |
D | indirect_pci.c | 24 unsigned char bus_number, unsigned int devfn, in __indirect_read_config() argument 34 if (devfn != 0) in __indirect_read_config() 39 if (ppc_md.pci_exclude_device(hose, bus_number, devfn)) in __indirect_read_config() 56 (devfn << 8) | reg | cfg_type)); in __indirect_read_config() 59 (devfn << 8) | reg | cfg_type)); in __indirect_read_config() 80 int indirect_read_config(struct pci_bus *bus, unsigned int devfn, in indirect_read_config() argument 85 return __indirect_read_config(hose, bus->number, devfn, offset, len, in indirect_read_config() 89 int indirect_write_config(struct pci_bus *bus, unsigned int devfn, in indirect_write_config() argument 100 if (devfn != 0) in indirect_write_config() 105 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) in indirect_write_config() [all …]
|
D | xilinx_pci.c | 43 if (dev->devfn || dev->bus->self) in xilinx_pci_fixup_bridge() 74 xilinx_pci_exclude_device(struct pci_controller *hose, u_char bus, u8 devfn) in xilinx_pci_exclude_device() argument
|
D | tsi108_pci.c | 147 tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn, int offset, in tsi108_direct_read_config() argument 155 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) in tsi108_direct_read_config() 159 devfn, in tsi108_direct_read_config() 180 printk("%d:0x%x:0x%x ", bus->number, devfn, offset); in tsi108_direct_read_config()
|
D | mpic.c | 448 unsigned int devfn) in mpic_scan_ht_msi() argument 476 PCI_SLOT(devfn), PCI_FUNC(devfn), in mpic_scan_ht_msi() 484 unsigned int devfn) in mpic_scan_ht_msi() argument 491 unsigned int devfn, u32 vdid) in mpic_scan_ht_pic() argument 516 devfn >> 3, devfn & 0x7, pos, vdid & 0xffff, vdid >> 16, n + 1); in mpic_scan_ht_pic() 541 unsigned int devfn; in mpic_scan_ht_pics() local 562 for (devfn = 0; devfn < 0x100; devfn++) { in mpic_scan_ht_pics() 563 u8 __iomem *devbase = cfgspace + (devfn << 8); in mpic_scan_ht_pics() 568 DBG("devfn %x, l: %x\n", devfn, l); in mpic_scan_ht_pics() 579 mpic_scan_ht_pic(mpic, devbase, devfn, l); in mpic_scan_ht_pics() [all …]
|
D | fsl_pci.c | 90 static int fsl_indirect_read_config(struct pci_bus *bus, unsigned int devfn, in fsl_indirect_read_config() argument 100 return indirect_read_config(bus, devfn, offset, len, val); in fsl_indirect_read_config() 645 static int mpc83xx_pcie_exclude_device(struct pci_bus *bus, unsigned int devfn) in mpc83xx_pcie_exclude_device() argument 658 if (devfn & 0xf8) in mpc83xx_pcie_exclude_device() 663 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) in mpc83xx_pcie_exclude_device() 671 unsigned int devfn, int offset) in mpc83xx_pcie_remap_cfg() argument 675 u32 dev_base = bus->number << 24 | devfn << 16; in mpc83xx_pcie_remap_cfg() 678 ret = mpc83xx_pcie_exclude_device(bus, devfn); in mpc83xx_pcie_remap_cfg() 698 static int mpc83xx_pcie_write_config(struct pci_bus *bus, unsigned int devfn, in mpc83xx_pcie_write_config() argument 707 return pci_generic_config_write(bus, devfn, offset, len, val); in mpc83xx_pcie_write_config()
|
/linux-4.4.14/drivers/xen/xen-pciback/ |
D | vpci.c | 32 unsigned int devfn) in __xen_pcibk_get_pci_dev() argument 41 if (PCI_SLOT(devfn) < PCI_SLOT_MAX) { in __xen_pcibk_get_pci_dev() 45 &vpci_dev->dev_list[PCI_SLOT(devfn)], in __xen_pcibk_get_pci_dev() 47 if (PCI_FUNC(entry->dev->devfn) == PCI_FUNC(devfn)) { in __xen_pcibk_get_pci_dev() 61 && l->bus == r->bus && PCI_SLOT(l->devfn) == PCI_SLOT(r->devfn)) in match_slot() 109 PCI_FUNC(dev->devfn)); in __xen_pcibk_add_pci_dev() 112 func = PCI_FUNC(dev->devfn); in __xen_pcibk_add_pci_dev() 125 func = dev->is_virtfn ? 0 : PCI_FUNC(dev->devfn); in __xen_pcibk_add_pci_dev() 232 unsigned int *devfn) in __xen_pcibk_get_pcifront_dev() argument 248 && dev->devfn == pcidev->devfn) { in __xen_pcibk_get_pcifront_dev() [all …]
|
D | passthrough.c | 22 unsigned int devfn) in __xen_pcibk_get_pci_dev() argument 33 && devfn == dev_entry->dev->devfn) { in __xen_pcibk_get_pci_dev() 50 unsigned int domain, bus, devfn; in __xen_pcibk_add_pci_dev() local 65 devfn = dev->devfn; in __xen_pcibk_add_pci_dev() 66 err = publish_cb(pdev, domain, bus, devfn, devid); in __xen_pcibk_add_pci_dev() 179 unsigned int *devfn) in __xen_pcibk_get_pcifront_dev() argument 183 *devfn = pcidev->devfn; in __xen_pcibk_get_pcifront_dev()
|
D | pciback.h | 87 unsigned int devfn, unsigned int devid); 101 unsigned int *devfn); 109 unsigned int devfn); 135 unsigned int bus, unsigned int devfn) in xen_pcibk_get_pci_dev() argument 138 return xen_pcibk_backend->get(pdev, domain, bus, devfn); in xen_pcibk_get_pci_dev() 152 unsigned int *devfn) in xen_pcibk_get_pcifront_dev() argument 156 devfn); in xen_pcibk_get_pcifront_dev()
|
D | pci_stub.c | 40 unsigned int devfn; member 116 .devfn = dev->devfn in pcistub_device_release() 164 && slot == PCI_SLOT(psdev->dev->devfn) in pcistub_device_find() 165 && func == PCI_FUNC(psdev->dev->devfn)) { in pcistub_device_find() 214 && slot == PCI_SLOT(psdev->dev->devfn) in pcistub_get_pci_dev_by_slot() 215 && func == PCI_FUNC(psdev->dev->devfn)) { in pcistub_get_pci_dev_by_slot() 323 && dev->devfn == pdev_id->devfn) in pcistub_match_one() 401 .devfn = dev->devfn in pcistub_init_device() 657 &aer_op->domain, &aer_op->bus, &aer_op->devfn); in common_process() 667 aer_cmd, aer_op->domain, aer_op->bus, aer_op->devfn); in common_process() [all …]
|
/linux-4.4.14/arch/sh/drivers/pci/ |
D | ops-sh7786.c | 23 struct pci_bus *bus, unsigned int devfn, int where, u32 *data) in sh7786_pcie_config_access() argument 28 dev = PCI_SLOT(devfn); in sh7786_pcie_config_access() 29 func = PCI_FUNC(devfn); in sh7786_pcie_config_access() 92 static int sh7786_pcie_read(struct pci_bus *bus, unsigned int devfn, in sh7786_pcie_read() argument 106 devfn, where, &data); in sh7786_pcie_read() 121 devfn, where, size, (unsigned long)*val); in sh7786_pcie_read() 128 static int sh7786_pcie_write(struct pci_bus *bus, unsigned int devfn, in sh7786_pcie_write() argument 142 devfn, where, &data); in sh7786_pcie_write() 148 devfn, where, size, (unsigned long)val); in sh7786_pcie_write() 162 devfn, where, &data); in sh7786_pcie_write()
|
D | ops-dreamcast.c | 39 static int gapspci_config_access(unsigned char bus, unsigned int devfn) in gapspci_config_access() argument 41 return (bus == 0) && (devfn == 0); in gapspci_config_access() 49 static int gapspci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) in gapspci_read() argument 53 if (!gapspci_config_access(bus->number, devfn)) in gapspci_read() 65 static int gapspci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) in gapspci_write() argument 67 if (!gapspci_config_access(bus->number, devfn)) in gapspci_write()
|
D | ops-sh4.c | 19 #define CONFIG_CMD(bus, devfn, where) \ argument 20 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) 25 static int sh4_pci_read(struct pci_bus *bus, unsigned int devfn, in sh4_pci_read() argument 37 pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR); in sh4_pci_read() 63 static int sh4_pci_write(struct pci_bus *bus, unsigned int devfn, in sh4_pci_write() argument 72 pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR); in sh4_pci_write()
|
D | ops-sh5.c | 24 static int sh5pci_read(struct pci_bus *bus, unsigned int devfn, int where, in sh5pci_read() argument 27 SH5PCI_WRITE(PAR, CONFIG_CMD(bus, devfn, where)); in sh5pci_read() 44 static int sh5pci_write(struct pci_bus *bus, unsigned int devfn, int where, in sh5pci_write() argument 47 SH5PCI_WRITE(PAR, CONFIG_CMD(bus, devfn, where)); in sh5pci_write()
|
D | pci-sh5.h | 99 #define SET_CONFIG_BITS(bus,devfn,where) ((((bus) << 16) | ((devfn) << 8) | ((where) & ~3)) | 0x80… argument 102 #define CONFIG_CMD(bus, devfn, where) SET_CONFIG_BITS(bus->number,devfn,where) argument
|
D | common.c | 11 int top_bus, int busnr, int devfn) in fake_pci_dev() argument 18 dev.devfn = devfn; in fake_pci_dev() 34 int top_bus, int bus, int devfn, int offset, type value) \ 37 fake_pci_dev(hose, top_bus, bus, devfn), \
|
D | fixups-cayman.c | 39 slot = path[i].slot = PCI_SLOT(dev->devfn); in pcibios_map_platform_irq() 46 slot = PCI_SLOT(dev->devfn); in pcibios_map_platform_irq()
|
/linux-4.4.14/arch/arm/mach-orion5x/ |
D | pci.c | 76 static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, in pcie_rd_conf() argument 82 if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) { in pcie_rd_conf() 88 ret = orion_pcie_rd_conf(PCIE_BASE, bus, devfn, where, size, val); in pcie_rd_conf() 94 static int pcie_rd_conf_wa(struct pci_bus *bus, u32 devfn, in pcie_rd_conf_wa() argument 99 if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) { in pcie_rd_conf_wa() 115 bus, devfn, where, size, val); in pcie_rd_conf_wa() 120 static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, in pcie_wr_conf() argument 126 if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) in pcie_wr_conf() 130 ret = orion_pcie_wr_conf(PCIE_BASE, bus, devfn, where, size, val); in pcie_wr_conf() 322 static int orion5x_pci_valid_config(int bus, u32 devfn) in orion5x_pci_valid_config() argument [all …]
|
/linux-4.4.14/arch/powerpc/platforms/powermac/ |
D | pci.c | 127 #define MACRISC_CFA0(devfn, off) \ argument 132 #define MACRISC_CFA1(bus, devfn, off) \ argument 134 |(((unsigned int)(devfn)) << 8) \ 176 static void __iomem *chaos_map_bus(struct pci_bus *bus, unsigned int devfn, in chaos_map_bus() argument 184 np = of_pci_find_child_device(bus->dev.of_node, devfn); in chaos_map_bus() 197 return macrisc_cfg_map_bus(bus, devfn, offset); in chaos_map_bus() 233 struct pci_bus *bus, unsigned int devfn) in u3_ht_skip_device() argument 245 else if (devfn == 0) in u3_ht_skip_device() 250 if (PCI_DN(dn) && PCI_DN(dn)->devfn == devfn) in u3_ht_skip_device() 266 #define U3_HT_CFA0(devfn, off) \ argument [all …]
|
/linux-4.4.14/arch/arm/mach-iop32x/ |
D | n2100.c | 83 if (PCI_SLOT(dev->devfn) == 1) { in n2100_pci_map_irq() 86 } else if (PCI_SLOT(dev->devfn) == 2) { in n2100_pci_map_irq() 89 } else if (PCI_SLOT(dev->devfn) == 3) { in n2100_pci_map_irq() 92 } else if (PCI_SLOT(dev->devfn) == 4 && pin == 1) { in n2100_pci_map_irq() 95 } else if (PCI_SLOT(dev->devfn) == 4 && pin == 2) { in n2100_pci_map_irq() 98 } else if (PCI_SLOT(dev->devfn) == 4 && pin == 3) { in n2100_pci_map_irq() 101 } else if (PCI_SLOT(dev->devfn) == 5) { in n2100_pci_map_irq() 107 PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); in n2100_pci_map_irq() 130 (dev->devfn == PCI_DEVFN(1, 0) || in n2100_fixup_r8169() 131 dev->devfn == PCI_DEVFN(2, 0))) in n2100_fixup_r8169()
|
D | iq31244.c | 122 PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); in ep80219_pci_map_irq() 157 PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); in iq31244_pci_map_irq()
|
D | iq80321.c | 93 PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); in iq80321_pci_map_irq()
|
/linux-4.4.14/arch/unicore32/kernel/ |
D | pci.c | 25 #define CONFIG_CMD(bus, devfn, where) \ argument 26 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) 29 puv3_read_config(struct pci_bus *bus, unsigned int devfn, int where, in puv3_read_config() argument 32 writel(CONFIG_CMD(bus, devfn, where), PCICFG_ADDR); in puv3_read_config() 48 puv3_write_config(struct pci_bus *bus, unsigned int devfn, int where, in puv3_write_config() argument 51 writel(CONFIG_CMD(bus, devfn, where), PCICFG_ADDR); in puv3_write_config() 108 if (dev->devfn == 0x00) in pci_puv3_map_irq() 110 else if (dev->devfn == 0x08) in pci_puv3_map_irq() 112 else if (dev->devfn == 0x10) in pci_puv3_map_irq() 114 else if (dev->devfn == 0x18) in pci_puv3_map_irq() [all …]
|
/linux-4.4.14/arch/arm/plat-orion/ |
D | pcie.c | 209 u32 devfn, int where, int size, u32 *val) in orion_pcie_rd_conf() argument 212 PCIE_CONF_DEV(PCI_SLOT(devfn)) | in orion_pcie_rd_conf() 213 PCIE_CONF_FUNC(PCI_FUNC(devfn)) | in orion_pcie_rd_conf() 228 u32 devfn, int where, int size, u32 *val) in orion_pcie_rd_conf_tlp() argument 231 PCIE_CONF_DEV(PCI_SLOT(devfn)) | in orion_pcie_rd_conf_tlp() 232 PCIE_CONF_FUNC(PCI_FUNC(devfn)) | in orion_pcie_rd_conf_tlp() 239 PCI_FUNC(devfn) != 0) in orion_pcie_rd_conf_tlp() 251 u32 devfn, int where, int size, u32 *val) in orion_pcie_rd_conf_wa() argument 254 PCIE_CONF_DEV(PCI_SLOT(devfn)) | in orion_pcie_rd_conf_wa() 255 PCIE_CONF_FUNC(PCI_FUNC(devfn)) | in orion_pcie_rd_conf_wa() [all …]
|
/linux-4.4.14/include/xen/interface/ |
D | physdev.h | 148 int devfn; member 172 uint8_t devfn; member 179 uint8_t devfn; member 186 uint8_t devfn; member 191 uint8_t devfn; member 256 uint8_t devfn; member 260 uint8_t devfn; member 281 uint8_t devfn; member
|
/linux-4.4.14/drivers/misc/cxl/ |
D | vphb.c | 97 static int cxl_pcie_cfg_record(u8 bus, u8 devfn) in cxl_pcie_cfg_record() argument 99 return (bus << 8) + devfn; in cxl_pcie_cfg_record() 103 u8 bus, u8 devfn, int offset) in cxl_pcie_cfg_addr() argument 105 int record = cxl_pcie_cfg_record(bus, devfn); in cxl_pcie_cfg_addr() 111 static int cxl_pcie_config_info(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_config_info() argument 125 if (cxl_pcie_cfg_record(bus->number, devfn) > afu->crs_num) in cxl_pcie_config_info() 129 addr = cxl_pcie_cfg_addr(phb, bus->number, devfn, offset); in cxl_pcie_config_info() 167 static int cxl_pcie_read_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_read_config() argument 174 rc = cxl_pcie_config_info(bus, devfn, offset, len, &ioaddr, in cxl_pcie_read_config() 187 static int cxl_pcie_write_config(struct pci_bus *bus, unsigned int devfn, in cxl_pcie_write_config() argument [all …]
|
/linux-4.4.14/drivers/pci/pcie/aer/ |
D | aer_inject.c | 51 unsigned int devfn; member 78 unsigned int bus, unsigned int devfn, in aer_error_init() argument 84 err->devfn = devfn; in aer_error_init() 90 unsigned int devfn) in __find_aer_error() argument 97 devfn == err->devfn) in __find_aer_error() 109 return __find_aer_error((u16)domain, dev->bus->number, dev->devfn); in __find_aer_error_by_dev() 184 static int pci_read_aer(struct pci_bus *bus, unsigned int devfn, int where, in pci_read_aer() argument 199 err = __find_aer_error((u16)domain, bus->number, devfn); in pci_read_aer() 212 return ops->read(bus, devfn, where, size, val); in pci_read_aer() 215 static int pci_write_aer(struct pci_bus *bus, unsigned int devfn, int where, in pci_write_aer() argument [all …]
|
D | aerdrv_core.c | 137 if (e_info->id == ((dev->bus->number << 8) | dev->devfn)) in is_error_source() 574 u8 devfn; member 590 void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, in aer_recover_queue() argument 596 .devfn = devfn, in aer_recover_queue() 607 domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); in aer_recover_queue() 619 entry.devfn); in aer_recover_work_func() 623 PCI_SLOT(entry.devfn), PCI_FUNC(entry.devfn)); in aer_recover_work_func()
|
D | aerdrv_acpi.c | 28 p->device == PCI_SLOT(pci->devfn) && in hest_match_pci() 29 p->function == PCI_FUNC(pci->devfn); in hest_match_pci()
|
/linux-4.4.14/arch/microblaze/pci/ |
D | indirect_pci.c | 23 indirect_read_config(struct pci_bus *bus, unsigned int devfn, int offset, in indirect_read_config() argument 34 if (devfn != 0) in indirect_read_config() 52 (devfn << 8) | reg | cfg_type)); in indirect_read_config() 55 (devfn << 8) | reg | cfg_type)); in indirect_read_config() 77 indirect_write_config(struct pci_bus *bus, unsigned int devfn, int offset, in indirect_write_config() argument 88 if (devfn != 0) in indirect_write_config() 106 (devfn << 8) | reg | cfg_type)); in indirect_write_config() 109 (devfn << 8) | reg | cfg_type)); in indirect_write_config()
|
D | xilinx_pci.c | 43 if (dev->devfn || dev->bus->self) in xilinx_pci_fixup_bridge() 75 xilinx_pci_exclude_device(struct pci_controller *hose, u_char bus, u8 devfn) in xilinx_pci_exclude_device() argument
|
/linux-4.4.14/arch/arm/mach-ixp4xx/ |
D | common-pci.c | 169 static u32 ixp4xx_config_addr(u8 bus_num, u16 devfn, int where) in ixp4xx_config_addr() argument 174 addr = BIT(32-PCI_SLOT(devfn)) | ((PCI_FUNC(devfn)) << 8) | in ixp4xx_config_addr() 178 addr = (bus_num << 16) | ((PCI_SLOT(devfn)) << 11) | in ixp4xx_config_addr() 179 ((PCI_FUNC(devfn)) << 8) | (where & ~3) | 1; in ixp4xx_config_addr() 242 static int ixp4xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size, u32… in ixp4xx_pci_read_config() argument 248 bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn)); in ixp4xx_pci_read_config() 256 addr = ixp4xx_config_addr(bus_num, devfn, where); in ixp4xx_pci_read_config() 265 static int ixp4xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size, u… in ixp4xx_pci_write_config() argument 271 size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn)); in ixp4xx_pci_write_config() 278 addr = ixp4xx_config_addr(bus_num, devfn, where); in ixp4xx_pci_write_config()
|
/linux-4.4.14/drivers/pci/host/ |
D | pcie-altera.c | 55 #define TLP_CFG_DW2(bus, devfn, offset) \ argument 56 (((bus) << 24) | ((devfn) << 16) | (offset)) 57 #define TLP_REQ_ID(bus, devfn) (((bus) << 8) | (devfn)) argument 112 static bool altera_pcie_hide_rc_bar(struct pci_bus *bus, unsigned int devfn, in altera_pcie_hide_rc_bar() argument 115 if (pci_is_root_bus(bus) && (devfn == 0) && in altera_pcie_hide_rc_bar() 235 static int tlp_cfg_dword_read(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_read() argument 247 headers[2] = TLP_CFG_DW2(bus, devfn, where); in tlp_cfg_dword_read() 254 static int tlp_cfg_dword_write(struct altera_pcie *pcie, u8 bus, u32 devfn, in tlp_cfg_dword_write() argument 267 headers[2] = TLP_CFG_DW2(bus, devfn, where); in tlp_cfg_dword_write() 289 static int altera_pcie_cfg_read(struct pci_bus *bus, unsigned int devfn, in altera_pcie_cfg_read() argument [all …]
|
D | pci-mvebu.c | 48 #define PCIE_CONF_ADDR(bus, devfn, where) \ argument 49 (PCIE_CONF_BUS(bus) | PCIE_CONF_DEV(PCI_SLOT(devfn)) | \ 50 PCIE_CONF_FUNC(PCI_FUNC(devfn)) | PCIE_CONF_REG(where) | \ 140 int devfn; member 278 u32 devfn, int where, int size, u32 *val) in mvebu_pcie_hw_rd_conf() argument 282 mvebu_writel(port, PCIE_CONF_ADDR(bus->number, devfn, where), in mvebu_pcie_hw_rd_conf() 302 u32 devfn, int where, int size, u32 val) in mvebu_pcie_hw_wr_conf() argument 306 mvebu_writel(port, PCIE_CONF_ADDR(bus->number, devfn, where), in mvebu_pcie_hw_wr_conf() 760 int devfn) in mvebu_pcie_find_port() argument 767 if (bus->number == 0 && port->devfn == devfn) in mvebu_pcie_find_port() [all …]
|
D | pcie-designware.c | 567 u32 devfn, int where, int size, u32 *val) in dw_pcie_rd_other_conf() argument 574 busdev = PCIE_ATU_BUS(bus->number) | PCIE_ATU_DEV(PCI_SLOT(devfn)) | in dw_pcie_rd_other_conf() 575 PCIE_ATU_FUNC(PCI_FUNC(devfn)); in dw_pcie_rd_other_conf() 601 u32 devfn, int where, int size, u32 val) in dw_pcie_wr_other_conf() argument 608 busdev = PCIE_ATU_BUS(bus->number) | PCIE_ATU_DEV(PCI_SLOT(devfn)) | in dw_pcie_wr_other_conf() 609 PCIE_ATU_FUNC(PCI_FUNC(devfn)); in dw_pcie_wr_other_conf() 657 static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, in dw_pcie_rd_conf() argument 663 if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0) { in dw_pcie_rd_conf() 670 ret = pp->ops->rd_other_conf(pp, bus, devfn, in dw_pcie_rd_conf() 673 ret = dw_pcie_rd_other_conf(pp, bus, devfn, in dw_pcie_rd_conf() [all …]
|
D | pci-keystone-dw.c | 364 unsigned int devfn) in ks_pcie_cfg_setup() argument 366 u8 device = PCI_SLOT(devfn), function = PCI_FUNC(devfn); in ks_pcie_cfg_setup() 388 unsigned int devfn, int where, int size, u32 *val) in ks_dw_pcie_rd_other_conf() argument 394 addr = ks_pcie_cfg_setup(ks_pcie, bus_num, devfn); in ks_dw_pcie_rd_other_conf() 400 unsigned int devfn, int where, int size, u32 val) in ks_dw_pcie_wr_other_conf() argument 406 addr = ks_pcie_cfg_setup(ks_pcie, bus_num, devfn); in ks_dw_pcie_wr_other_conf()
|
D | pci-xgene.c | 102 static void xgene_pcie_set_rtdid_reg(struct pci_bus *bus, uint devfn) in xgene_pcie_set_rtdid_reg() argument 109 d = PCI_SLOT(devfn); in xgene_pcie_set_rtdid_reg() 110 f = PCI_FUNC(devfn); in xgene_pcie_set_rtdid_reg() 137 static void __iomem *xgene_pcie_map_bus(struct pci_bus *bus, unsigned int devfn, in xgene_pcie_map_bus() argument 140 if ((pci_is_root_bus(bus) && devfn != 0) || in xgene_pcie_map_bus() 144 xgene_pcie_set_rtdid_reg(bus, devfn); in xgene_pcie_map_bus() 148 static int xgene_pcie_config_read32(struct pci_bus *bus, unsigned int devfn, in xgene_pcie_config_read32() argument 153 if (pci_generic_config_read32(bus, devfn, where & ~0x3, 4, val) != in xgene_pcie_config_read32()
|
D | pci-keystone.h | 48 unsigned int devfn, int where, int size, u32 val); 50 unsigned int devfn, int where, int size, u32 *val);
|
D | pci-host-generic.c | 57 unsigned int devfn, in gen_pci_map_cfg_bus_cam() argument 63 return pci->cfg.win[idx] + ((devfn << 8) | where); in gen_pci_map_cfg_bus_cam() 76 unsigned int devfn, in gen_pci_map_cfg_bus_ecam() argument 82 return pci->cfg.win[idx] + ((devfn << 12) | where); in gen_pci_map_cfg_bus_ecam()
|
D | pci-versatile.c | 55 unsigned int devfn, int offset) in versatile_map_bus() argument 59 if (pci_slot_ignore & (1 << PCI_SLOT(devfn))) in versatile_map_bus() 62 return versatile_cfg_base[1] + ((busnr << 16) | (devfn << 8) | offset); in versatile_map_bus()
|
D | pcie-rcar.c | 187 unsigned int devfn, int where, u32 *data) in rcar_pcie_config_access() argument 191 dev = PCI_SLOT(devfn); in rcar_pcie_config_access() 192 func = PCI_FUNC(devfn); in rcar_pcie_config_access() 264 static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn, in rcar_pcie_read_conf() argument 271 bus, devfn, where, val); in rcar_pcie_read_conf() 283 bus->number, devfn, where, size, (unsigned long)*val); in rcar_pcie_read_conf() 289 static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn, in rcar_pcie_write_conf() argument 297 bus, devfn, where, &data); in rcar_pcie_write_conf() 302 bus->number, devfn, where, size, (unsigned long)val); in rcar_pcie_write_conf() 316 bus, devfn, where, &data); in rcar_pcie_write_conf()
|
D | pcie-designware.h | 62 unsigned int devfn, int where, int size, u32 *val); 64 unsigned int devfn, int where, int size, u32 val);
|
D | pcie-xilinx.c | 168 static bool xilinx_pcie_valid_device(struct pci_bus *bus, unsigned int devfn) in xilinx_pcie_valid_device() argument 178 if (bus->number == port->root_busno && devfn > 0) in xilinx_pcie_valid_device() 185 if (bus->primary == port->root_busno && devfn > 0) in xilinx_pcie_valid_device() 201 unsigned int devfn, int where) in xilinx_pcie_map_bus() argument 206 if (!xilinx_pcie_valid_device(bus, devfn)) in xilinx_pcie_map_bus() 210 (devfn << ECAM_DEV_NUM_SHIFT); in xilinx_pcie_map_bus()
|
/linux-4.4.14/include/uapi/linux/ |
D | pci.h | 31 #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) argument 32 #define PCI_FUNC(devfn) ((devfn) & 0x07) argument
|
/linux-4.4.14/arch/frv/mb93090-mb00/ |
D | pci-vdk.c | 58 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) 96 static int pci_frv_read_config(struct pci_bus *bus, unsigned int devfn, int where, int size, in pci_frv_read_config() argument 101 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_frv_read_config() 105 __set_PciCfgAddr(CONFIG_CMD(bus, devfn, where)); in pci_frv_read_config() 129 static int pci_frv_write_config(struct pci_bus *bus, unsigned int devfn, int where, int size, in pci_frv_write_config() argument 134 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_frv_write_config() 138 __set_PciCfgAddr(CONFIG_CMD(bus, devfn, where)); in pci_frv_write_config() 144 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_frv_write_config() 148 __set_PciCfgAddr(CONFIG_CMD(bus, devfn, where)); in pci_frv_write_config() 154 if (bus->number == 0 && devfn == PCI_DEVFN(0, 0)) { in pci_frv_write_config() [all …]
|
/linux-4.4.14/arch/arm/plat-iop/ |
D | pci.c | 39 static u32 iop3xx_cfg_address(struct pci_bus *bus, int devfn, int where) in iop3xx_cfg_address() argument 45 addr = 1 << (PCI_SLOT(devfn) + 16) | (PCI_SLOT(devfn) << 11); in iop3xx_cfg_address() 47 addr = bus->number << 16 | PCI_SLOT(devfn) << 11 | 1; in iop3xx_cfg_address() 49 addr |= PCI_FUNC(devfn) << 8 | (where & ~3); in iop3xx_cfg_address() 113 iop3xx_read_config(struct pci_bus *bus, unsigned int devfn, int where, in iop3xx_read_config() argument 116 unsigned long addr = iop3xx_cfg_address(bus, devfn, where); in iop3xx_read_config() 128 iop3xx_write_config(struct pci_bus *bus, unsigned int devfn, int where, in iop3xx_write_config() argument 131 unsigned long addr = iop3xx_cfg_address(bus, devfn, where); in iop3xx_write_config()
|
/linux-4.4.14/arch/sh/include/asm/ |
D | pci.h | 47 int bus, int devfn, int offset, u8 *value); 49 int bus, int devfn, int offset, u16 *value); 51 int bus, int devfn, int offset, u32 *value); 53 int bus, int devfn, int offset, u8 value); 55 int bus, int devfn, int offset, u16 value); 57 int bus, int devfn, int offset, u32 value);
|
/linux-4.4.14/arch/arm/mach-footbridge/ |
D | dc21285.c | 40 dc21285_base_address(struct pci_bus *bus, unsigned int devfn) in dc21285_base_address() argument 45 if (PCI_SLOT(devfn) == 0) in dc21285_base_address() 51 devfn -= 1 << 3; in dc21285_base_address() 53 if (devfn < PCI_DEVFN(MAX_SLOTS, 0)) in dc21285_base_address() 54 addr = PCICFG0_BASE | 0xc00000 | (devfn << 8); in dc21285_base_address() 57 addr = PCICFG1_BASE | (bus->number << 16) | (devfn << 8); in dc21285_base_address() 63 dc21285_read_config(struct pci_bus *bus, unsigned int devfn, int where, in dc21285_read_config() argument 66 unsigned long addr = dc21285_base_address(bus, devfn); in dc21285_read_config() 97 dc21285_write_config(struct pci_bus *bus, unsigned int devfn, int where, in dc21285_write_config() argument 100 unsigned long addr = dc21285_base_address(bus, devfn); in dc21285_write_config()
|
/linux-4.4.14/arch/arm/mach-versatile/ |
D | pci.c | 79 unsigned int devfn, int offset) in __pci_addr() argument 90 if (devfn > 255) in __pci_addr() 94 (PCI_SLOT(devfn) << 11) | (PCI_FUNC(devfn) << 8) | offset); in __pci_addr() 97 static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int where, in versatile_read_config() argument 100 void __iomem *addr = __pci_addr(bus, devfn, where & ~3); in versatile_read_config() 102 int slot = PCI_SLOT(devfn); in versatile_read_config() 141 static int versatile_write_config(struct pci_bus *bus, unsigned int devfn, int where, in versatile_write_config() argument 144 void __iomem *addr = __pci_addr(bus, devfn, where); in versatile_write_config() 145 int slot = PCI_SLOT(devfn); in versatile_write_config()
|
/linux-4.4.14/drivers/pci/ |
D | xen-pcifront.c | 177 static int pcifront_bus_read(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_read() argument 185 .devfn = devfn, in pcifront_bus_read() 195 pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), in pcifront_bus_read() 196 PCI_FUNC(devfn), where, size); in pcifront_bus_read() 216 static int pcifront_bus_write(struct pci_bus *bus, unsigned int devfn, in pcifront_bus_write() argument 223 .devfn = devfn, in pcifront_bus_write() 236 PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); in pcifront_bus_write() 256 .devfn = dev->devfn, in pci_frontend_enable_msix() 310 .devfn = dev->devfn, in pci_frontend_disable_msix() 329 .devfn = dev->devfn, in pci_frontend_enable_msi() [all …]
|
D | search.c | 35 ret = fn(pdev, PCI_DEVID(pdev->bus->number, pdev->devfn), data); in pci_for_each_dma_alias() 84 tmp->devfn), data); in pci_for_each_dma_alias() 97 tmp->devfn), data); in pci_for_each_dma_alias() 185 struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn) in pci_get_slot() argument 193 if (dev->devfn == devfn) in pci_get_slot() 221 unsigned int devfn) in pci_get_domain_bus_and_slot() argument 227 (dev->bus->number == bus && dev->devfn == devfn)) in pci_get_domain_bus_and_slot()
|
D | access.c | 30 (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \ 37 res = bus->ops->read(bus, devfn, pos, len, &data); \ 45 (struct pci_bus *bus, unsigned int devfn, int pos, type value) \ 51 res = bus->ops->write(bus, devfn, pos, len, value); \ 70 int pci_generic_config_read(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read() argument 75 addr = bus->ops->map_bus(bus, devfn, where); in pci_generic_config_read() 92 int pci_generic_config_write(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_write() argument 97 addr = bus->ops->map_bus(bus, devfn, where); in pci_generic_config_write() 112 int pci_generic_config_read32(struct pci_bus *bus, unsigned int devfn, in pci_generic_config_read32() argument 117 addr = bus->ops->map_bus(bus, devfn, where & ~0x3); in pci_generic_config_read32() [all …]
|
D | pci-label.c | 47 int devfn; in find_smbios_instance_string() local 50 devfn = pdev->devfn; in find_smbios_instance_string() 57 donboard->devfn == devfn) { in find_smbios_instance_string()
|
D | probe.c | 1203 dev->bus->number, PCI_SLOT(dev->devfn), in pci_setup_device() 1204 PCI_FUNC(dev->devfn)); in pci_setup_device() 1544 bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l, in pci_bus_read_dev_vendor_id() argument 1549 if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, l)) in pci_bus_read_dev_vendor_id() 1569 if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, l)) in pci_bus_read_dev_vendor_id() 1574 pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), in pci_bus_read_dev_vendor_id() 1575 PCI_FUNC(devfn)); in pci_bus_read_dev_vendor_id() 1588 static struct pci_dev *pci_scan_device(struct pci_bus *bus, int devfn) in pci_scan_device() argument 1593 if (!pci_bus_read_dev_vendor_id(bus, devfn, &l, 60*1000)) in pci_scan_device() 1600 dev->devfn = devfn; in pci_scan_device() [all …]
|
D | iov.c | 26 return dev->bus->number + ((dev->devfn + dev->sriov->offset + in pci_iov_virtfn_bus() 34 return (dev->devfn + dev->sriov->offset + in pci_iov_virtfn_devfn() 136 virtfn->devfn = pci_iov_virtfn_devfn(dev, id); in virtfn_add() 289 if (iov->link != dev->devfn) { in sriov_enable() 346 if (iov->link != dev->devfn) in sriov_enable() 372 if (iov->link != dev->devfn) in sriov_disable() 464 iov->link = PCI_DEVFN(PCI_SLOT(dev->devfn), iov->link); in sriov_init()
|
/linux-4.4.14/arch/powerpc/include/asm/ |
D | pci-bridge.h | 154 extern int indirect_read_config(struct pci_bus *bus, unsigned int devfn, 158 unsigned char bus_number, unsigned int devfn, 161 extern int indirect_write_config(struct pci_bus *bus, unsigned int devfn, 172 u8 *bus, u8 *devfn); 196 int devfn; /* pci device and function number */ member 232 int devfn); 239 u8 *bus, u8 *devfn) in pci_device_from_OF_node() argument 244 *devfn = PCI_DN(np)->devfn; in pci_device_from_OF_node()
|
D | tsi108.h | 87 extern int tsi108_direct_write_config(struct pci_bus *bus, unsigned int devfn, 89 extern int tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn,
|
/linux-4.4.14/arch/powerpc/kernel/ |
D | pci_dn.c | 71 int devfn) in pci_get_pdn_by_devfn() argument 79 if (pdev->devfn == devfn) { in pci_get_pdn_by_devfn() 100 pdn->devfn == devfn) in pci_get_pdn_by_devfn() 132 pdn->devfn == pdev->devfn) in pci_get_pdn() 142 int busno, int devfn) in add_one_dev_pci_data() argument 159 pdn->devfn = devfn; in add_one_dev_pci_data() 256 pdn->devfn != pci_iov_virtfn_devfn(pdev, i)) in remove_dev_pci_data() 295 pdn->devfn = (addr >> 8) & 0xff; in update_dn_pci_info() 435 pdn->devfn = pdn->busno = -1; in pci_devs_phb_init_dynamic()
|
D | rtas_pci.c | 74 addr = rtas_config_addr(pdn->busno, pdn->devfn, where); in rtas_read_config() 91 unsigned int devfn, in rtas_pci_read_config() argument 104 if (pdn && pdn->devfn == devfn in rtas_pci_read_config() 137 addr = rtas_config_addr(pdn->busno, pdn->devfn, where); in rtas_write_config() 153 unsigned int devfn, in rtas_pci_write_config() argument 164 if (pdn && pdn->devfn == devfn in rtas_pci_write_config()
|
D | pci_of_scan.c | 125 struct pci_bus *bus, int devfn) in of_create_pci_dev() argument 137 pr_debug(" create device, devfn: %x, type: %s\n", devfn, type); in of_create_pci_dev() 142 dev->devfn = devfn; in of_create_pci_dev() 156 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); in of_create_pci_dev() 308 int reglen, devfn; in of_scan_pci_dev() local 320 devfn = (of_read_number(reg, 1) >> 8) & 0xff; in of_scan_pci_dev() 323 dev = pci_get_slot(bus, devfn); in of_scan_pci_dev() 336 dev = of_create_pci_dev(dn, bus, devfn); in of_scan_pci_dev()
|
D | pci_32.c | 156 int pci_device_from_OF_node(struct device_node *node, u8 *bus, u8 *devfn) in pci_device_from_OF_node() argument 171 *devfn = (be32_to_cpup(®[0]) >> 8) & 0xff; in pci_device_from_OF_node() 183 dev->devfn == *devfn) { in pci_device_from_OF_node() 283 long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn) in sys_pciconfig_iobase() argument
|
/linux-4.4.14/arch/ia64/pci/ |
D | pci.c | 40 #define PCI_SAL_ADDRESS(seg, bus, devfn, reg) \ argument 41 (((u64) seg << 24) | (bus << 16) | (devfn << 8) | (reg)) 45 #define PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg) \ argument 46 (((u64) seg << 28) | (bus << 20) | (devfn << 12) | (reg)) 48 int raw_pci_read(unsigned int seg, unsigned int bus, unsigned int devfn, in raw_pci_read() argument 54 if (!value || (seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) in raw_pci_read() 58 addr = PCI_SAL_ADDRESS(seg, bus, devfn, reg); in raw_pci_read() 61 addr = PCI_SAL_EXT_ADDRESS(seg, bus, devfn, reg); in raw_pci_read() 75 int raw_pci_write(unsigned int seg, unsigned int bus, unsigned int devfn, in raw_pci_write() argument 81 if ((seg > 65535) || (bus > 255) || (devfn > 255) || (reg > 4095)) in raw_pci_write() [all …]
|
/linux-4.4.14/drivers/pci/pcie/ |
D | pme.c | 110 static bool pcie_pme_from_pci_bridge(struct pci_bus *bus, u8 devfn) in pcie_pme_from_pci_bridge() argument 115 if (devfn) in pcie_pme_from_pci_bridge() 140 u8 busnr = req_id >> 8, devfn = req_id & 0xff; in pcie_pme_handle_request() local 146 if (port->devfn == devfn && port->bus->number == busnr) { in pcie_pme_handle_request() 175 found = pcie_pme_from_pci_bridge(bus, devfn); in pcie_pme_handle_request() 183 if (dev->devfn == devfn) { in pcie_pme_handle_request() 202 } else if (devfn) { in pcie_pme_handle_request() 209 busnr, PCI_SLOT(devfn), PCI_FUNC(devfn)); in pcie_pme_handle_request()
|
/linux-4.4.14/arch/arm/mach-cns3xxx/ |
D | pcie.c | 55 unsigned int devfn, int where) in cns3xxx_pci_map_bus() argument 59 int slot = PCI_SLOT(devfn); in cns3xxx_pci_map_bus() 73 if (devfn == 0) /* device# and function# are ignored by hw */ in cns3xxx_pci_map_bus() 86 return base + (where & 0xffc) + (devfn << 12); in cns3xxx_pci_map_bus() 89 static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn, in cns3xxx_pci_read_config() argument 96 ret = pci_generic_config_read32(bus, devfn, where, size, val); in cns3xxx_pci_read_config() 98 if (ret == PCIBIOS_SUCCESSFUL && !bus->number && !devfn && in cns3xxx_pci_read_config() 137 pci_domain_nr(dev->bus), dev->bus->number, PCI_SLOT(dev->devfn), in cns3xxx_pcie_map_irq() 138 PCI_FUNC(dev->devfn), slot, pin, irq); in cns3xxx_pcie_map_irq()
|
/linux-4.4.14/arch/arm/plat-orion/include/plat/ |
D | pcie.h | 25 u32 devfn, int where, int size, u32 *val); 27 u32 devfn, int where, int size, u32 *val); 29 u32 devfn, int where, int size, u32 *val); 31 u32 devfn, int where, int size, u32 val);
|
/linux-4.4.14/drivers/edac/ |
D | amd8131_edac.c | 72 .devfn = DEVFN_PCIX_BRIDGE_NORTH_A, 77 .devfn = DEVFN_PCIX_BRIDGE_NORTH_B, 82 .devfn = DEVFN_PCIX_BRIDGE_SOUTH_A, 87 .devfn = DEVFN_PCIX_BRIDGE_SOUTH_B, 255 if (dev_info->devfn == dev->devfn) in amd8131_probe() 272 dev_info->devfn, dev_info->ctl_name); in amd8131_probe() 308 dev_info->devfn, dev_info->ctl_name); in amd8131_probe() 319 if (dev_info->devfn == dev->devfn) in amd8131_remove()
|
/linux-4.4.14/arch/m68k/coldfire/ |
D | pci.c | 70 static unsigned long mcf_mk_pcicar(int bus, unsigned int devfn, int where) in mcf_mk_pcicar() argument 72 return (bus << PCICAR_BUSN) | (devfn << PCICAR_DEVFNN) | (where & 0xfc); in mcf_mk_pcicar() 75 static int mcf_pci_readconfig(struct pci_bus *bus, unsigned int devfn, in mcf_pci_readconfig() argument 83 if (mcf_host_slot2sid[PCI_SLOT(devfn)] == 0) in mcf_pci_readconfig() 88 addr = mcf_mk_pcicar(bus->number, devfn, where); in mcf_pci_readconfig() 109 static int mcf_pci_writeconfig(struct pci_bus *bus, unsigned int devfn, in mcf_pci_writeconfig() argument 115 if (mcf_host_slot2sid[PCI_SLOT(devfn)] == 0) in mcf_pci_writeconfig() 120 addr = mcf_mk_pcicar(bus->number, devfn, where); in mcf_pci_writeconfig()
|
/linux-4.4.14/arch/arm/mach-iop13xx/ |
D | pci.c | 181 static u32 iop13xx_atux_cfg_address(struct pci_bus *bus, int devfn, int where) in iop13xx_atux_cfg_address() argument 187 addr = 1 << (PCI_SLOT(devfn) + 16) | (PCI_SLOT(devfn) << 11); in iop13xx_atux_cfg_address() 189 addr = bus->number << 16 | PCI_SLOT(devfn) << 11 | 1; in iop13xx_atux_cfg_address() 191 addr |= PCI_FUNC(devfn) << 8 | ((where & 0xff) & ~3); in iop13xx_atux_cfg_address() 204 static u32 iop13xx_atue_cfg_address(struct pci_bus *bus, int devfn, int where) in iop13xx_atue_cfg_address() argument 210 bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); in iop13xx_atue_cfg_address() 212 ((u32) PCI_SLOT(devfn)) << IOP13XX_ATUE_OCCAR_DEV_NUM | in iop13xx_atue_cfg_address() 213 ((u32) PCI_FUNC(devfn)) << IOP13XX_ATUE_OCCAR_FUNC_NUM | in iop13xx_atue_cfg_address() 279 iop13xx_atux_read_config(struct pci_bus *bus, unsigned int devfn, int where, in iop13xx_atux_read_config() argument 282 unsigned long addr = iop13xx_atux_cfg_address(bus, devfn, where); in iop13xx_atux_read_config() [all …]
|
/linux-4.4.14/arch/arm/mach-dove/ |
D | pcie.c | 95 static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, in pcie_rd_conf() argument 103 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) { in pcie_rd_conf() 109 ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val); in pcie_rd_conf() 115 static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, in pcie_wr_conf() argument 123 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) in pcie_wr_conf() 127 ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val); in pcie_wr_conf() 143 if (dev->bus->parent == NULL && dev->devfn == 0) { in rc_pci_fixup()
|
/linux-4.4.14/drivers/of/ |
D | of_pci.c | 13 int devfn; in __of_pci_pci_compare() local 15 devfn = of_pci_get_devfn(node); in __of_pci_pci_compare() 16 if (devfn < 0) in __of_pci_pci_compare() 19 return devfn == data; in __of_pci_pci_compare() 23 unsigned int devfn) in of_pci_find_child_device() argument 28 if (__of_pci_pci_compare(node, devfn)) in of_pci_find_child_device() 37 if (__of_pci_pci_compare(node2, devfn)) { in of_pci_find_child_device()
|
/linux-4.4.14/arch/arm/common/ |
D | it8152.c | 164 unsigned int devfn) in it8152_pci_dev_base_address() argument 169 if (devfn < PCI_DEVFN(MAX_SLOTS, 0)) in it8152_pci_dev_base_address() 170 addr = (devfn << 8); in it8152_pci_dev_base_address() 172 addr = (bus->number << 16) | (devfn << 8); in it8152_pci_dev_base_address() 178 unsigned int devfn, int where, in it8152_pci_read_config() argument 181 unsigned long addr = it8152_pci_dev_base_address(bus, devfn); in it8152_pci_read_config() 196 unsigned int devfn, int where, in it8152_pci_write_config() argument 199 unsigned long addr = it8152_pci_dev_base_address(bus, devfn); in it8152_pci_write_config()
|
/linux-4.4.14/drivers/acpi/ |
D | reboot.c | 11 unsigned int devfn; in acpi_reboot() local 40 devfn = PCI_DEVFN((rr->address >> 32) & 0xffff, in acpi_reboot() 44 pci_bus_write_config_byte(bus0, devfn, in acpi_reboot()
|
/linux-4.4.14/arch/arm/mach-mv78xx0/ |
D | pcie.c | 137 static int pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where, in pcie_rd_conf() argument 145 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) { in pcie_rd_conf() 151 ret = orion_pcie_rd_conf(pp->base, bus, devfn, where, size, val); in pcie_rd_conf() 157 static int pcie_wr_conf(struct pci_bus *bus, u32 devfn, in pcie_wr_conf() argument 165 if (pcie_valid_config(pp, bus->number, PCI_SLOT(devfn)) == 0) in pcie_wr_conf() 169 ret = orion_pcie_wr_conf(pp->base, bus, devfn, where, size, val); in pcie_wr_conf() 185 if (dev->bus->parent == NULL && dev->devfn == 0) { in rc_pci_fixup()
|
/linux-4.4.14/arch/powerpc/platforms/chrp/ |
D | pci.c | 33 int gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off, in gg2_read_config() argument 45 cfg_data = hose->cfg_data + ((bus->number<<16) | (devfn<<8) | off); in gg2_read_config() 60 int gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off, in gg2_write_config() argument 72 cfg_data = hose->cfg_data + ((bus->number<<16) | (devfn<<8) | off); in gg2_write_config() 96 int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset, in rtas_read_config() argument 100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) in rtas_read_config() 111 int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset, in rtas_write_config() argument 115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) in rtas_write_config()
|
/linux-4.4.14/arch/ia64/sn/kernel/ |
D | io_acpi_init.c | 38 unsigned int devfn; member 244 unsigned int devfn; in get_host_devfn() local 287 devfn = PCI_DEVFN(slot, function); in get_host_devfn() 288 return devfn; in get_host_devfn() 306 unsigned int devfn; in find_matching_device() local 337 devfn = PCI_DEVFN(slot, function); in find_matching_device() 338 if ((info->devfn == devfn) && (info->bus == bbn)) { in find_matching_device() 391 pcidev_match.devfn = dev->devfn; in sn_acpi_get_pcidev_info()
|
/linux-4.4.14/drivers/hwmon/ |
D | fam15h_power.c | 71 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5), in show_power() 88 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5), in show_power() 153 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 3), in should_load_on_this_node() 184 PCI_DEVFN(PCI_SLOT(pdev->devfn), 5), in tweak_runavg_range() 192 PCI_DEVFN(PCI_SLOT(pdev->devfn), 5), in tweak_runavg_range() 217 pci_bus_read_config_dword(f4->bus, PCI_DEVFN(PCI_SLOT(f4->devfn), 5), in fam15h_power_init_data()
|
D | k10temp.c | 64 static void amd_nb_smu_index_read(struct pci_dev *pdev, unsigned int devfn, in amd_nb_smu_index_read() argument 68 pci_bus_write_config_dword(pdev->bus, devfn, in amd_nb_smu_index_read() 70 pci_bus_read_config_dword(pdev->bus, devfn, in amd_nb_smu_index_read() 170 PCI_DEVFN(PCI_SLOT(pdev->devfn), 2), in has_erratum_319()
|
/linux-4.4.14/arch/parisc/kernel/ |
D | drivers.c | 298 unsigned int devfn = to_pci_dev(dev)->devfn; in get_node_path() local 299 path->mod = PCI_FUNC(devfn); in get_node_path() 300 path->bc[i--] = PCI_SLOT(devfn); in get_node_path() 306 unsigned int devfn = to_pci_dev(dev)->devfn; in get_node_path() local 307 path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn)<< 5); in get_node_path() 646 unsigned int devfn = pdev->devfn; in match_pci_device() local 647 return ((modpath->bc[5] == PCI_SLOT(devfn)) && in match_pci_device() 648 (modpath->mod == PCI_FUNC(devfn))); in match_pci_device() 651 id = PCI_SLOT(pdev->devfn) | (PCI_FUNC(pdev->devfn) << 5); in match_pci_device()
|
/linux-4.4.14/include/linux/ |
D | pci.h | 49 #define PCI_DEVID(bus, devfn) ((((u16)(bus)) << 8) | (devfn)) argument 267 unsigned int devfn; /* encoded device & function index */ member 582 void __iomem *(*map_bus)(struct pci_bus *bus, unsigned int devfn, int where); 583 int (*read)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val); 584 int (*write)(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val); 591 int raw_pci_read(unsigned int domain, unsigned int bus, unsigned int devfn, 593 int raw_pci_write(unsigned int domain, unsigned int bus, unsigned int devfn, 825 int pci_scan_slot(struct pci_bus *bus, int devfn); 826 struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn); 872 struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); [all …]
|
D | of_pci.h | 14 unsigned int devfn); 27 unsigned int devfn) in of_pci_find_child_device() argument
|
/linux-4.4.14/arch/tile/kernel/ |
D | pci.c | 350 (PCI_SLOT(dev->devfn) == 0)) { in pcibios_init() 463 static int tile_cfg_read(struct pci_bus *bus, unsigned int devfn, int offset, in tile_cfg_read() argument 468 int slot = (devfn >> 3) & 0x1f; in tile_cfg_read() 469 int function = devfn & 0x7; in tile_cfg_read() 506 static int tile_cfg_write(struct pci_bus *bus, unsigned int devfn, int offset, in tile_cfg_write() argument 511 int slot = (devfn >> 3) & 0x1f; in tile_cfg_write() 512 int function = devfn & 0x7; in tile_cfg_write()
|
/linux-4.4.14/arch/powerpc/platforms/86xx/ |
D | mpc86xx_hpcn.c | 48 u_char bus, u_char devfn); 51 u_char bus, u_char devfn) in mpc86xx_exclude_device() argument 54 return uli_exclude_device(hose, bus, devfn); in mpc86xx_exclude_device()
|
/linux-4.4.14/drivers/ssb/ |
D | driver_gige.c | 110 static int ssb_gige_pci_read_config(struct pci_bus *bus, unsigned int devfn, in ssb_gige_pci_read_config() argument 116 if ((PCI_SLOT(devfn) > 0) || (PCI_FUNC(devfn) > 0)) in ssb_gige_pci_read_config() 140 static int ssb_gige_pci_write_config(struct pci_bus *bus, unsigned int devfn, in ssb_gige_pci_write_config() argument 146 if ((PCI_SLOT(devfn) > 0) || (PCI_FUNC(devfn) > 0)) in ssb_gige_pci_write_config()
|
D | driver_pcicore.c | 204 static int ssb_pcicore_read_config(struct pci_bus *bus, unsigned int devfn, in ssb_pcicore_read_config() argument 211 err = ssb_extpci_read_config(extpci_core, bus->number, PCI_SLOT(devfn), in ssb_pcicore_read_config() 212 PCI_FUNC(devfn), reg, val, size); in ssb_pcicore_read_config() 218 static int ssb_pcicore_write_config(struct pci_bus *bus, unsigned int devfn, in ssb_pcicore_write_config() argument 225 err = ssb_extpci_write_config(extpci_core, bus->number, PCI_SLOT(devfn), in ssb_pcicore_write_config() 226 PCI_FUNC(devfn), reg, &val, size); in ssb_pcicore_write_config() 284 if (dev->bus->number != 0 || PCI_SLOT(dev->devfn) != 0) in ssb_pcicore_fixup_pcibridge()
|
/linux-4.4.14/drivers/isdn/hardware/eicon/ |
D | divasmain.c | 211 return ((byte) pdev->devfn); in diva_os_get_pci_func() 699 pdev->bus->number, pdev->devfn)) in divas_init_one() 702 pdev->bus->number, pdev->devfn); in divas_init_one() 709 pdev->devfn)) in divas_init_one() 715 pdev->devfn); in divas_init_one() 724 DRIVERLNAME, pdev->bus->number, pdev->devfn)) in divas_init_one() 727 DRIVERLNAME, pdev->bus->number, pdev->devfn); in divas_init_one() 736 pdev->devfn)) in divas_init_one() 742 pdev->devfn); in divas_init_one() 756 pdev->bus->number, pdev->devfn)) in divas_remove_one() [all …]
|
/linux-4.4.14/arch/arm/mach-ks8695/ |
D | pci.c | 42 static void ks8695_pci_setupconfig(unsigned int bus_nr, unsigned int devfn, unsigned int where) in ks8695_pci_setupconfig() argument 47 pbca |= PCI_SLOT(devfn) << 11 ; in ks8695_pci_setupconfig() 48 pbca |= PCI_FUNC(devfn) << 8; in ks8695_pci_setupconfig() 60 static void __iomem *ks8695_pci_map_bus(struct pci_bus *bus, unsigned int devfn, in ks8695_pci_map_bus() argument 63 ks8695_pci_setupconfig(bus->number, devfn, where); in ks8695_pci_map_bus()
|
/linux-4.4.14/arch/arm/mach-integrator/ |
D | pci_v3.c | 364 unsigned int devfn, int offset) in v3_open_config_window() argument 375 BUG_ON(devfn > 255); in v3_open_config_window() 378 int slot = PCI_SLOT(devfn); in v3_open_config_window() 390 address = PCI_FUNC(devfn) << 8; in v3_open_config_window() 417 address = (busnr << 16) | (devfn << 8); in v3_open_config_window() 456 static int v3_read_config(struct pci_bus *bus, unsigned int devfn, int where, in v3_read_config() argument 459 int ret = pci_generic_config_read(bus, devfn, where, size, val); in v3_read_config() 464 static int v3_write_config(struct pci_bus *bus, unsigned int devfn, int where, in v3_write_config() argument 467 int ret = pci_generic_config_write(bus, devfn, where, size, val); in v3_write_config()
|
/linux-4.4.14/drivers/iommu/ |
D | intel-iommu.c | 421 u8 devfn; /* PCI devfn number */ member 837 u8 bus, u8 devfn, int alloc) in iommu_context_addr() argument 845 if (devfn >= 0x80) { in iommu_context_addr() 846 devfn -= 0x80; in iommu_context_addr() 849 devfn *= 2; in iommu_context_addr() 867 return &context[devfn]; in iommu_context_addr() 875 static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn) in device_to_iommu() argument 902 *devfn = drhd->devices[i].devfn; in device_to_iommu() 919 *devfn = pdev->devfn; in device_to_iommu() 937 static int device_context_mapped(struct intel_iommu *iommu, u8 bus, u8 devfn) in device_context_mapped() argument [all …]
|
/linux-4.4.14/drivers/pcmcia/ |
D | ti113x.h | 240 if(PCI_FUNC(socket->dev->devfn)==1) in ti1250_zoom_video() 487 func0 = pci_get_slot(socket->dev->bus, socket->dev->devfn & ~0x07); in ti12xx_align_irqs() 655 int devfn; in ti12xx_2nd_slot_empty() local 706 devfn = socket->dev->devfn & ~0x07; in ti12xx_2nd_slot_empty() 708 (socket->dev->devfn & 0x07) ? devfn : devfn | 0x01); in ti12xx_2nd_slot_empty() 789 if ((PCI_FUNC(socket->dev->devfn) == 0) || in ti12xx_power_hook() 848 if (disable_clkrun && PCI_FUNC(socket->dev->devfn) == 0) { in ti12xx_override() 871 if (PCI_FUNC(socket->dev->devfn) == 0) in ti12xx_override()
|
/linux-4.4.14/arch/arm/mach-sa1100/ |
D | pci-nanoengine.c | 33 unsigned int devfn, int where) in nanoengine_pci_map_bus() argument 35 if (bus->number != 0 || (devfn >> 3) != 0) in nanoengine_pci_map_bus() 39 ((bus->number << 16) | (devfn << 8) | (where & ~3)); in nanoengine_pci_map_bus()
|
/linux-4.4.14/arch/powerpc/platforms/ |
D | fsl_uli1575.c | 348 u_char bus, u_char devfn) in uli_exclude_device() argument 352 if ((PCI_SLOT(devfn) == 29) && (PCI_FUNC(devfn) == 1)) in uli_exclude_device() 356 if ((PCI_SLOT(devfn) == 29) && (PCI_FUNC(devfn) == 2)) in uli_exclude_device()
|
/linux-4.4.14/arch/powerpc/platforms/52xx/ |
D | efika.c | 35 static int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset, in rtas_read_config() argument 39 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) in rtas_read_config() 50 static int rtas_write_config(struct pci_bus *bus, unsigned int devfn, in rtas_write_config() argument 54 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) in rtas_write_config()
|
D | mpc52xx_pci.c | 107 mpc52xx_pci_read_config(struct pci_bus *bus, unsigned int devfn, in mpc52xx_pci_read_config() argument 114 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) in mpc52xx_pci_read_config() 120 (devfn << 8) | in mpc52xx_pci_read_config() 164 mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, in mpc52xx_pci_write_config() argument 171 if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) in mpc52xx_pci_write_config() 177 (devfn << 8) | in mpc52xx_pci_write_config()
|
/linux-4.4.14/drivers/ide/ |
D | cy82c693.c | 94 dev = pci_get_slot(dev->bus, dev->devfn+1); in cy82c693_set_pio_mode() 153 if (PCI_FUNC(dev->devfn) == 1) in init_iops_cy82c693() 185 PCI_FUNC(dev->devfn) == 1) { in cy82c693_init_one() 186 dev2 = pci_get_slot(dev->bus, dev->devfn + 1); in cy82c693_init_one()
|
D | ide-pci-generic.c | 118 !(PCI_FUNC(dev->devfn) & 1)) in generic_init_one() 123 !(PCI_FUNC(dev->devfn) & 1)) in generic_init_one() 128 PCI_FUNC(dev->devfn) != 1) in generic_init_one()
|
/linux-4.4.14/drivers/gpu/drm/ |
D | drm_pci.c | 137 PCI_SLOT(dev->pdev->devfn), in drm_pci_set_busid() 138 PCI_FUNC(dev->pdev->devfn)); in drm_pci_set_busid() 181 (slot != PCI_SLOT(dev->pdev->devfn)) || in drm_pci_set_unique() 182 (func != PCI_FUNC(dev->pdev->devfn))) { in drm_pci_set_unique() 195 p->devnum != PCI_SLOT(dev->pdev->devfn) || p->funcnum != PCI_FUNC(dev->pdev->devfn)) in drm_pci_irq_by_busid()
|
/linux-4.4.14/drivers/infiniband/hw/nes/ |
D | nes.c | 174 NES_IDX_DST_IP_ADDR+(0x10*PCI_FUNC(nesdev->pcidev->devfn)), 0); in nes_inetaddr_event() 201 NES_IDX_DST_IP_ADDR+(0x10*PCI_FUNC(nesdev->pcidev->devfn)), in nes_inetaddr_event() 553 nesdev->index_reg = 0x50 + (PCI_FUNC(pcidev->devfn)*8) + mmio_regs; in nes_probe() 590 switch (PCI_FUNC(nesdev->pcidev->devfn) % in nes_probe() 606 nesdev->mac_index = PCI_FUNC(nesdev->pcidev->devfn) % in nes_probe() 632 PCI_FUNC(nesdev->pcidev->devfn)); in nes_probe() 636 nesdev->int_req = (0x101 << PCI_FUNC(nesdev->pcidev->devfn)) | in nes_probe() 637 (1 << (PCI_FUNC(nesdev->pcidev->devfn)+16)); in nes_probe() 638 if (PCI_FUNC(nesdev->pcidev->devfn) < 4) { in nes_probe() 643 if (PCI_FUNC(nesdev->pcidev->devfn) == 0) { in nes_probe() [all …]
|
/linux-4.4.14/arch/arm64/kernel/ |
D | pci.c | 68 unsigned int devfn, int reg, int len, u32 *val) in raw_pci_read() argument 74 unsigned int devfn, int reg, int len, u32 val) in raw_pci_write() argument
|
/linux-4.4.14/include/xen/interface/io/ |
D | pciif.h | 79 uint32_t devfn; member 103 uint32_t devfn; member
|
/linux-4.4.14/arch/powerpc/platforms/85xx/ |
D | mpc85xx_cds.c | 75 u_char bus, u_char devfn) in mpc85xx_exclude_device() argument 78 if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) in mpc85xx_exclude_device() 80 if ((bus == 0) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) in mpc85xx_exclude_device() 146 if (PCI_FUNC(dev->devfn) == 3) in mpc85xx_cds_pci_irq_fixup()
|
D | mpc85xx_ds.c | 117 u_char bus, u_char devfn); 122 u_char bus, u_char devfn) in mpc85xx_exclude_device() argument 125 return uli_exclude_device(hose, bus, devfn); in mpc85xx_exclude_device()
|
/linux-4.4.14/arch/powerpc/platforms/82xx/ |
D | pq2.c | 39 u_char bus, u8 devfn) in pq2_pci_exclude_device() argument 41 if (bus == 0 && PCI_SLOT(devfn) == 0) in pq2_pci_exclude_device()
|
/linux-4.4.14/drivers/bcma/ |
D | driver_pci_host.c | 231 unsigned int devfn, in bcma_core_pci_hostmode_read_config() argument 243 err = bcma_extpci_read_config(pc, PCI_SLOT(devfn), in bcma_core_pci_hostmode_read_config() 244 PCI_FUNC(devfn), reg, val, size); in bcma_core_pci_hostmode_read_config() 251 unsigned int devfn, in bcma_core_pci_hostmode_write_config() argument 263 err = bcma_extpci_write_config(pc, PCI_SLOT(devfn), in bcma_core_pci_hostmode_write_config() 264 PCI_FUNC(devfn), reg, &val, size); in bcma_core_pci_hostmode_write_config() 536 if (PCI_SLOT(dev->devfn) != 0) in bcma_core_pci_fixup_pcibridge() 563 if (PCI_SLOT(dev->devfn) == 0) in bcma_core_pci_fixup_addresses()
|
/linux-4.4.14/drivers/parisc/ |
D | dino.c | 173 static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where, in dino_cfg_read() argument 178 u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); in dino_cfg_read() 182 DBG("%s: %p, %d, %d, %d\n", __func__, base_addr, devfn, where, in dino_cfg_read() 208 static int dino_cfg_write(struct pci_bus *bus, unsigned int devfn, int where, in dino_cfg_write() argument 213 u32 v = DINO_CFG_TOK(local_bus, devfn, where & ~3); in dino_cfg_write() 217 DBG("%s: %p, %d, %d, %d\n", __func__, base_addr, devfn, where, in dino_cfg_write() 522 dino_cfg_write(dev->bus, dev->devfn, in dino_card_fixup() 534 dino_cfg_read(dev->bus, dev->devfn, PCI_INTERRUPT_PIN, 1, &irq_pin); in dino_card_fixup() 540 dino_cfg_write(dev->bus, dev->devfn, PCI_INTERRUPT_LINE, 1, dev->irq); in dino_card_fixup() 623 dino_cfg_read(dev->bus, dev->devfn, in dino_fixup_bus() [all …]
|
D | lba_pci.c | 364 static int elroy_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) in elroy_cfg_read() argument 368 u32 tok = LBA_CFG_TOK(local_bus, devfn); in elroy_cfg_read() 371 if ((pos > 255) || (devfn > 255)) in elroy_cfg_read() 383 if (LBA_SKIP_PROBE(d) && !lba_device_present(bus->busn_res.start, devfn, d)) { in elroy_cfg_read() 431 static int elroy_cfg_write(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 data) in elroy_cfg_write() argument 435 u32 tok = LBA_CFG_TOK(local_bus,devfn); in elroy_cfg_write() 437 if ((pos > 255) || (devfn > 255)) in elroy_cfg_write() 447 if (LBA_SKIP_PROBE(d) && (!lba_device_present(bus->busn_res.start, devfn, d))) { in elroy_cfg_write() 481 static int mercury_cfg_read(struct pci_bus *bus, unsigned int devfn, int pos, int size, u32 *data) in mercury_cfg_read() argument 485 u32 tok = LBA_CFG_TOK(local_bus, devfn); in mercury_cfg_read() [all …]
|
/linux-4.4.14/arch/x86/include/asm/ |
D | pci_x86.h | 64 u8 bus, devfn; /* Bus, device and function */ member 99 int (*read)(unsigned int domain, unsigned int bus, unsigned int devfn, 101 int (*write)(unsigned int domain, unsigned int bus, unsigned int devfn,
|
D | amd_nb.h | 93 PCI_SLOT(misc->devfn) == PCI_SLOT(pdev->devfn)) in amd_pci_dev_to_node_id()
|
/linux-4.4.14/arch/arm/mach-iop33x/ |
D | iq80332.c | 75 PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); in iq80332_pci_map_irq()
|
D | iq80331.c | 75 PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn)); in iq80331_pci_map_irq()
|
/linux-4.4.14/arch/powerpc/boot/ |
D | mv64x60.h | 48 u32 mv64x60_cfg_read(u8 *bridge_base, u8 hose, u8 bus, u8 devfn, 50 void mv64x60_cfg_write(u8 *bridge_base, u8 hose, u8 bus, u8 devfn,
|
/linux-4.4.14/arch/powerpc/platforms/powernv/ |
D | pci.c | 411 (pdn->busno << 8) | (pdn->devfn), pe_no, fstate); in pnv_pci_config_check_eeh() 432 u32 bdfn = (pdn->busno << 8) | pdn->devfn; in pnv_pci_cfg_read() 460 __func__, pdn->busno, pdn->devfn, where, size, *val); in pnv_pci_cfg_read() 468 u32 bdfn = (pdn->busno << 8) | pdn->devfn; in pnv_pci_cfg_write() 471 pdn->busno, pdn->devfn, where, size, val); in pnv_pci_cfg_write() 520 unsigned int devfn, in pnv_pci_read_config() argument 528 pdn = pci_get_pdn_by_devfn(bus, devfn); in pnv_pci_read_config() 549 unsigned int devfn, in pnv_pci_write_config() argument 556 pdn = pci_get_pdn_by_devfn(bus, devfn); in pnv_pci_write_config() 758 (pdev->devfn & 0xff))) { in pnv_pci_dma_dev_setup()
|
/linux-4.4.14/arch/xtensa/lib/ |
D | pci-auto.c | 135 pciauto_setup_irq(struct pci_controller* pci_ctrl,struct pci_dev *dev,int devfn) in pciauto_setup_irq() argument 148 irq = pci_ctrl->map_irq(dev, PCI_SLOT(devfn), pin); in pciauto_setup_irq() 271 pciauto_dev.devfn = pci_devfn; in pciauto_bus_scan()
|
/linux-4.4.14/drivers/scsi/snic/ |
D | snic_main.c | 369 pdev->bus->number, PCI_SLOT(pdev->devfn), in snic_probe() 370 PCI_FUNC(pdev->devfn)); in snic_probe() 391 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); in snic_probe() 763 pdev->bus->number, PCI_SLOT(pdev->devfn), in snic_probe() 764 PCI_FUNC(pdev->devfn)); in snic_probe() 782 pdev->bus->number, PCI_SLOT(pdev->devfn), in snic_remove() 783 PCI_FUNC(pdev->devfn)); in snic_remove()
|
/linux-4.4.14/arch/powerpc/platforms/embedded6xx/ |
D | mpc7448_hpc2.c | 57 u_char bus, u_char devfn) in mpc7448_hpc2_exclude_device() argument 59 if (bus == 0 && PCI_SLOT(devfn) == 0) in mpc7448_hpc2_exclude_device()
|
/linux-4.4.14/drivers/spi/ |
D | spi-pxa2xx-pci.c | 127 c->num_chipselect : dev->devfn; in pxa2xx_spi_pci_probe() 129 dma_dev = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn), 0)); in pxa2xx_spi_pci_probe() 160 ssp->port_id = (c->port_id >= 0) ? c->port_id : dev->devfn; in pxa2xx_spi_pci_probe()
|
/linux-4.4.14/drivers/i2c/busses/ |
D | i2c-i801.c | 1175 unsigned int devfn; in i801_add_tco() local 1198 devfn = PCI_DEVFN(PCI_SLOT(pci_dev->devfn), 2); in i801_add_tco() 1199 pci_bus_read_config_dword(pci_dev->bus, devfn, ACPIBASE, &base_addr); in i801_add_tco() 1209 pci_bus_read_config_dword(pci_dev->bus, devfn, ACPICTRL, &ctrl_val); in i801_add_tco() 1211 pci_bus_write_config_dword(pci_dev->bus, devfn, ACPICTRL, ctrl_val); in i801_add_tco() 1221 devfn = PCI_DEVFN(PCI_SLOT(pci_dev->devfn), 1); in i801_add_tco() 1224 pci_bus_write_config_byte(pci_dev->bus, devfn, 0xe1, 0x0); in i801_add_tco() 1226 pci_bus_read_config_dword(pci_dev->bus, devfn, SBREG_BAR, &base_addr); in i801_add_tco() 1229 pci_bus_read_config_dword(pci_dev->bus, devfn, SBREG_BAR + 0x4, &base_addr); in i801_add_tco() 1233 pci_bus_write_config_byte(pci_dev->bus, devfn, 0xe1, 0x1); in i801_add_tco()
|
/linux-4.4.14/drivers/media/pci/mantis/ |
D | mantis_pci.c | 60 PCI_SLOT(mantis->pdev->devfn), in mantis_pci_init() 61 PCI_FUNC(mantis->pdev->devfn)); in mantis_pci_init()
|