/kernel/linux/linux-5.10/arch/mips/pci/ |
H A D | ops-rc32434.c | 48 unsigned char where, u32 *data) in config_access() 54 PCI_CFG_SET(bus->number, slot, func, where); in config_access() 73 int where, u8 *val) in read_config_byte() 78 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte() 79 *val = (data >> ((where & 3) << 3)) & 0xff; in read_config_byte() 84 int where, u16 *val) in read_config_word() 89 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word() 90 *val = (data >> ((where & 3) << 3)) & 0xffff; in read_config_word() 95 int where, u32 *val) in read_config_dword() 108 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, va 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 72 read_config_byte(struct pci_bus *bus, unsigned int devfn, int where, u8 *val) read_config_byte() argument 83 read_config_word(struct pci_bus *bus, unsigned int devfn, int where, u16 *val) read_config_word() argument 94 read_config_dword(struct pci_bus *bus, unsigned int devfn, int where, u32 *val) read_config_dword() 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 D | ops-msc.c | 34 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in msc_pcibios_config_access() 47 ((where / 4) << MSC01_PCI_CFGADDR_RNUM_SHF))); in msc_pcibios_config_access() 76 int where, int size, u32 * val) in msc_pcibios_read() 80 if ((size == 2) && (where & 1)) in msc_pcibios_read() 82 else if ((size == 4) && (where & 3)) in msc_pcibios_read() 85 if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in msc_pcibios_read() 90 *val = (data >> ((where & 3) << 3)) & 0xff; in msc_pcibios_read() 92 *val = (data >> ((where & 3) << 3)) & 0xffff; in msc_pcibios_read() 100 int where, int size, u32 val) in msc_pcibios_write() 104 if ((size == 2) && (where in msc_pcibios_write() 33 msc_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) msc_pcibios_config_access() argument 75 msc_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) msc_pcibios_read() argument 99 msc_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) msc_pcibios_write() argument [all...] |
H A D | pci-bcm1480ht.c | 38 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) 39 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) 97 int where, int size, u32 * val) in bcm1480ht_pcibios_read() 101 if ((size == 2) && (where & 1)) in bcm1480ht_pcibios_read() 103 else if ((size == 4) && (where & 3)) in bcm1480ht_pcibios_read() 107 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480ht_pcibios_read() 112 *val = (data >> ((where & 3) << 3)) & 0xff; in bcm1480ht_pcibios_read() 114 *val = (data >> ((where in bcm1480ht_pcibios_read() 96 bcm1480ht_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) bcm1480ht_pcibios_read() argument 121 bcm1480ht_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm1480ht_pcibios_write() argument [all...] |
H A D | ops-bonito64.c | 26 unsigned int devfn, int where, in bonito64_pcibios_config_access() 35 int reg = where & ~3; in bonito64_pcibios_config_access() 90 int where, int size, u32 * val) in bonito64_pcibios_read() 94 if ((size == 2) && (where & 1)) in bonito64_pcibios_read() 96 else if ((size == 4) && (where & 3)) in bonito64_pcibios_read() 99 if (bonito64_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in bonito64_pcibios_read() 104 *val = (data >> ((where & 3) << 3)) & 0xff; in bonito64_pcibios_read() 106 *val = (data >> ((where & 3) << 3)) & 0xffff; in bonito64_pcibios_read() 114 int where, int size, u32 val) in bonito64_pcibios_write() 118 if ((size == 2) && (where in bonito64_pcibios_write() 24 bonito64_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) bonito64_pcibios_config_access() argument 89 bonito64_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) bonito64_pcibios_read() argument 113 bonito64_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bonito64_pcibios_write() argument [all...] |
H A D | ops-gt64xxx_pci0.c | 31 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in gt64xxx_pci0_pcibios_config_access() 47 ((where / 4) << GT_PCI0_CFGADDR_REGNUM_SHF) | in gt64xxx_pci0_pcibios_config_access() 92 int where, int size, u32 * val) in gt64xxx_pci0_pcibios_read() 97 where, &data)) in gt64xxx_pci0_pcibios_read() 101 *val = (data >> ((where & 3) << 3)) & 0xff; in gt64xxx_pci0_pcibios_read() 103 *val = (data >> ((where & 3) << 3)) & 0xffff; in gt64xxx_pci0_pcibios_read() 111 int where, int size, u32 val) in gt64xxx_pci0_pcibios_write() 119 devfn, where, &data)) in gt64xxx_pci0_pcibios_write() 123 data = (data & ~(0xff << ((where & 3) << 3))) | in gt64xxx_pci0_pcibios_write() 124 (val << ((where 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 91 gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) gt64xxx_pci0_pcibios_read() argument 110 gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) gt64xxx_pci0_pcibios_write() argument [all...] |
H A D | ops-vr41xx.c | 23 unsigned int devfn, int where) in set_pci_configuration_address() 29 if (PCI_SLOT(devfn) < 11 || where > 0xff) in set_pci_configuration_address() 33 (where & 0xfc), PCICONFAREG); in set_pci_configuration_address() 38 if (where > 0xff) in set_pci_configuration_address() 42 (where & 0xfc) | 1U, PCICONFAREG); in set_pci_configuration_address() 48 static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_read() argument 54 if (set_pci_configuration_address(bus->number, devfn, where) < 0) in pci_config_read() 61 *val = (data >> ((where & 3) << 3)) & 0xffU; in pci_config_read() 64 *val = (data >> ((where & 2) << 3)) & 0xffffU; in pci_config_read() 76 static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_write() argument 22 set_pci_configuration_address(unsigned char number, unsigned int devfn, int where) set_pci_configuration_address() argument [all...] |
H A D | ops-bcm63xx.c | 20 static int postprocess_read(u32 data, int where, unsigned int size) in postprocess_read() argument 27 ret = (data >> ((where & 3) << 3)) & 0xff; in postprocess_read() 30 ret = (data >> ((where & 3) << 3)) & 0xffff; in postprocess_read() 39 static int preprocess_write(u32 orig_data, u32 val, int where, in preprocess_write() argument 47 ret = (orig_data & ~(0xff << ((where & 3) << 3))) | in preprocess_write() 48 (val << ((where & 3) << 3)); in preprocess_write() 51 ret = (orig_data & ~(0xffff << ((where & 3) << 3))) | in preprocess_write() 52 (val << ((where & 3) << 3)); in preprocess_write() 65 unsigned int devfn, int where) in bcm63xx_setup_cfg_access() 72 reg = where >> in bcm63xx_setup_cfg_access() 64 bcm63xx_setup_cfg_access(int type, unsigned int busn, unsigned int devfn, int where) bcm63xx_setup_cfg_access() argument 100 bcm63xx_do_cfg_read(int type, unsigned int busn, unsigned int devfn, int where, int size, u32 *val) bcm63xx_do_cfg_read() argument 121 bcm63xx_do_cfg_write(int type, unsigned int busn, unsigned int devfn, int where, int size, u32 val) bcm63xx_do_cfg_write() argument 147 bcm63xx_pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) bcm63xx_pci_read() argument 161 bcm63xx_pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm63xx_pci_write() argument 208 fake_cb_bridge_read(int where, int size, u32 *val) fake_cb_bridge_read() argument 291 fake_cb_bridge_write(int where, int size, u32 val) fake_cb_bridge_write() argument 362 bcm63xx_cb_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) bcm63xx_cb_read() argument 386 bcm63xx_cb_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm63xx_cb_write() argument 483 bcm63xx_pcie_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) bcm63xx_pcie_read() argument 503 bcm63xx_pcie_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm63xx_pcie_write() argument [all...] |
H A D | pci-bcm1480.c | 40 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) 41 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) 108 int where, int size, u32 * val) in bcm1480_pcibios_read() 112 if ((size == 2) && (where & 1)) in bcm1480_pcibios_read() 114 else if ((size == 4) && (where & 3)) in bcm1480_pcibios_read() 118 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480_pcibios_read() 123 *val = (data >> ((where & 3) << 3)) & 0xff; in bcm1480_pcibios_read() 125 *val = (data >> ((where in bcm1480_pcibios_read() 107 bcm1480_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) bcm1480_pcibios_read() argument 132 bcm1480_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm1480_pcibios_write() argument [all...] |
H A D | pci-sb1250.c | 40 #define CFGOFFSET(bus, devfn, where) (((bus)<<16) + ((devfn)<<8) + (where)) 41 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) 117 int where, int size, u32 * val) in sb1250_pcibios_read() 121 if ((size == 2) && (where & 1)) in sb1250_pcibios_read() 123 else if ((size == 4) && (where & 3)) in sb1250_pcibios_read() 127 data = READCFG32(CFGADDR(bus, devfn, where)); in sb1250_pcibios_read() 132 *val = (data >> ((where & 3) << 3)) & 0xff; in sb1250_pcibios_read() 134 *val = (data >> ((where in sb1250_pcibios_read() 116 sb1250_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) sb1250_pcibios_read() argument 141 sb1250_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) sb1250_pcibios_write() argument [all...] |
H A D | ops-loongson2.c | 34 unsigned int devfn, int where, in loongson_pcibios_config_access() 43 int reg = where & ~3; in loongson_pcibios_config_access() 119 int where, int size, u32 *val) in loongson_pcibios_read() 123 if ((size == 2) && (where & 1)) in loongson_pcibios_read() 125 else if ((size == 4) && (where & 3)) in loongson_pcibios_read() 128 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in loongson_pcibios_read() 133 *val = (data >> ((where & 3) << 3)) & 0xff; in loongson_pcibios_read() 135 *val = (data >> ((where & 3) << 3)) & 0xffff; in loongson_pcibios_read() 143 int where, int size, u32 val) in loongson_pcibios_write() 147 if ((size == 2) && (where in loongson_pcibios_write() 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 118 loongson_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) loongson_pcibios_read() argument 142 loongson_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) loongson_pcibios_write() argument [all...] |
/kernel/linux/linux-6.6/arch/mips/pci/ |
H A D | ops-rc32434.c | 48 unsigned char where, u32 *data) in config_access() 54 PCI_CFG_SET(bus->number, slot, func, where); in config_access() 73 int where, u8 *val) in read_config_byte() 78 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte() 79 *val = (data >> ((where & 3) << 3)) & 0xff; in read_config_byte() 84 int where, u16 *val) in read_config_word() 89 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word() 90 *val = (data >> ((where & 3) << 3)) & 0xffff; in read_config_word() 95 int where, u32 *val) in read_config_dword() 108 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, va 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 72 read_config_byte(struct pci_bus *bus, unsigned int devfn, int where, u8 *val) read_config_byte() argument 83 read_config_word(struct pci_bus *bus, unsigned int devfn, int where, u16 *val) read_config_word() argument 94 read_config_dword(struct pci_bus *bus, unsigned int devfn, int where, u32 *val) read_config_dword() 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 D | ops-msc.c | 34 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in msc_pcibios_config_access() 47 ((where / 4) << MSC01_PCI_CFGADDR_RNUM_SHF))); in msc_pcibios_config_access() 76 int where, int size, u32 * val) in msc_pcibios_read() 80 if ((size == 2) && (where & 1)) in msc_pcibios_read() 82 else if ((size == 4) && (where & 3)) in msc_pcibios_read() 85 if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in msc_pcibios_read() 90 *val = (data >> ((where & 3) << 3)) & 0xff; in msc_pcibios_read() 92 *val = (data >> ((where & 3) << 3)) & 0xffff; in msc_pcibios_read() 100 int where, int size, u32 val) in msc_pcibios_write() 104 if ((size == 2) && (where in msc_pcibios_write() 33 msc_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) msc_pcibios_config_access() argument 75 msc_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) msc_pcibios_read() argument 99 msc_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) msc_pcibios_write() argument [all...] |
H A D | pci-bcm1480ht.c | 38 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) 39 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) 97 int where, int size, u32 * val) in bcm1480ht_pcibios_read() 101 if ((size == 2) && (where & 1)) in bcm1480ht_pcibios_read() 103 else if ((size == 4) && (where & 3)) in bcm1480ht_pcibios_read() 107 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480ht_pcibios_read() 112 *val = (data >> ((where & 3) << 3)) & 0xff; in bcm1480ht_pcibios_read() 114 *val = (data >> ((where in bcm1480ht_pcibios_read() 96 bcm1480ht_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) bcm1480ht_pcibios_read() argument 121 bcm1480ht_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm1480ht_pcibios_write() argument [all...] |
H A D | ops-bonito64.c | 26 unsigned int devfn, int where, in bonito64_pcibios_config_access() 35 int reg = where & ~3; in bonito64_pcibios_config_access() 90 int where, int size, u32 * val) in bonito64_pcibios_read() 94 if ((size == 2) && (where & 1)) in bonito64_pcibios_read() 96 else if ((size == 4) && (where & 3)) in bonito64_pcibios_read() 99 if (bonito64_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in bonito64_pcibios_read() 104 *val = (data >> ((where & 3) << 3)) & 0xff; in bonito64_pcibios_read() 106 *val = (data >> ((where & 3) << 3)) & 0xffff; in bonito64_pcibios_read() 114 int where, int size, u32 val) in bonito64_pcibios_write() 118 if ((size == 2) && (where in bonito64_pcibios_write() 24 bonito64_pcibios_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 * data) bonito64_pcibios_config_access() argument 89 bonito64_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) bonito64_pcibios_read() argument 113 bonito64_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bonito64_pcibios_write() argument [all...] |
H A D | ops-gt64xxx_pci0.c | 31 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in gt64xxx_pci0_pcibios_config_access() 47 ((where / 4) << GT_PCI0_CFGADDR_REGNUM_SHF) | in gt64xxx_pci0_pcibios_config_access() 92 int where, int size, u32 * val) in gt64xxx_pci0_pcibios_read() 97 where, &data)) in gt64xxx_pci0_pcibios_read() 101 *val = (data >> ((where & 3) << 3)) & 0xff; in gt64xxx_pci0_pcibios_read() 103 *val = (data >> ((where & 3) << 3)) & 0xffff; in gt64xxx_pci0_pcibios_read() 111 int where, int size, u32 val) in gt64xxx_pci0_pcibios_write() 119 devfn, where, &data)) in gt64xxx_pci0_pcibios_write() 123 data = (data & ~(0xff << ((where & 3) << 3))) | in gt64xxx_pci0_pcibios_write() 124 (val << ((where 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 91 gt64xxx_pci0_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) gt64xxx_pci0_pcibios_read() argument 110 gt64xxx_pci0_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) gt64xxx_pci0_pcibios_write() argument [all...] |
H A D | ops-bcm63xx.c | 20 static int postprocess_read(u32 data, int where, unsigned int size) in postprocess_read() argument 27 ret = (data >> ((where & 3) << 3)) & 0xff; in postprocess_read() 30 ret = (data >> ((where & 3) << 3)) & 0xffff; in postprocess_read() 39 static int preprocess_write(u32 orig_data, u32 val, int where, in preprocess_write() argument 47 ret = (orig_data & ~(0xff << ((where & 3) << 3))) | in preprocess_write() 48 (val << ((where & 3) << 3)); in preprocess_write() 51 ret = (orig_data & ~(0xffff << ((where & 3) << 3))) | in preprocess_write() 52 (val << ((where & 3) << 3)); in preprocess_write() 65 unsigned int devfn, int where) in bcm63xx_setup_cfg_access() 72 reg = where >> in bcm63xx_setup_cfg_access() 64 bcm63xx_setup_cfg_access(int type, unsigned int busn, unsigned int devfn, int where) bcm63xx_setup_cfg_access() argument 100 bcm63xx_do_cfg_read(int type, unsigned int busn, unsigned int devfn, int where, int size, u32 *val) bcm63xx_do_cfg_read() argument 121 bcm63xx_do_cfg_write(int type, unsigned int busn, unsigned int devfn, int where, int size, u32 val) bcm63xx_do_cfg_write() argument 147 bcm63xx_pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) bcm63xx_pci_read() argument 161 bcm63xx_pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm63xx_pci_write() argument 208 fake_cb_bridge_read(int where, int size, u32 *val) fake_cb_bridge_read() argument 291 fake_cb_bridge_write(int where, int size, u32 val) fake_cb_bridge_write() argument 362 bcm63xx_cb_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) bcm63xx_cb_read() argument 386 bcm63xx_cb_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm63xx_cb_write() argument 483 bcm63xx_pcie_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) bcm63xx_pcie_read() argument 503 bcm63xx_pcie_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm63xx_pcie_write() argument [all...] |
H A D | pci-bcm1480.c | 40 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) 41 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) 108 int where, int size, u32 * val) in bcm1480_pcibios_read() 112 if ((size == 2) && (where & 1)) in bcm1480_pcibios_read() 114 else if ((size == 4) && (where & 3)) in bcm1480_pcibios_read() 118 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480_pcibios_read() 123 *val = (data >> ((where & 3) << 3)) & 0xff; in bcm1480_pcibios_read() 125 *val = (data >> ((where in bcm1480_pcibios_read() 107 bcm1480_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) bcm1480_pcibios_read() argument 132 bcm1480_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) bcm1480_pcibios_write() argument [all...] |
H A D | pci-sb1250.c | 40 #define CFGOFFSET(bus, devfn, where) (((bus)<<16) + ((devfn)<<8) + (where)) 41 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) 117 int where, int size, u32 * val) in sb1250_pcibios_read() 121 if ((size == 2) && (where & 1)) in sb1250_pcibios_read() 123 else if ((size == 4) && (where & 3)) in sb1250_pcibios_read() 127 data = READCFG32(CFGADDR(bus, devfn, where)); in sb1250_pcibios_read() 132 *val = (data >> ((where & 3) << 3)) & 0xff; in sb1250_pcibios_read() 134 *val = (data >> ((where in sb1250_pcibios_read() 116 sb1250_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 * val) sb1250_pcibios_read() argument 141 sb1250_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) sb1250_pcibios_write() argument [all...] |
H A D | ops-loongson2.c | 34 unsigned int devfn, int where, in loongson_pcibios_config_access() 43 int reg = where & ~3; in loongson_pcibios_config_access() 119 int where, int size, u32 *val) in loongson_pcibios_read() 123 if ((size == 2) && (where & 1)) in loongson_pcibios_read() 125 else if ((size == 4) && (where & 3)) in loongson_pcibios_read() 128 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in loongson_pcibios_read() 133 *val = (data >> ((where & 3) << 3)) & 0xff; in loongson_pcibios_read() 135 *val = (data >> ((where & 3) << 3)) & 0xffff; in loongson_pcibios_read() 143 int where, int size, u32 val) in loongson_pcibios_write() 147 if ((size == 2) && (where in loongson_pcibios_write() 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 118 loongson_pcibios_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) loongson_pcibios_read() argument 142 loongson_pcibios_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) loongson_pcibios_write() argument [all...] |
/kernel/linux/linux-5.10/drivers/pci/controller/ |
H A D | pci-thunder-ecam.c | 16 static void set_val(u32 v, int where, int size, u32 *val) in set_val() argument 18 int shift = (where & 3) * 8; in set_val() 20 pr_debug("set_val %04x: %08x\n", (unsigned)(where & ~3), v); in set_val() 30 unsigned int devfn, int where, int size, u32 *val) in handle_ea_bar() 36 int where_a = where & 0xc; in handle_ea_bar() 39 set_val(e0, where, size, val); in handle_ea_bar() 51 set_val(v, where, size, val); in handle_ea_bar() 70 set_val(v, where, size, val); in handle_ea_bar() 80 set_val(v, where, size, val); in handle_ea_bar() 87 int where, in in thunder_ecam_p2_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 86 thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) thunder_ecam_p2_config_read() argument 127 thunder_ecam_config_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) thunder_ecam_config_read() 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 D | pci-thunder-ecam.c | 16 static void set_val(u32 v, int where, int size, u32 *val) in set_val() argument 18 int shift = (where & 3) * 8; in set_val() 20 pr_debug("set_val %04x: %08x\n", (unsigned int)(where & ~3), v); in set_val() 30 unsigned int devfn, int where, int size, u32 *val) in handle_ea_bar() 36 int where_a = where & 0xc; in handle_ea_bar() 39 set_val(e0, where, size, val); in handle_ea_bar() 50 set_val(v, where, size, val); in handle_ea_bar() 68 set_val(v, where, size, val); in handle_ea_bar() 77 set_val(v, where, size, val); in handle_ea_bar() 84 int where, in in thunder_ecam_p2_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 83 thunder_ecam_p2_config_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) thunder_ecam_p2_config_read() argument 122 thunder_ecam_config_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) thunder_ecam_config_read() 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/sh/drivers/pci/ |
H A D | ops-sh7786.c | 20 struct pci_bus *bus, unsigned int devfn, int where, u32 *data) in sh7786_pcie_config_access() 28 reg = where & ~3; in sh7786_pcie_config_access() 90 int where, int size, u32 *val) in sh7786_pcie_read() 96 if ((size == 2) && (where & 1)) in sh7786_pcie_read() 98 else if ((size == 4) && (where & 3)) in sh7786_pcie_read() 103 devfn, where, &data); in sh7786_pcie_read() 110 *val = (data >> ((where & 3) << 3)) & 0xff; in sh7786_pcie_read() 112 *val = (data >> ((where & 2) << 3)) & 0xffff; in sh7786_pcie_read() 117 "where=0x%04x size=%d val=0x%08lx\n", bus->number, in sh7786_pcie_read() 118 devfn, where, siz in sh7786_pcie_read() 19 sh7786_pcie_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 *data) sh7786_pcie_config_access() argument 89 sh7786_pcie_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) sh7786_pcie_read() argument 125 sh7786_pcie_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) sh7786_pcie_write() argument [all...] |
/kernel/linux/linux-6.6/arch/sh/drivers/pci/ |
H A D | ops-sh7786.c | 20 struct pci_bus *bus, unsigned int devfn, int where, u32 *data) in sh7786_pcie_config_access() 28 reg = where & ~3; in sh7786_pcie_config_access() 90 int where, int size, u32 *val) in sh7786_pcie_read() 96 if ((size == 2) && (where & 1)) in sh7786_pcie_read() 98 else if ((size == 4) && (where & 3)) in sh7786_pcie_read() 103 devfn, where, &data); in sh7786_pcie_read() 110 *val = (data >> ((where & 3) << 3)) & 0xff; in sh7786_pcie_read() 112 *val = (data >> ((where & 2) << 3)) & 0xffff; in sh7786_pcie_read() 117 "where=0x%04x size=%d val=0x%08lx\n", bus->number, in sh7786_pcie_read() 118 devfn, where, siz in sh7786_pcie_read() 19 sh7786_pcie_config_access(unsigned char access_type, struct pci_bus *bus, unsigned int devfn, int where, u32 *data) sh7786_pcie_config_access() argument 89 sh7786_pcie_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) sh7786_pcie_read() argument 125 sh7786_pcie_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) sh7786_pcie_write() argument [all...] |
/kernel/linux/linux-5.10/arch/sparc/kernel/ |
H A D | pci_common.c | 54 int where, int size, u32 *value) in sun4u_read_pci_cfg_host() 60 addr = sun4u_config_mkaddr(pbm, bus, devfn, where); in sun4u_read_pci_cfg_host() 66 if (where < 8) { in sun4u_read_pci_cfg_host() 71 if (where & 1) in sun4u_read_pci_cfg_host() 82 if (where < 8) { in sun4u_read_pci_cfg_host() 96 where, 2, &tmp32); in sun4u_read_pci_cfg_host() 101 where + 2, 2, &tmp32); in sun4u_read_pci_cfg_host() 109 int where, int size, u32 *value) in sun4u_read_pci_cfg() 130 return sun4u_read_pci_cfg_host(pbm, bus, devfn, where, in sun4u_read_pci_cfg() 133 addr = sun4u_config_mkaddr(pbm, bus, devfn, where); in sun4u_read_pci_cfg() 52 sun4u_read_pci_cfg_host(struct pci_pbm_info *pbm, unsigned char bus, unsigned int devfn, int where, int size, u32 *value) sun4u_read_pci_cfg_host() argument 108 sun4u_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, int where, int size, u32 *value) sun4u_read_pci_cfg() argument 165 sun4u_write_pci_cfg_host(struct pci_pbm_info *pbm, unsigned char bus, unsigned int devfn, int where, int size, u32 value) sun4u_write_pci_cfg_host() argument 212 sun4u_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, int where, int size, u32 value) sun4u_write_pci_cfg() argument 257 sun4v_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, int where, int size, u32 *value) sun4v_read_pci_cfg() argument 290 sun4v_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, int where, int size, u32 value) sun4v_write_pci_cfg() argument [all...] |
/kernel/linux/linux-6.6/arch/sparc/kernel/ |
H A D | pci_common.c | 55 int where, int size, u32 *value) in sun4u_read_pci_cfg_host() 61 addr = sun4u_config_mkaddr(pbm, bus, devfn, where); in sun4u_read_pci_cfg_host() 67 if (where < 8) { in sun4u_read_pci_cfg_host() 72 if (where & 1) in sun4u_read_pci_cfg_host() 83 if (where < 8) { in sun4u_read_pci_cfg_host() 97 where, 2, &tmp32); in sun4u_read_pci_cfg_host() 102 where + 2, 2, &tmp32); in sun4u_read_pci_cfg_host() 110 int where, int size, u32 *value) in sun4u_read_pci_cfg() 131 return sun4u_read_pci_cfg_host(pbm, bus, devfn, where, in sun4u_read_pci_cfg() 134 addr = sun4u_config_mkaddr(pbm, bus, devfn, where); in sun4u_read_pci_cfg() 53 sun4u_read_pci_cfg_host(struct pci_pbm_info *pbm, unsigned char bus, unsigned int devfn, int where, int size, u32 *value) sun4u_read_pci_cfg_host() argument 109 sun4u_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, int where, int size, u32 *value) sun4u_read_pci_cfg() argument 166 sun4u_write_pci_cfg_host(struct pci_pbm_info *pbm, unsigned char bus, unsigned int devfn, int where, int size, u32 value) sun4u_write_pci_cfg_host() argument 213 sun4u_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, int where, int size, u32 value) sun4u_write_pci_cfg() argument 258 sun4v_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, int where, int size, u32 *value) sun4v_read_pci_cfg() argument 291 sun4v_write_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn, int where, int size, u32 value) sun4v_write_pci_cfg() argument [all...] |