/linux-master/arch/mips/pci/ |
H A D | pci-lantiq.h | 12 unsigned int devfn, int where, int size, u32 *val); 14 unsigned int devfn, int where, int size, u32 val);
|
H A D | ops-rc32434.c | 47 struct pci_bus *bus, unsigned int devfn, 50 unsigned int slot = PCI_SLOT(devfn); 51 u8 func = PCI_FUNC(devfn); 72 static int read_config_byte(struct pci_bus *bus, unsigned int devfn, argument 78 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); 83 static int read_config_word(struct pci_bus *bus, unsigned int devfn, argument 89 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); 94 static int read_config_dword(struct pci_bus *bus, unsigned int devfn, argument 104 if (bus->number == 0 && PCI_SLOT(devfn) > 21) 108 ret = config_access(PCI_ACCESS_READ, bus, devfn, wher 46 config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, unsigned char where, u32 *data) argument 129 write_config_byte(struct pci_bus *bus, unsigned int devfn, int where, u8 val) argument 148 write_config_word(struct pci_bus *bus, unsigned int devfn, int where, u16 val) argument 168 write_config_dword(struct pci_bus *bus, unsigned int devfn, int where, u32 val) argument 177 pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) argument 190 pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) argument [all...] |
H A D | ops-sni.c | 24 static int set_config_address(unsigned int busno, unsigned int devfn, int reg) argument 26 if ((devfn > 255) || (reg > 255)) 29 if (busno == 0 && devfn >= PCI_DEVFN(8, 0)) 34 ((devfn & 0xff) << 8) | 40 static int pcimt_read(struct pci_bus *bus, unsigned int devfn, int reg, argument 45 if ((res = set_config_address(bus->number, devfn, reg))) 63 static int pcimt_write(struct pci_bus *bus, unsigned int devfn, int reg, argument 68 if ((res = set_config_address(bus->number, devfn, reg))) 91 static int pcit_set_config_address(unsigned int busno, unsigned int devfn, int reg) argument 93 if ((devfn > 25 100 pcit_read(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 * val) argument 137 pcit_write(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 val) argument [all...] |
H A D | ops-gt64xxx_pci0.c | 31 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) 36 if ((busnum == 0) && (devfn >= PCI_DEVFN(31, 0))) 46 (devfn << GT_PCI0_CFGADDR_FUNCTNUM_SHF) | 51 if (busnum == 0 && PCI_SLOT(devfn) == 0) { 60 if (busnum == 0 && PCI_SLOT(devfn) == 0) { 91 static int gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn, argument 96 if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, 110 static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, argument 119 devfn, where, &data)) 130 if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, 30 gt64xxx_pci0_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) argument [all...] |
H A D | ops-loongson2.c | 34 unsigned int devfn, int where, 41 int device = PCI_SLOT(devfn); 42 int function = PCI_FUNC(devfn); 118 static int loongson_pcibios_read(struct pci_bus *bus, unsigned int devfn, argument 128 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, 142 static int loongson_pcibios_write(struct pci_bus *bus, unsigned int devfn, argument 155 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, 167 if (loongson_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, 187 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); local 191 loongson_pcibios_write(&bus, devfn, PCI_MSR_ADD 32 loongson_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 *data) argument 203 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); local [all...] |
H A D | ops-mace.c | 30 static inline int mkaddr(struct pci_bus *bus, unsigned int devfn, argument 34 ((devfn & 0xff) << 8) | 40 mace_pci_read_config(struct pci_bus *bus, unsigned int devfn, argument 47 mace->pci.config_addr = mkaddr(bus, devfn, reg); 67 (devfn == (1 << 3) || devfn == (2 << 3))) 76 mace_pci_write_config(struct pci_bus *bus, unsigned int devfn, argument 79 mace->pci.config_addr = mkaddr(bus, devfn, reg);
|
H A D | ops-msc.c | 34 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) 45 (PCI_SLOT(devfn) << MSC01_PCI_CFGADDR_DNUM_SHF) | 46 (PCI_FUNC(devfn) << MSC01_PCI_CFGADDR_FNUM_SHF) | 75 static int msc_pcibios_read(struct pci_bus *bus, unsigned int devfn, argument 85 if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, 99 static int msc_pcibios_write(struct pci_bus *bus, unsigned int devfn, argument 112 if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, 124 if (msc_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, 33 msc_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) argument
|
H A D | ops-lantiq.c | 27 unsigned int devfn, unsigned int where, u32 *data) 35 if ((bus->number != 0) || ((devfn & 0xf8) > 0x78) 36 || ((devfn & 0xf8) == 0) || ((devfn & 0xf8) == 0x68)) 42 cfg_base |= (bus->number << LTQ_PCI_CFG_BUSNUM_SHF) | (devfn << 71 int ltq_pci_read_config_dword(struct pci_bus *bus, unsigned int devfn, argument 76 if (ltq_pci_config_access(PCI_ACCESS_READ, bus, devfn, where, &data)) 89 int ltq_pci_write_config_dword(struct pci_bus *bus, unsigned int devfn, argument 98 devfn, where, &data)) 109 if (ltq_pci_config_access(PCI_ACCESS_WRITE, bus, devfn, wher 26 ltq_pci_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, unsigned int where, u32 *data) argument [all...] |
H A D | fixup-rc32434.c | 43 if (dev->bus->number < 2 && PCI_SLOT(dev->devfn) < 12) 44 irq = irq_map[dev->bus->number][PCI_SLOT(dev->devfn)]; 51 if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) {
|
/linux-master/include/uapi/linux/ |
H A D | pci.h | 32 #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) 33 #define PCI_FUNC(devfn) ((devfn) & 0x07)
|
/linux-master/arch/x86/pci/ |
H A D | legacy.c | 40 int devfn; local 46 for (devfn = 0; devfn < 256; devfn += stride) { 47 if (!raw_pci_read(0, busn, devfn, PCI_VENDOR_ID, 2, &l) && 49 DBG("Found device at %02x:%02x [%04x]\n", busn, devfn, l);
|
H A D | numachip.c | 19 static inline char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) argument 24 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); 29 unsigned int devfn, int reg, int len, u32 *value) 34 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { 40 if (unlikely(bus == 0 && devfn >= limit)) { 46 addr = pci_dev_base(seg, bus, devfn); 69 unsigned int devfn, int reg, int len, u32 value) 74 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) 78 if (unlikely(bus == 0 && devfn >= limit)) 82 addr = pci_dev_base(seg, bus, devfn); 28 pci_mmcfg_read_numachip(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) argument 68 pci_mmcfg_write_numachip(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) argument [all...] |
H A D | intel_mid_pci.c | 60 * @devfn: device in question 62 * Look for the fixed BAR cap on @bus and @devfn, returning its offset 65 static int fixed_bar_cap(struct pci_bus *bus, unsigned int devfn) argument 77 devfn, pos, 4, &pcie_cap)) 86 devfn, pos + 4, 4, &cap_data); local 97 static int pci_device_update_fixed(struct pci_bus *bus, unsigned int devfn, argument 110 raw_pci_ext_ops->read(domain, busnum, devfn, 133 return raw_pci_ext_ops->write(domain, busnum, devfn, reg, 4, 138 return raw_pci_ext_ops->write(domain, busnum, devfn, reg, len, val); 144 * @devfn 152 type1_access_ok(unsigned int bus, unsigned int devfn, int reg) argument 171 pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) argument 181 pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value) argument [all...] |
H A D | mmconfig_32.c | 27 static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) argument 39 static void pci_exp_set_dev_base(unsigned int base, int bus, int devfn) argument 41 u32 dev_base = base | PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12); 52 unsigned int devfn, int reg, int len, u32 *value) 57 if ((bus > 255) || (devfn > 255) || (reg > 4095)) { 63 base = get_base_addr(seg, bus, devfn); 71 pci_exp_set_dev_base(base, bus, devfn); 91 unsigned int devfn, int reg, int len, u32 value) 96 if ((bus > 255) || (devfn > 255) || (reg > 4095)) 100 base = get_base_addr(seg, bus, devfn); 51 pci_mmcfg_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) argument 90 pci_mmcfg_write(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) argument [all...] |
H A D | direct.c | 17 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \ 19 | (devfn << 8) | (reg & 0xFC)) 22 unsigned int devfn, int reg, int len, u32 *value) 26 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) { 33 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); 53 unsigned int devfn, int reg, int len, u32 value) 57 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) 62 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); 96 unsigned int devfn, int reg, int len, u32 *value) 102 if ((bus > 255) || (devfn > 25 21 pci_conf1_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) argument 52 pci_conf1_write(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) argument 95 pci_conf2_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) argument 137 pci_conf2_write(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) argument 198 int devfn; local [all...] |
/linux-master/include/linux/platform_data/x86/ |
H A D | p2sb.h | 17 int p2sb_bar(struct pci_bus *bus, unsigned int devfn, struct resource *mem); 21 static inline int p2sb_bar(struct pci_bus *bus, unsigned int devfn, struct resource *mem) argument
|
/linux-master/drivers/pci/hotplug/ |
H A D | cpci_hotplug_pci.c | 39 slot->devfn, 45 slot->devfn, 59 slot->devfn, 64 slot->devfn, 73 slot->devfn, 86 slot->devfn, 91 slot->devfn, 105 slot->devfn, 110 slot->devfn, 117 slot->devfn, [all...] |
/linux-master/arch/arm/plat-orion/include/plat/ |
H A 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-master/arch/sh/drivers/pci/ |
H A D | ops-dreamcast.c | 22 * someone implicitly messes around with the last devfn value.. otherwise we 36 static int gapspci_config_access(unsigned char bus, unsigned int devfn) argument 38 return (bus == 0) && (devfn == 0); 46 static int gapspci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) argument 50 if (!gapspci_config_access(bus->number, devfn)) 62 static int gapspci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) argument 64 if (!gapspci_config_access(bus->number, devfn))
|
/linux-master/arch/sh/include/asm/ |
H A D | pci.h | 46 int bus, int devfn, int offset, u8 *value); 48 int bus, int devfn, int offset, u16 *value); 50 int bus, int devfn, int offset, u32 *value); 52 int bus, int devfn, int offset, u8 value); 54 int bus, int devfn, int offset, u16 value); 56 int bus, int devfn, int offset, u32 value);
|
/linux-master/arch/alpha/kernel/ |
H A D | sys_miata.c | 185 if((slot == 7) && (PCI_FUNC(dev->devfn) == 3)) { 186 struct pci_dev *pdev = pci_get_slot(dev->bus, dev->devfn & ~7); 208 slot = PCI_SLOT(dev->devfn); 211 else if ((PCI_SLOT(dev->bus->self->devfn) == 8) || 212 (PCI_SLOT(dev->bus->self->devfn) == 20)) { 213 slot = PCI_SLOT(dev->devfn) + 9; 219 if ((PCI_SLOT(dev->bus->self->devfn) == 8) || 220 (PCI_SLOT(dev->bus->self->devfn) == 20)) { 221 slot = PCI_SLOT(dev->devfn) + 9; 229 slot = PCI_SLOT(dev->devfn); [all...] |
/linux-master/drivers/pci/controller/ |
H A D | pci-thunder-ecam.c | 30 unsigned int devfn, int where, int size, u32 *val) 43 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ 57 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ 72 addr = bus->ops->map_bus(bus, devfn, bar + 4); /* BAR 1 */ 83 static int thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn, argument 100 return pci_generic_config_read(bus, devfn, where, size, val); 103 addr = bus->ops->map_bus(bus, devfn, where_a); 122 static int thunder_ecam_config_read(struct pci_bus *bus, unsigned int devfn, argument 132 addr = bus->ops->map_bus(bus, devfn, 0xc); 141 addr = bus->ops->map_bus(bus, devfn, 29 handle_ea_bar(u32 e0, int bar, struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) argument 319 thunder_ecam_config_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) argument [all...] |
H A D | pci-host-generic.c | 26 static bool pci_dw_valid_device(struct pci_bus *bus, unsigned int devfn) argument 36 if (bus->number == cfg->busr.start && PCI_SLOT(devfn) > 0) 43 unsigned int devfn, int where) 45 if (!pci_dw_valid_device(bus, devfn)) 48 return pci_ecam_map_bus(bus, devfn, where); 42 pci_dw_ecam_map_bus(struct pci_bus *bus, unsigned int devfn, int where) argument
|
/linux-master/arch/powerpc/platforms/pasemi/ |
H A D | pci.c | 26 #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off)) 28 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) argument 34 if (bus == 0 && devfn == 0) 41 u8 bus, u8 devfn, int offset) 43 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); 46 static inline int is_root_port(int busno, int devfn) argument 48 return ((busno == 0) && (PCI_FUNC(devfn) < 4) && 49 ((PCI_SLOT(devfn) == 16) || (PCI_SLOT(devfn) 40 pa_pxp_cfg_addr(struct pci_controller *hose, u8 bus, u8 devfn, int offset) argument 58 workaround_5945(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) argument 156 pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) argument 195 pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) argument [all...] |
/linux-master/drivers/platform/x86/ |
H A D | p2sb.c | 46 static int p2sb_get_devfn(unsigned int *devfn) argument 55 *devfn = fn; 86 static void p2sb_scan_and_cache_devfn(struct pci_bus *bus, unsigned int devfn) argument 88 struct p2sb_res_cache *cache = &p2sb_resources[PCI_FUNC(devfn)]; 91 pdev = pci_scan_single_device(bus, devfn); 101 static int p2sb_scan_and_cache(struct pci_bus *bus, unsigned int devfn) argument 104 p2sb_scan_and_cache_devfn(bus, devfn); 107 if (devfn == P2SB_DEVFN_GOLDMONT) 110 if (!p2sb_valid_resource(&p2sb_resources[PCI_FUNC(devfn)].res)) 137 /* Get devfn fo 194 p2sb_bar(struct pci_bus *bus, unsigned int devfn, struct resource *mem) argument [all...] |