Home
last modified time | relevance | path

Searched refs:devfn (Results 1 - 25 of 1003) sorted by relevance

12345678910>>...41

/kernel/linux/linux-5.10/arch/mips/pci/
H A Dops-rc32434.c47 struct pci_bus *bus, unsigned int devfn, in config_access()
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, wher in read_config_dword()
46 config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, unsigned char where, u32 *data) config_access() argument
129 write_config_byte(struct pci_bus *bus, unsigned int devfn, int where, u8 val) write_config_byte() argument
148 write_config_word(struct pci_bus *bus, unsigned int devfn, int where, u16 val) write_config_word() argument
168 write_config_dword(struct pci_bus *bus, unsigned int devfn, int where, u32 val) write_config_dword() argument
177 pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) pci_config_read() argument
190 pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) pci_config_write() argument
[all...]
H A Dops-sni.c24 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 > 25 in pcit_set_config_address()
100 pcit_read(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 * val) pcit_read() argument
137 pcit_write(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 val) pcit_write() argument
[all...]
H A Dops-loongson2.c34 unsigned int devfn, int where, in loongson_pcibios_config_access()
41 int device = PCI_SLOT(devfn); in loongson_pcibios_config_access()
42 int function = PCI_FUNC(devfn); in loongson_pcibios_config_access()
118 static int loongson_pcibios_read(struct pci_bus *bus, unsigned int devfn, in loongson_pcibios_read() argument
128 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in loongson_pcibios_read()
142 static int loongson_pcibios_write(struct pci_bus *bus, unsigned int devfn, in loongson_pcibios_write() argument
155 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in loongson_pcibios_write()
167 if (loongson_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, in loongson_pcibios_write()
187 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); in _rdmsr() local
191 loongson_pcibios_write(&bus, devfn, PCI_MSR_ADD in _rdmsr()
32 loongson_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 *data) loongson_pcibios_config_access() argument
203 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); _wrmsr() local
[all...]
H A Dops-gt64xxx_pci0.c31 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in gt64xxx_pci0_pcibios_config_access()
36 if ((busnum == 0) && (devfn >= PCI_DEVFN(31, 0))) in gt64xxx_pci0_pcibios_config_access()
46 (devfn << GT_PCI0_CFGADDR_FUNCTNUM_SHF) | in gt64xxx_pci0_pcibios_config_access()
51 if (busnum == 0 && PCI_SLOT(devfn) == 0) { in gt64xxx_pci0_pcibios_config_access()
60 if (busnum == 0 && PCI_SLOT(devfn) == 0) { in gt64xxx_pci0_pcibios_config_access()
91 static int gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn, in gt64xxx_pci0_pcibios_read() argument
96 if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in gt64xxx_pci0_pcibios_read()
110 static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, in gt64xxx_pci0_pcibios_write() argument
119 devfn, where, &data)) in gt64xxx_pci0_pcibios_write()
130 if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, in gt64xxx_pci0_pcibios_write()
30 gt64xxx_pci0_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) gt64xxx_pci0_pcibios_config_access() argument
[all...]
H A Dpci-bcm1480ht.c38 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where))
39 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where)
75 static int bcm1480ht_can_access(struct pci_bus *bus, int devfn) in bcm1480ht_can_access() argument
83 devno = PCI_SLOT(devfn); in bcm1480ht_can_access()
96 static int bcm1480ht_pcibios_read(struct pci_bus *bus, unsigned int devfn, in bcm1480ht_pcibios_read() argument
106 if (bcm1480ht_can_access(bus, devfn)) in bcm1480ht_pcibios_read()
107 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480ht_pcibios_read()
121 static int bcm1480ht_pcibios_write(struct pci_bus *bus, unsigned int devfn, in bcm1480ht_pcibios_write() argument
[all...]
/kernel/linux/linux-6.6/arch/mips/pci/
H A Dops-rc32434.c47 struct pci_bus *bus, unsigned int devfn, in config_access()
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, wher in read_config_dword()
46 config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, unsigned char where, u32 *data) config_access() argument
129 write_config_byte(struct pci_bus *bus, unsigned int devfn, int where, u8 val) write_config_byte() argument
148 write_config_word(struct pci_bus *bus, unsigned int devfn, int where, u16 val) write_config_word() argument
168 write_config_dword(struct pci_bus *bus, unsigned int devfn, int where, u32 val) write_config_dword() argument
177 pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) pci_config_read() argument
190 pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) pci_config_write() argument
[all...]
H A Dops-sni.c24 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 > 25 in pcit_set_config_address()
100 pcit_read(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 * val) pcit_read() argument
137 pcit_write(struct pci_bus *bus, unsigned int devfn, int reg, int size, u32 val) pcit_write() argument
[all...]
H A Dops-loongson2.c34 unsigned int devfn, int where, in loongson_pcibios_config_access()
41 int device = PCI_SLOT(devfn); in loongson_pcibios_config_access()
42 int function = PCI_FUNC(devfn); in loongson_pcibios_config_access()
118 static int loongson_pcibios_read(struct pci_bus *bus, unsigned int devfn, in loongson_pcibios_read() argument
128 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in loongson_pcibios_read()
142 static int loongson_pcibios_write(struct pci_bus *bus, unsigned int devfn, in loongson_pcibios_write() argument
155 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in loongson_pcibios_write()
167 if (loongson_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, where, in loongson_pcibios_write()
187 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); in _rdmsr() local
191 loongson_pcibios_write(&bus, devfn, PCI_MSR_ADD in _rdmsr()
32 loongson_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 *data) loongson_pcibios_config_access() argument
203 u32 devfn = PCI_DEVFN(PCI_IDSEL_CS5536, 0); _wrmsr() local
[all...]
H A Dops-gt64xxx_pci0.c31 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in gt64xxx_pci0_pcibios_config_access()
36 if ((busnum == 0) && (devfn >= PCI_DEVFN(31, 0))) in gt64xxx_pci0_pcibios_config_access()
46 (devfn << GT_PCI0_CFGADDR_FUNCTNUM_SHF) | in gt64xxx_pci0_pcibios_config_access()
51 if (busnum == 0 && PCI_SLOT(devfn) == 0) { in gt64xxx_pci0_pcibios_config_access()
60 if (busnum == 0 && PCI_SLOT(devfn) == 0) { in gt64xxx_pci0_pcibios_config_access()
91 static int gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn, in gt64xxx_pci0_pcibios_read() argument
96 if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, in gt64xxx_pci0_pcibios_read()
110 static int gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, in gt64xxx_pci0_pcibios_write() argument
119 devfn, where, &data)) in gt64xxx_pci0_pcibios_write()
130 if (gt64xxx_pci0_pcibios_config_access(PCI_ACCESS_WRITE, bus, devfn, in gt64xxx_pci0_pcibios_write()
30 gt64xxx_pci0_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) gt64xxx_pci0_pcibios_config_access() argument
[all...]
/kernel/linux/linux-5.10/drivers/pci/hotplug/
H A Dcpci_hotplug_pci.c41 slot->devfn, in cpci_get_attention_status()
47 slot->devfn, in cpci_get_attention_status()
61 slot->devfn, in cpci_set_attention_status()
66 slot->devfn, in cpci_set_attention_status()
75 slot->devfn, in cpci_set_attention_status()
88 slot->devfn, in cpci_get_hs_csr()
93 slot->devfn, in cpci_get_hs_csr()
107 slot->devfn, in cpci_check_and_clear_ins()
112 slot->devfn, in cpci_check_and_clear_ins()
119 slot->devfn, in cpci_check_and_clear_ins()
[all...]
/kernel/linux/linux-6.6/drivers/pci/hotplug/
H A Dcpci_hotplug_pci.c39 slot->devfn, in cpci_get_attention_status()
45 slot->devfn, in cpci_get_attention_status()
59 slot->devfn, in cpci_set_attention_status()
64 slot->devfn, in cpci_set_attention_status()
73 slot->devfn, in cpci_set_attention_status()
86 slot->devfn, in cpci_get_hs_csr()
91 slot->devfn, in cpci_get_hs_csr()
105 slot->devfn, in cpci_check_and_clear_ins()
110 slot->devfn, in cpci_check_and_clear_ins()
117 slot->devfn, in cpci_check_and_clear_ins()
[all...]
/kernel/linux/linux-5.10/drivers/pci/controller/
H A Dpci-thunder-ecam.c30 unsigned int devfn, int where, int size, u32 *val) in handle_ea_bar()
43 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
58 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
74 addr = bus->ops->map_bus(bus, devfn, bar + 4); /* BAR 1 */ in handle_ea_bar()
86 static int thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_ecam_p2_config_read() argument
103 return pci_generic_config_read(bus, devfn, where, size, val); in thunder_ecam_p2_config_read()
106 addr = bus->ops->map_bus(bus, devfn, where_a); in thunder_ecam_p2_config_read()
127 static int thunder_ecam_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_ecam_config_read() argument
137 addr = bus->ops->map_bus(bus, devfn, 0xc); in thunder_ecam_config_read()
148 addr = bus->ops->map_bus(bus, devfn, in thunder_ecam_config_read()
29 handle_ea_bar(u32 e0, int bar, struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) handle_ea_bar() argument
333 thunder_ecam_config_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) thunder_ecam_config_write() argument
[all...]
/kernel/linux/linux-6.6/drivers/pci/controller/
H A Dpci-thunder-ecam.c30 unsigned int devfn, int where, int size, u32 *val) in handle_ea_bar()
43 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
57 addr = bus->ops->map_bus(bus, devfn, bar); /* BAR 0 */ in handle_ea_bar()
72 addr = bus->ops->map_bus(bus, devfn, bar + 4); /* BAR 1 */ in handle_ea_bar()
83 static int thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_ecam_p2_config_read() argument
100 return pci_generic_config_read(bus, devfn, where, size, val); in thunder_ecam_p2_config_read()
103 addr = bus->ops->map_bus(bus, devfn, where_a); in thunder_ecam_p2_config_read()
122 static int thunder_ecam_config_read(struct pci_bus *bus, unsigned int devfn, in thunder_ecam_config_read() argument
132 addr = bus->ops->map_bus(bus, devfn, 0xc); in thunder_ecam_config_read()
141 addr = bus->ops->map_bus(bus, devfn, in thunder_ecam_config_read()
29 handle_ea_bar(u32 e0, int bar, struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) handle_ea_bar() argument
319 thunder_ecam_config_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) thunder_ecam_config_write() argument
[all...]
/kernel/linux/linux-5.10/arch/powerpc/platforms/pasemi/
H A Dpci.c25 #define PA_PXP_CFA(bus, devfn, off) (((bus) << 20) | ((devfn) << 12) | (off))
27 static inline int pa_pxp_offset_valid(u8 bus, u8 devfn, int offset) in pa_pxp_offset_valid() argument
33 if (bus == 0 && devfn == 0) in pa_pxp_offset_valid()
40 u8 bus, u8 devfn, int offset) in pa_pxp_cfg_addr()
42 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); in pa_pxp_cfg_addr()
45 static inline int is_root_port(int busno, int devfn) in is_root_port() argument
47 return ((busno == 0) && (PCI_FUNC(devfn) < 4) && in is_root_port()
48 ((PCI_SLOT(devfn) == 16) || (PCI_SLOT(devfn) in is_root_port()
39 pa_pxp_cfg_addr(struct pci_controller *hose, u8 bus, u8 devfn, int offset) pa_pxp_cfg_addr() argument
57 workaround_5945(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) workaround_5945() argument
155 pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) pa_pxp_read_config() argument
194 pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) pa_pxp_write_config() argument
[all...]
/kernel/linux/linux-5.10/arch/x86/pci/
H A Ddirect.c17 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \
19 | (devfn << 8) | (reg & 0xFC))
22 unsigned int devfn, int reg, int len, u32 *value) in pci_conf1_read()
26 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) { in pci_conf1_read()
33 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_read()
53 unsigned int devfn, int reg, int len, u32 value) in pci_conf1_write()
57 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) in pci_conf1_write()
62 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_write()
96 unsigned int devfn, int reg, int len, u32 *value) in pci_conf2_read()
102 if ((bus > 255) || (devfn > 25 in pci_conf2_read()
21 pci_conf1_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) pci_conf1_read() argument
52 pci_conf1_write(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) pci_conf1_write() argument
95 pci_conf2_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) pci_conf2_read() argument
137 pci_conf2_write(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) pci_conf2_write() argument
198 int devfn; pci_sanity_check() local
[all...]
H A Dintel_mid_pci.c58 * @devfn: device in question
60 * Look for the fixed BAR cap on @bus and @devfn, returning its offset
63 static int fixed_bar_cap(struct pci_bus *bus, unsigned int devfn) in fixed_bar_cap() argument
75 devfn, pos, 4, &pcie_cap)) in fixed_bar_cap()
84 devfn, pos + 4, 4, &cap_data); in fixed_bar_cap() local
95 static int pci_device_update_fixed(struct pci_bus *bus, unsigned int devfn, in pci_device_update_fixed() argument
108 raw_pci_ext_ops->read(domain, busnum, devfn, in pci_device_update_fixed()
131 return raw_pci_ext_ops->write(domain, busnum, devfn, reg, 4, in pci_device_update_fixed()
136 return raw_pci_ext_ops->write(domain, busnum, devfn, reg, len, val); in pci_device_update_fixed()
142 * @devfn
149 type1_access_ok(unsigned int bus, unsigned int devfn, int reg) type1_access_ok() argument
168 pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) pci_read() argument
178 pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value) pci_write() argument
[all...]
H A Dnumachip.c18 static inline 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_numachip()
33 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { in pci_mmcfg_read_numachip()
39 if (unlikely(bus == 0 && devfn >= limit)) { in pci_mmcfg_read_numachip()
45 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_read_numachip()
68 unsigned int devfn, int reg, int len, u32 value) in pci_mmcfg_write_numachip()
73 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) in pci_mmcfg_write_numachip()
77 if (unlikely(bus == 0 && devfn >= limit)) in pci_mmcfg_write_numachip()
81 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_write_numachip()
27 pci_mmcfg_read_numachip(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) pci_mmcfg_read_numachip() argument
67 pci_mmcfg_write_numachip(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) pci_mmcfg_write_numachip() argument
[all...]
/kernel/linux/linux-6.6/arch/powerpc/platforms/pasemi/
H A Dpci.c26 #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) in pa_pxp_offset_valid() argument
34 if (bus == 0 && devfn == 0) in pa_pxp_offset_valid()
41 u8 bus, u8 devfn, int offset) in pa_pxp_cfg_addr()
43 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); in pa_pxp_cfg_addr()
46 static inline int is_root_port(int busno, int devfn) in is_root_port() argument
48 return ((busno == 0) && (PCI_FUNC(devfn) < 4) && in is_root_port()
49 ((PCI_SLOT(devfn) == 16) || (PCI_SLOT(devfn) in is_root_port()
40 pa_pxp_cfg_addr(struct pci_controller *hose, u8 bus, u8 devfn, int offset) pa_pxp_cfg_addr() argument
58 workaround_5945(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) workaround_5945() argument
156 pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) pa_pxp_read_config() argument
195 pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) pa_pxp_write_config() argument
[all...]
/kernel/linux/linux-6.6/arch/x86/pci/
H A Ddirect.c17 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \
19 | (devfn << 8) | (reg & 0xFC))
22 unsigned int devfn, int reg, int len, u32 *value) in pci_conf1_read()
26 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) { in pci_conf1_read()
33 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_read()
53 unsigned int devfn, int reg, int len, u32 value) in pci_conf1_write()
57 if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) in pci_conf1_write()
62 outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); in pci_conf1_write()
96 unsigned int devfn, int reg, int len, u32 *value) in pci_conf2_read()
102 if ((bus > 255) || (devfn > 25 in pci_conf2_read()
21 pci_conf1_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) pci_conf1_read() argument
52 pci_conf1_write(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) pci_conf1_write() argument
95 pci_conf2_read(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) pci_conf2_read() argument
137 pci_conf2_write(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) pci_conf2_write() argument
198 int devfn; pci_sanity_check() local
[all...]
H A Dintel_mid_pci.c60 * @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) in fixed_bar_cap() argument
77 devfn, pos, 4, &pcie_cap)) in fixed_bar_cap()
86 devfn, pos + 4, 4, &cap_data); in fixed_bar_cap() local
97 static int pci_device_update_fixed(struct pci_bus *bus, unsigned int devfn, in pci_device_update_fixed() argument
110 raw_pci_ext_ops->read(domain, busnum, devfn, in pci_device_update_fixed()
133 return raw_pci_ext_ops->write(domain, busnum, devfn, reg, 4, in pci_device_update_fixed()
138 return raw_pci_ext_ops->write(domain, busnum, devfn, reg, len, val); in pci_device_update_fixed()
144 * @devfn
152 type1_access_ok(unsigned int bus, unsigned int devfn, int reg) type1_access_ok() argument
171 pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *value) pci_read() argument
181 pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 value) pci_write() argument
[all...]
H A Dnumachip.c19 static inline char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) in pci_dev_base() argument
24 return cfg->virt + (PCI_MMCFG_BUS_OFFSET(bus) | (devfn << 12)); in pci_dev_base()
29 unsigned int devfn, int reg, int len, u32 *value) in pci_mmcfg_read_numachip()
34 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { in pci_mmcfg_read_numachip()
40 if (unlikely(bus == 0 && devfn >= limit)) { in pci_mmcfg_read_numachip()
46 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_read_numachip()
69 unsigned int devfn, int reg, int len, u32 value) in pci_mmcfg_write_numachip()
74 if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) in pci_mmcfg_write_numachip()
78 if (unlikely(bus == 0 && devfn >= limit)) in pci_mmcfg_write_numachip()
82 addr = pci_dev_base(seg, bus, devfn); in pci_mmcfg_write_numachip()
28 pci_mmcfg_read_numachip(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 *value) pci_mmcfg_read_numachip() argument
68 pci_mmcfg_write_numachip(unsigned int seg, unsigned int bus, unsigned int devfn, int reg, int len, u32 value) pci_mmcfg_write_numachip() argument
[all...]
/kernel/linux/linux-6.6/drivers/platform/x86/
H A Dp2sb.c46 static int p2sb_get_devfn(unsigned int *devfn) in p2sb_get_devfn() argument
55 *devfn = fn; in p2sb_get_devfn()
86 static void p2sb_scan_and_cache_devfn(struct pci_bus *bus, unsigned int devfn) in p2sb_scan_and_cache_devfn() argument
88 struct p2sb_res_cache *cache = &p2sb_resources[PCI_FUNC(devfn)]; in p2sb_scan_and_cache_devfn()
91 pdev = pci_scan_single_device(bus, devfn); in p2sb_scan_and_cache_devfn()
101 static int p2sb_scan_and_cache(struct pci_bus *bus, unsigned int devfn) in p2sb_scan_and_cache() argument
104 p2sb_scan_and_cache_devfn(bus, devfn); in p2sb_scan_and_cache()
107 if (devfn == P2SB_DEVFN_GOLDMONT) in p2sb_scan_and_cache()
110 if (!p2sb_valid_resource(&p2sb_resources[PCI_FUNC(devfn)].res)) in p2sb_scan_and_cache()
137 /* Get devfn fo in p2sb_cache_resources()
194 p2sb_bar(struct pci_bus *bus, unsigned int devfn, struct resource *mem) p2sb_bar() argument
[all...]
/kernel/linux/linux-5.10/drivers/xen/
H A Dpci.c52 .add.devfn = pci_dev->devfn in xen_add_device()
64 add->physfn.devfn = physfn->devfn; in xen_add_device()
67 if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) in xen_add_device()
118 .devfn = pci_dev->devfn, in xen_add_device()
121 .physfn.devfn = physfn->devfn, in xen_add_device()
128 else if (pci_ari_enabled(pci_dev->bus) && PCI_SLOT(pci_dev->devfn)) { in xen_add_device()
[all...]
/kernel/linux/linux-5.10/arch/powerpc/platforms/maple/
H A Dpci.c81 static unsigned long u3_agp_cfa0(u8 devfn, u8 off) in u3_agp_cfa0() argument
83 return (1 << (unsigned long)PCI_SLOT(devfn)) | in u3_agp_cfa0()
84 ((unsigned long)PCI_FUNC(devfn) << 8) | in u3_agp_cfa0()
88 static unsigned long u3_agp_cfa1(u8 bus, u8 devfn, u8 off) in u3_agp_cfa1() argument
91 ((unsigned long)devfn << 8) | in u3_agp_cfa1()
117 static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_read_config() argument
127 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_read_config()
148 static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_write_config() argument
158 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_write_config()
185 static unsigned long u3_ht_cfa0(u8 devfn, u argument
190 u3_ht_cfa1(u8 bus, u8 devfn, u8 off) u3_ht_cfa1() argument
195 u3_ht_cfg_access(struct pci_controller* hose, u8 bus, u8 devfn, u8 offset) u3_ht_cfg_access() argument
254 u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) u3_ht_read_config() argument
292 u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) u3_ht_write_config() argument
335 u4_pcie_cfa0(unsigned int devfn, unsigned int off) u4_pcie_cfa0() argument
343 u4_pcie_cfa1(unsigned int bus, unsigned int devfn, unsigned int off) u4_pcie_cfa1() argument
371 u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) u4_pcie_read_config() argument
402 u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) u4_pcie_write_config() argument
[all...]
/kernel/linux/linux-6.6/arch/powerpc/platforms/maple/
H A Dpci.c81 static unsigned long u3_agp_cfa0(u8 devfn, u8 off) in u3_agp_cfa0() argument
83 return (1 << (unsigned long)PCI_SLOT(devfn)) | in u3_agp_cfa0()
84 ((unsigned long)PCI_FUNC(devfn) << 8) | in u3_agp_cfa0()
88 static unsigned long u3_agp_cfa1(u8 bus, u8 devfn, u8 off) in u3_agp_cfa1() argument
91 ((unsigned long)devfn << 8) | in u3_agp_cfa1()
117 static int u3_agp_read_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_read_config() argument
127 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_read_config()
148 static int u3_agp_write_config(struct pci_bus *bus, unsigned int devfn, in u3_agp_write_config() argument
158 addr = u3_agp_cfg_access(hose, bus->number, devfn, offset); in u3_agp_write_config()
185 static unsigned long u3_ht_cfa0(u8 devfn, u argument
190 u3_ht_cfa1(u8 bus, u8 devfn, u8 off) u3_ht_cfa1() argument
195 u3_ht_cfg_access(struct pci_controller* hose, u8 bus, u8 devfn, u8 offset) u3_ht_cfg_access() argument
254 u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) u3_ht_read_config() argument
292 u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) u3_ht_write_config() argument
335 u4_pcie_cfa0(unsigned int devfn, unsigned int off) u4_pcie_cfa0() argument
343 u4_pcie_cfa1(unsigned int bus, unsigned int devfn, unsigned int off) u4_pcie_cfa1() argument
371 u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 *val) u4_pcie_read_config() argument
402 u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) u4_pcie_write_config() argument
[all...]

Completed in 10 milliseconds

12345678910>>...41