Home
last modified time | relevance | path

Searched refs:where (Results 1 – 25 of 131) sorted by relevance

123456

/arch/mips/pci/
Dops-rc32434.c49 unsigned char where, u32 *data) in config_access() argument
55 PCI_CFG_SET(bus->number, slot, func, where); in config_access()
74 int where, u8 *val) in read_config_byte() argument
79 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte()
80 *val = (data >> ((where & 3) << 3)) & 0xff; in read_config_byte()
85 int where, u16 *val) in read_config_word() argument
90 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word()
91 *val = (data >> ((where & 3) << 3)) & 0xffff; in read_config_word()
96 int where, u32 *val) in read_config_dword() argument
109 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, val); in read_config_dword()
[all …]
Dops-pnx8550.c42 calc_cfg_addr(struct pci_bus *bus, unsigned int devfn, int where) in calc_cfg_addr() argument
47 addr |= ((devfn & 0xff) << PCI_CFG_FUNC_SHIFT) | (where & 0xfc); in calc_cfg_addr()
53 config_access(unsigned int pci_cmd, struct pci_bus *bus, unsigned int devfn, int where, unsigned in… in config_access() argument
57 unsigned long ioaddr = calc_cfg_addr(bus, devfn, where); in config_access()
113 read_config_byte(struct pci_bus *bus, unsigned int devfn, int where, u8 * val) in read_config_byte() argument
121 err = config_access(PCI_CMD_CONFIG_READ, bus, devfn, where, ~(1 << (where & 3)), &data); in read_config_byte()
122 switch (where & 0x03) { in read_config_byte()
141 read_config_word(struct pci_bus *bus, unsigned int devfn, int where, u16 * val) in read_config_word() argument
149 if (where & 0x01) in read_config_word()
152 err = config_access(PCI_CMD_CONFIG_READ, bus, devfn, where, ~(3 << (where & 3)), &data); in read_config_word()
[all …]
Dops-msc.c48 struct pci_bus *bus, unsigned int devfn, int where, u32 * data) in msc_pcibios_config_access() argument
61 ((where / 4) << MSC01_PCI_CFGADDR_RNUM_SHF))); in msc_pcibios_config_access()
90 int where, int size, u32 * val) in msc_pcibios_read() argument
94 if ((size == 2) && (where & 1)) in msc_pcibios_read()
96 else if ((size == 4) && (where & 3)) in msc_pcibios_read()
99 if (msc_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in msc_pcibios_read()
104 *val = (data >> ((where & 3) << 3)) & 0xff; in msc_pcibios_read()
106 *val = (data >> ((where & 3) << 3)) & 0xffff; in msc_pcibios_read()
114 int where, int size, u32 val) in msc_pcibios_write() argument
118 if ((size == 2) && (where & 1)) in msc_pcibios_write()
[all …]
Dops-nile4.c21 struct pci_bus *bus, unsigned int devfn, int where, u32 *val) in nile4_pcibios_config_access() argument
35 vrc_pciregs[(0x200 + where) >> 2] = *val; in nile4_pcibios_config_access()
37 *val = vrc_pciregs[(0x200 + where) >> 2]; in nile4_pcibios_config_access()
56 | (where & ~3)); in nile4_pcibios_config_access()
59 (where & ~3); in nile4_pcibios_config_access()
79 int where, int size, u32 *val) in nile4_pcibios_read() argument
85 if ((size == 2) && (where & 1)) in nile4_pcibios_read()
87 else if ((size == 4) && (where & 3)) in nile4_pcibios_read()
91 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in nile4_pcibios_read()
99 *val = (data >> ((where & 3) << 3)) & 0xff; in nile4_pcibios_read()
[all …]
Dops-au1000.c94 unsigned int dev_fn, unsigned char where, u32 *data) in config_access() argument
132 offset = (function << 8) | (where & ~0x3); in config_access()
160 access_type, bus->number, device, where, *data, offset); in config_access()
190 int where, u8 *val) in read_config_byte() argument
195 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_byte()
196 if (where & 1) in read_config_byte()
198 if (where & 2) in read_config_byte()
205 int where, u16 *val) in read_config_word() argument
210 ret = config_access(PCI_ACCESS_READ, bus, devfn, where, &data); in read_config_word()
211 if (where & 2) in read_config_word()
[all …]
Dops-bridge.c20 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 …]
Dpci-bcm1480ht.c51 #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 …]
Dops-bonito64.c44 unsigned int devfn, int where, in bonito64_pcibios_config_access() argument
53 int reg = where & ~3; in bonito64_pcibios_config_access()
110 int where, int size, u32 * val) in bonito64_pcibios_read() argument
114 if ((size == 2) && (where & 1)) in bonito64_pcibios_read()
116 else if ((size == 4) && (where & 3)) in bonito64_pcibios_read()
119 if (bonito64_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, in bonito64_pcibios_read()
124 *val = (data >> ((where & 3) << 3)) & 0xff; in bonito64_pcibios_read()
126 *val = (data >> ((where & 3) << 3)) & 0xffff; in bonito64_pcibios_read()
134 int where, int size, u32 val) in bonito64_pcibios_write() argument
138 if ((size == 2) && (where & 1)) in bonito64_pcibios_write()
[all …]
Dops-pmcmsp.c129 unsigned char where = 0; /* Write to static Device/Vendor ID */ in gen_pci_cfg_wr() local
158 (where & 0xFC); in gen_pci_cfg_wr()
378 unsigned char where, in msp_pcibios_config_access() argument
442 (where & 0xFC); in msp_pcibios_config_access()
514 int where, in msp_pcibios_read_config_byte() argument
525 where, &data)) { in msp_pcibios_read_config_byte()
530 *val = (data >> ((where & 3) << 3)) & 0x0ff; in msp_pcibios_read_config_byte()
562 int where, in msp_pcibios_read_config_word() argument
573 if ((where & 3) == 3) { in msp_pcibios_read_config_word()
584 where, &data)) { in msp_pcibios_read_config_word()
[all …]
Dops-vr41xx.c36 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 …]
Dops-gt64xxx_pci0.c43 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 …]
Dpci-bcm1480.c52 #define CFGOFFSET(bus, devfn, where) (((bus)<<16)+((devfn)<<8)+(where)) argument
53 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) argument
120 int where, int size, u32 * val) in bcm1480_pcibios_read() argument
124 if ((size == 2) && (where & 1)) in bcm1480_pcibios_read()
126 else if ((size == 4) && (where & 3)) in bcm1480_pcibios_read()
130 data = READCFG32(CFGADDR(bus, devfn, where)); in bcm1480_pcibios_read()
135 *val = (data >> ((where & 3) << 3)) & 0xff; in bcm1480_pcibios_read()
137 *val = (data >> ((where & 3) << 3)) & 0xffff; in bcm1480_pcibios_read()
145 int where, int size, u32 val) in bcm1480_pcibios_write() argument
147 u32 cfgaddr = CFGADDR(bus, devfn, where); in bcm1480_pcibios_write()
[all …]
Dpci-sb1250.c52 #define CFGOFFSET(bus, devfn, where) (((bus)<<16) + ((devfn)<<8) + (where)) argument
53 #define CFGADDR(bus, devfn, where) CFGOFFSET((bus)->number, (devfn), where) argument
129 int where, int size, u32 * val) in sb1250_pcibios_read() argument
133 if ((size == 2) && (where & 1)) in sb1250_pcibios_read()
135 else if ((size == 4) && (where & 3)) in sb1250_pcibios_read()
139 data = READCFG32(CFGADDR(bus, devfn, where)); in sb1250_pcibios_read()
144 *val = (data >> ((where & 3) << 3)) & 0xff; in sb1250_pcibios_read()
146 *val = (data >> ((where & 3) << 3)) & 0xffff; in sb1250_pcibios_read()
154 int where, int size, u32 val) in sb1250_pcibios_write() argument
156 u32 cfgaddr = CFGADDR(bus, devfn, where); in sb1250_pcibios_write()
[all …]
Dops-emma2rh.c65 unsigned int devfn, int where) in set_pci_configuration_address() argument
87 static int pci_config_read(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_read() argument
102 if (set_pci_configuration_address(bus_num, devfn, where) < 0) in pci_config_read()
107 (where & 0xfffffffc)); in pci_config_read()
111 *val = (data >> ((where & 3) << 3)) & 0xffU; in pci_config_read()
114 *val = (data >> ((where & 2) << 3)) & 0xffffU; in pci_config_read()
132 static int pci_config_write(struct pci_bus *bus, unsigned int devfn, int where, in pci_config_write() argument
146 if (set_pci_configuration_address(bus_num, devfn, where) < 0) in pci_config_write()
152 (where & 0xfffffffc)); in pci_config_write()
156 shift = (where & 3) << 3; in pci_config_write()
[all …]
/arch/arm/common/
Dvia82c505.c15 #define CONFIG_CMD(bus, devfn, where) (0x80000000 | (bus->number << 16) | (devfn << 8) | (where &… argument
18 via82c505_read_config(struct pci_bus *bus, unsigned int devfn, int where, in via82c505_read_config() argument
21 outl(CONFIG_CMD(bus,devfn,where),0xCF8); in via82c505_read_config()
24 *value=inb(0xCFC + (where&3)); in via82c505_read_config()
27 *value=inw(0xCFC + (where&2)); in via82c505_read_config()
37 via82c505_write_config(struct pci_bus *bus, unsigned int devfn, int where, in via82c505_write_config() argument
40 outl(CONFIG_CMD(bus,devfn,where),0xCF8); in via82c505_write_config()
43 outb(value, 0xCFC + (where&3)); in via82c505_write_config()
46 outw(value, 0xCFC + (where&2)); in via82c505_write_config()
/arch/mn10300/unit-asb2305/
Dpci.c33 #define CONFIG_CMD(bus, devfn, where) \ argument
34 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
107 int where, u32 *_value) in pci_ampci_read_config_byte() argument
112 value = BRIDGEREGB(where); in pci_ampci_read_config_byte()
113 __pcbdebug("=> %02hx", &BRIDGEREGL(where), value); in pci_ampci_read_config_byte()
115 CONFIG_ADDRESS = CONFIG_CMD(bus, devfn, where); in pci_ampci_read_config_byte()
117 value = CONFIG_DATAB(where); in pci_ampci_read_config_byte()
119 __pcidebug("=> %02hx", bus, devfn, where, value); in pci_ampci_read_config_byte()
127 int where, u32 *_value) in pci_ampci_read_config_word() argument
132 value = BRIDGEREGW(where); in pci_ampci_read_config_word()
[all …]
/arch/sparc/kernel/
Dpci_common.c54 int where, int size, u32 *value) in sun4u_read_pci_cfg_host() argument
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() argument
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()
[all …]
/arch/sh/drivers/pci/
Dops-sh5.c50 static int sh5pci_read(struct pci_bus *bus, unsigned int devfn, int where, in sh5pci_read() argument
53 SH5PCI_WRITE(PAR, CONFIG_CMD(bus, devfn, where)); in sh5pci_read()
57 *val = (u8)SH5PCI_READ_BYTE(PDR + (where & 3)); in sh5pci_read()
60 *val = (u16)SH5PCI_READ_SHORT(PDR + (where & 2)); in sh5pci_read()
70 static int sh5pci_write(struct pci_bus *bus, unsigned int devfn, int where, in sh5pci_write() argument
73 SH5PCI_WRITE(PAR, CONFIG_CMD(bus, devfn, where)); in sh5pci_write()
77 SH5PCI_WRITE_BYTE(PDR + (where & 3), (u8)val); in sh5pci_write()
80 SH5PCI_WRITE_SHORT(PDR + (where & 2), (u16)val); in sh5pci_write()
Dops-sh4.c18 #define CONFIG_CMD(bus, devfn, where) \ argument
19 P1SEGADDR((bus->number << 16) | (devfn << 8) | (where & ~3))
27 int where, int size, u32 *val) in sh4_pci_read() argument
37 pci_write_reg(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
71 pci_write_reg(CONFIG_CMD(bus, devfn, where), SH4_PCIPAR); in sh4_pci_write()
77 shift = (where & 3) << 3; in sh4_pci_write()
82 shift = (where & 2) << 3; in sh4_pci_write()
Dops-dreamcast.c80 static int gapspci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) in gapspci_read() argument
88 case 1: *val = inb(GAPSPCI_BBA_CONFIG+where); break; in gapspci_read()
89 case 2: *val = inw(GAPSPCI_BBA_CONFIG+where); break; in gapspci_read()
90 case 4: *val = inl(GAPSPCI_BBA_CONFIG+where); break; in gapspci_read()
96 static int gapspci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) in gapspci_write() argument
102 case 1: outb(( u8)val, GAPSPCI_BBA_CONFIG+where); break; in gapspci_write()
103 case 2: outw((u16)val, GAPSPCI_BBA_CONFIG+where); break; in gapspci_write()
104 case 4: outl((u32)val, GAPSPCI_BBA_CONFIG+where); break; in gapspci_write()
/arch/arm/mach-ixp2000/
Dpci.c40 ixp2000_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where) in ixp2000_pci_config_addr() argument
48 where &= ~3; in ixp2000_pci_config_addr()
57 | (PCI_FUNC(devfn) << 8) | where); in ixp2000_pci_config_addr()
62 | (PCI_FUNC(devfn) << 8) | where); in ixp2000_pci_config_addr()
81 int ixp2000_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where, in ixp2000_pci_read_config() argument
87 n = where % 4; in ixp2000_pci_read_config()
89 addr = ixp2000_pci_config_addr(bus->number, devfn, where); in ixp2000_pci_read_config()
109 int ixp2000_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where, in ixp2000_pci_write_config() argument
116 mask = ~(bytemask[size] << ((where % 0x4) * 8)); in ixp2000_pci_write_config()
117 addr = ixp2000_pci_config_addr(bus->number, devfn, where); in ixp2000_pci_write_config()
[all …]
/arch/arm/mach-ixp23xx/
Dpci.c49 *ixp23xx_pci_config_addr(unsigned int bus_nr, unsigned int devfn, int where) in ixp23xx_pci_config_addr() argument
56 where &= ~3; in ixp23xx_pci_config_addr()
67 | (PCI_FUNC(devfn) << 8) | where); in ixp23xx_pci_config_addr()
72 | (PCI_FUNC(devfn) << 8) | where); in ixp23xx_pci_config_addr()
91 int where, int size, u32 *value) in ixp23xx_pci_read_config() argument
96 n = where % 4; in ixp23xx_pci_read_config()
98 DBG("In config_read(%d) %d from dev %d:%d:%d\n", size, where, in ixp23xx_pci_read_config()
101 addr = ixp23xx_pci_config_addr(bus->number, devfn, where); in ixp23xx_pci_read_config()
122 int where, int size, u32 value) in ixp23xx_pci_write_config() argument
128 mask = ~(bytemask[size] << ((where % 0x4) * 8)); in ixp23xx_pci_write_config()
[all …]
/arch/arm/plat-orion/
Dpcie.c172 u32 devfn, int where, int size, u32 *val) in orion_pcie_rd_conf() argument
177 PCIE_CONF_REG(where) | PCIE_CONF_ADDR_EN, in orion_pcie_rd_conf()
183 *val = (*val >> (8 * (where & 3))) & 0xff; in orion_pcie_rd_conf()
185 *val = (*val >> (8 * (where & 3))) & 0xffff; in orion_pcie_rd_conf()
191 u32 devfn, int where, int size, u32 *val) in orion_pcie_rd_conf_tlp() argument
196 PCIE_CONF_REG(where) | PCIE_CONF_ADDR_EN, in orion_pcie_rd_conf_tlp()
206 *val = (*val >> (8 * (where & 3))) & 0xff; in orion_pcie_rd_conf_tlp()
208 *val = (*val >> (8 * (where & 3))) & 0xffff; in orion_pcie_rd_conf_tlp()
214 u32 devfn, int where, int size, u32 *val) in orion_pcie_rd_conf_wa() argument
219 PCIE_CONF_REG(where))); in orion_pcie_rd_conf_wa()
[all …]
/arch/arm/mach-ks8695/
Dpci.c44 static void ks8695_pci_setupconfig(unsigned int bus_nr, unsigned int devfn, unsigned int where) in ks8695_pci_setupconfig() argument
48 pbca = PBCA_ENABLE | (where & ~3); in ks8695_pci_setupconfig()
70 unsigned int devfn, int where, int size, u32 *value) in ks8695_pci_readconfig() argument
72 ks8695_pci_setupconfig(bus->number, devfn, where); in ks8695_pci_readconfig()
80 *value = *value >> ((where & 2) * 8); in ks8695_pci_readconfig()
84 *value = *value >> ((where & 3) * 8); in ks8695_pci_readconfig()
91 bus->number, devfn, where, size, *value, in ks8695_pci_readconfig()
99 unsigned int devfn, int where, int size, u32 value) in ks8695_pci_writeconfig() argument
105 bus->number, devfn, where, size, value); in ks8695_pci_writeconfig()
108 ks8695_pci_setupconfig(bus->number, devfn, where); in ks8695_pci_writeconfig()
[all …]
/arch/arm/mach-ixp4xx/
Dcommon-pci.c169 static u32 ixp4xx_config_addr(u8 bus_num, u16 devfn, int where) in ixp4xx_config_addr() argument
175 (where & ~3); in ixp4xx_config_addr()
179 ((PCI_FUNC(devfn)) << 8) | (where & ~3) | 1; in ixp4xx_config_addr()
207 static int local_read_config(int where, int size, u32 *value) in local_read_config() argument
210 pr_debug("local_read_config from %d size %d\n", where, size); in local_read_config()
211 n = where % 4; in local_read_config()
212 crp_read(where & ~3, &data); in local_read_config()
218 static int local_write_config(int where, int size, u32 value) in local_write_config() argument
221 pr_debug("local_write_config %#x to %d size %d\n", value, where, size); in local_write_config()
222 n = where % 4; in local_write_config()
[all …]

123456