/arch/mips/pci/ |
D | ops-rc32434.c | 48 unsigned char where, u32 *data) in config_access() argument 54 PCI_CFG_SET(bus->number, slot, func, where); in config_access() 73 int where, u8 *val) in read_config_byte() argument 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() argument 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() argument 108 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, val); in read_config_dword() [all …]
|
D | ops-nile4.c | 17 struct pci_bus *bus, unsigned int devfn, int where, u32 *val) in nile4_pcibios_config_access() argument 31 vrc_pciregs[(0x200 + where) >> 2] = *val; in nile4_pcibios_config_access() 33 *val = vrc_pciregs[(0x200 + where) >> 2]; in nile4_pcibios_config_access() 52 | (where & ~3)); in nile4_pcibios_config_access() 55 (where & ~3); in nile4_pcibios_config_access() 75 int where, int size, u32 *val) in nile4_pcibios_read() argument 80 if ((size == 2) && (where & 1)) in nile4_pcibios_read() 82 else if ((size == 4) && (where & 3)) in nile4_pcibios_read() 85 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in nile4_pcibios_read() 91 *val = (data >> ((where & 3) << 3)) & 0xff; in nile4_pcibios_read() [all …]
|
D | ops-msc.c | 47 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in msc_pcibios_config_access() argument 60 ((where / 4) << MSC01_PCI_CFGADDR_RNUM_SHF))); in msc_pcibios_config_access() 89 int where, int size, u32 * val) in msc_pcibios_read() argument 93 if ((size == 2) && (where & 1)) in msc_pcibios_read() 95 else if ((size == 4) && (where & 3)) in msc_pcibios_read() 98 if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in msc_pcibios_read() 103 *val = (data >> ((where & 3) << 3)) & 0xff; in msc_pcibios_read() 105 *val = (data >> ((where & 3) << 3)) & 0xffff; in msc_pcibios_read() 113 int where, int size, u32 val) in msc_pcibios_write() argument 117 if ((size == 2) && (where & 1)) in msc_pcibios_write() [all …]
|
D | ops-bonito64.c | 38 unsigned int devfn, int where, in bonito64_pcibios_config_access() argument 47 int reg = where & ~3; in bonito64_pcibios_config_access() 102 int where, int size, u32 * val) in bonito64_pcibios_read() argument 106 if ((size == 2) && (where & 1)) in bonito64_pcibios_read() 108 else if ((size == 4) && (where & 3)) in bonito64_pcibios_read() 111 if (bonito64_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in bonito64_pcibios_read() 116 *val = (data >> ((where & 3) << 3)) & 0xff; in bonito64_pcibios_read() 118 *val = (data >> ((where & 3) << 3)) & 0xffff; in bonito64_pcibios_read() 126 int where, int size, u32 val) in bonito64_pcibios_write() argument 130 if ((size == 2) && (where & 1)) in bonito64_pcibios_write() [all …]
|
D | ops-bridge.c | 20 static u32 emulate_ioc3_cfg(int where, int size) in emulate_ioc3_cfg() argument 22 if (size == 1 && where == 0x3d) in emulate_ioc3_cfg() 24 else if (size == 2 && where == 0x3c) in emulate_ioc3_cfg() 26 else if (size == 4 && where == 0x3c) in emulate_ioc3_cfg() 44 int where, int size, u32 * value) in pci_conf0_read_config() argument 65 addr = &bridge->b_type0_cfg_dev[slot].f[fn].c[where ^ (4 - size)]; in pci_conf0_read_config() 82 if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) { in pci_conf0_read_config() 83 *value = emulate_ioc3_cfg(where, size); in pci_conf0_read_config() 91 addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2]; in pci_conf0_read_config() 96 shift = ((where & 3) << 3); in pci_conf0_read_config() [all …]
|
D | ops-pmcmsp.c | 118 unsigned char where = 0; /* Write to static Device/Vendor ID */ in gen_pci_cfg_wr_show() local 146 (where & 0xFC); in gen_pci_cfg_wr_show() 363 unsigned char where, in msp_pcibios_config_access() argument 426 (where & 0xFC); in msp_pcibios_config_access() 492 int where, in msp_pcibios_read_config_byte() argument 503 where, &data)) { in msp_pcibios_read_config_byte() 508 *val = (data >> ((where & 3) << 3)) & 0x0ff; in msp_pcibios_read_config_byte() 540 int where, in msp_pcibios_read_config_word() argument 551 if ((where & 3) == 3) { in msp_pcibios_read_config_word() 562 where, &data)) { in msp_pcibios_read_config_word() [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 110 int where, int size, u32 * val) in bcm1480ht_pcibios_read() argument 114 if ((size == 2) && (where & 1)) in bcm1480ht_pcibios_read() 116 else if ((size == 4) && (where & 3)) in bcm1480ht_pcibios_read() 120 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480ht_pcibios_read() 125 *val = (data >> ((where & 3) << 3)) & 0xff; in bcm1480ht_pcibios_read() 127 *val = (data >> ((where & 3) << 3)) & 0xffff; in bcm1480ht_pcibios_read() 135 int where, int size, u32 val) in bcm1480ht_pcibios_write() argument 137 u32 cfgaddr = CFGADDR(bus, devfn, where); in bcm1480ht_pcibios_write() [all …]
|
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() 46 (where & 0xfc), PCICONFAREG); in set_pci_configuration_address() 51 if (where > 0xff) in set_pci_configuration_address() 55 (where & 0xfc) | 1U, PCICONFAREG); 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() 74 *val = (data >> ((where & 3) << 3)) & 0xffU; in pci_config_read() 77 *val = (data >> ((where & 2) << 3)) & 0xffffU; in pci_config_read() 89 static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_write() argument [all …]
|
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() argument 72 reg = where >> 2; in bcm63xx_setup_cfg_access() [all …]
|
D | ops-loongson3.c | 17 int where, u32 *data) in loongson3_pci_config_access() argument 24 int reg = where & ~3; in loongson3_pci_config_access() 51 int where, int size, u32 *val) in loongson3_pci_pcibios_read() argument 55 bus, devfn, where, &data); in loongson3_pci_pcibios_read() 61 *val = (data >> ((where & 3) << 3)) & 0xff; in loongson3_pci_pcibios_read() 63 *val = (data >> ((where & 3) << 3)) & 0xffff; in loongson3_pci_pcibios_read() 71 int where, int size, u32 val) in loongson3_pci_pcibios_write() argument 80 bus, devfn, where, &data); in loongson3_pci_pcibios_write() 85 data = (data & ~(0xff << ((where & 3) << 3))) | in loongson3_pci_pcibios_write() 86 (val << ((where & 3) << 3)); in loongson3_pci_pcibios_write() [all …]
|
D | ops-lantiq.c | 29 unsigned int devfn, unsigned int where, u32 *data) in ltq_pci_config_access() argument 45 LTQ_PCI_CFG_FUNNUM_SHF) | (where & ~0x3); in ltq_pci_config_access() 74 int where, int size, u32 *val) 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() 82 *val = (data >> ((where & 3) << 3)) & 0xff; in ltq_pci_read_config_dword() 84 *val = (data >> ((where & 3) << 3)) & 0xffff; in ltq_pci_read_config_dword() 92 int where, int size, u32 val) in ltq_pci_write_config_dword() argument 100 devfn, where, &data)) in ltq_pci_write_config_dword() 104 data = (data & ~(0xff << ((where & 3) << 3))) | in ltq_pci_write_config_dword() 105 (val << ((where & 3) << 3)); in ltq_pci_write_config_dword() [all …]
|
D | ops-gt64xxx_pci0.c | 43 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in gt64xxx_pci0_pcibios_config_access() argument 59 ((where / 4) << GT_PCI0_CFGADDR_REGNUM_SHF) | in gt64xxx_pci0_pcibios_config_access() 104 int where, int size, u32 * val) in gt64xxx_pci0_pcibios_read() argument 109 where, &data)) in gt64xxx_pci0_pcibios_read() 113 *val = (data >> ((where & 3) << 3)) & 0xff; in gt64xxx_pci0_pcibios_read() 115 *val = (data >> ((where & 3) << 3)) & 0xffff; in gt64xxx_pci0_pcibios_read() 123 int where, int size, u32 val) in gt64xxx_pci0_pcibios_write() argument 131 devfn, where, &data)) in gt64xxx_pci0_pcibios_write() 135 data = (data & ~(0xff << ((where & 3) << 3))) | in gt64xxx_pci0_pcibios_write() 136 (val << ((where & 3) << 3)); in gt64xxx_pci0_pcibios_write() [all …]
|
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 121 int where, int size, u32 * val) in bcm1480_pcibios_read() argument 125 if ((size == 2) && (where & 1)) in bcm1480_pcibios_read() 127 else if ((size == 4) && (where & 3)) in bcm1480_pcibios_read() 131 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480_pcibios_read() 136 *val = (data >> ((where & 3) << 3)) & 0xff; in bcm1480_pcibios_read() 138 *val = (data >> ((where & 3) << 3)) & 0xffff; in bcm1480_pcibios_read() 146 int where, int size, u32 val) in bcm1480_pcibios_write() argument 148 u32 cfgaddr = CFGADDR(bus, devfn, where); in bcm1480_pcibios_write() [all …]
|
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 130 int where, int size, u32 * val) in sb1250_pcibios_read() argument 134 if ((size == 2) && (where & 1)) in sb1250_pcibios_read() 136 else if ((size == 4) && (where & 3)) in sb1250_pcibios_read() 140 data = READCFG32(CFGADDR(bus, devfn, where)); in sb1250_pcibios_read() 145 *val = (data >> ((where & 3) << 3)) & 0xff; in sb1250_pcibios_read() 147 *val = (data >> ((where & 3) << 3)) & 0xffff; in sb1250_pcibios_read() 155 int where, int size, u32 val) in sb1250_pcibios_write() argument 157 u32 cfgaddr = CFGADDR(bus, devfn, where); in sb1250_pcibios_write() [all …]
|
D | ops-loongson2.c | 37 unsigned int devfn, int where, in loongson_pcibios_config_access() argument 46 int reg = where & ~3; in loongson_pcibios_config_access() 122 int where, int size, u32 *val) in loongson_pcibios_read() argument 126 if ((size == 2) && (where & 1)) in loongson_pcibios_read() 128 else if ((size == 4) && (where & 3)) in loongson_pcibios_read() 131 if (loongson_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in loongson_pcibios_read() 136 *val = (data >> ((where & 3) << 3)) & 0xff; in loongson_pcibios_read() 138 *val = (data >> ((where & 3) << 3)) & 0xffff; in loongson_pcibios_read() 146 int where, int size, u32 val) in loongson_pcibios_write() argument 150 if ((size == 2) && (where & 1)) in loongson_pcibios_write() [all …]
|
D | ops-emma2rh.c | 60 unsigned int devfn, int where) in set_pci_configuration_address() argument 82 static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_read() argument 97 if (set_pci_configuration_address(bus_num, devfn, where) < 0) in pci_config_read() 102 (where & 0xfffffffc)); in pci_config_read() 106 *val = (data >> ((where & 3) << 3)) & 0xffU; in pci_config_read() 109 *val = (data >> ((where & 2) << 3)) & 0xffffU; in pci_config_read() 127 static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_write() argument 141 if (set_pci_configuration_address(bus_num, devfn, where) < 0) in pci_config_write() 147 (where & 0xfffffffc)); in pci_config_write() 151 shift = (where & 3) << 3; in pci_config_write() [all …]
|
D | pci-xlp.c | 64 int where) in pci_cfg_read_32bit() argument 69 where &= ~3; 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() 93 int where, u32 data) in pci_cfg_write_32bit() argument 98 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_write_32bit() 103 int where, int size, u32 *val) in nlm_pcibios_read() argument 107 if ((size == 2) && (where & 1)) in nlm_pcibios_read() 109 else if ((size == 4) && (where & 3)) in nlm_pcibios_read() 112 data = pci_cfg_read_32bit(bus, devfn, where); in nlm_pcibios_read() [all …]
|
D | pci-xlr.c | 63 int where) in pci_cfg_read_32bit() argument 69 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_read_32bit() 75 int where, u32 data) in pci_cfg_write_32bit() argument 80 pci_cfg_addr(bus->number, devfn, where & ~3)); in pci_cfg_write_32bit() 85 int where, int size, u32 *val) in nlm_pcibios_read() argument 89 if ((size == 2) && (where & 1)) in nlm_pcibios_read() 91 else if ((size == 4) && (where & 3)) in nlm_pcibios_read() 94 data = pci_cfg_read_32bit(bus, devfn, where); in nlm_pcibios_read() 97 *val = (data >> ((where & 3) << 3)) & 0xff; in nlm_pcibios_read() 99 *val = (data >> ((where & 3) << 3)) & 0xffff; in nlm_pcibios_read() [all …]
|
D | pci-alchemy.c | 99 unsigned int dev_fn, unsigned char where, u32 *data) in config_access() argument 134 offset = (function << 8) | (where & ~0x3); in config_access() 160 access_type, bus->number, device, where, *data, offset); in config_access() 188 int where, u8 *val) in read_config_byte() argument 191 int ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte() 193 if (where & 1) in read_config_byte() 195 if (where & 2) in read_config_byte() 202 int where, u16 *val) in read_config_word() argument 205 int ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word() 207 if (where & 2) in read_config_word() [all …]
|
/arch/mn10300/unit-asb2305/ |
D | pci.c | 55 #define CONFIG_CMD(bus, devfn, where) \ argument 56 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) 83 int where, u32 *_value) in pci_ampci_read_config_byte() argument 88 value = BRIDGEREGB(where); in pci_ampci_read_config_byte() 89 __pcbdebug("=> %02hx", &BRIDGEREGL(where), value); in pci_ampci_read_config_byte() 91 CONFIG_ADDRESS = CONFIG_CMD(bus, devfn, where); in pci_ampci_read_config_byte() 93 value = CONFIG_DATAB(where); in pci_ampci_read_config_byte() 95 __pcidebug("=> %02hx", bus, devfn, where, value); in pci_ampci_read_config_byte() 103 int where, u32 *_value) in pci_ampci_read_config_word() argument 108 value = BRIDGEREGW(where); in pci_ampci_read_config_word() [all …]
|
/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 31 reg = where & ~3; in sh7786_pcie_config_access() 93 int where, int size, u32 *val) in sh7786_pcie_read() argument 99 if ((size == 2) && (where & 1)) in sh7786_pcie_read() 101 else if ((size == 4) && (where & 3)) in sh7786_pcie_read() 106 devfn, where, &data); in sh7786_pcie_read() 113 *val = (data >> ((where & 3) << 3)) & 0xff; in sh7786_pcie_read() 115 *val = (data >> ((where & 2) << 3)) & 0xffff; in sh7786_pcie_read() 121 devfn, where, size, (unsigned long)*val); in sh7786_pcie_read() 129 int where, int size, u32 val) in sh7786_pcie_write() argument [all …]
|
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() 31 *val = (u8)SH5PCI_READ_BYTE(PDR + (where & 3)); in sh5pci_read() 34 *val = (u16)SH5PCI_READ_SHORT(PDR + (where & 2)); 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() 51 SH5PCI_WRITE_BYTE(PDR + (where & 3), (u8)val); in sh5pci_write() 54 SH5PCI_WRITE_SHORT(PDR + (where & 2), (u16)val); in sh5pci_write()
|
D | ops-dreamcast.c | 49 static int gapspci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) in gapspci_read() argument 57 case 1: *val = inb(GAPSPCI_BBA_CONFIG+where); break; in gapspci_read() 58 case 2: *val = inw(GAPSPCI_BBA_CONFIG+where); break; in gapspci_read() 59 case 4: *val = inl(GAPSPCI_BBA_CONFIG+where); break; 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 71 case 1: outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break; in gapspci_write() 72 case 2: outw((u16)val, GAPSPCI_BBA_CONFIG+where); break; in gapspci_write() 73 case 4: outl((u32)val, GAPSPCI_BBA_CONFIG+where); break; in gapspci_write()
|
D | ops-sh4.c | 19 #define CONFIG_CMD(bus, devfn, where) \ argument 20 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3)) 26 int where, int size, u32 *val) in sh4_pci_read() argument 37 pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR); in sh4_pci_read() 43 *val = (data >> ((where & 3) << 3)) & 0xff; in sh4_pci_read() 46 *val = (data >> ((where & 2) << 3)) & 0xffff; in sh4_pci_read() 64 int where, int size, u32 val) in sh4_pci_write() argument 72 pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR); in sh4_pci_write() 78 shift = (where & 3) << 3; in sh4_pci_write() 83 shift = (where & 2) << 3; in sh4_pci_write()
|
/arch/sparc/kernel/ |
D | pci_common.c | 53 int where, int size, u32 *value) in sun4u_read_pci_cfg_host() argument 59 addr = sun4u_config_mkaddr(pbm, bus, devfn, where); in sun4u_read_pci_cfg_host() 65 if (where < 8) { in sun4u_read_pci_cfg_host() 70 if (where & 1) in sun4u_read_pci_cfg_host() 81 if (where < 8) { in sun4u_read_pci_cfg_host() 95 where, 2, &tmp32); in sun4u_read_pci_cfg_host() 100 where + 2, 2, &tmp32); in sun4u_read_pci_cfg_host() 108 int where, int size, u32 *value) in sun4u_read_pci_cfg() argument 129 return sun4u_read_pci_cfg_host(pbm, bus, devfn, where, in sun4u_read_pci_cfg() 132 addr = sun4u_config_mkaddr(pbm, bus, devfn, where); in sun4u_read_pci_cfg() [all …]
|