15 #include <linux/module.h>
16 #include <linux/kernel.h>
18 #include <linux/pci.h>
19 #include <linux/slab.h>
25 #define CONFIG_CMD(bus, devfn, where) \
26 (0x80000000 | (bus->number << 16) | (devfn << 8) | (where & ~3))
69 .read = puv3_read_config,
70 .write = puv3_write_config,
106 if (dev->
bus->number == 0) {
107 #ifdef CONFIG_ARCH_FPGA
108 if (dev->
devfn == 0x00)
110 else if (dev->
devfn == 0x08)
112 else if (dev->
devfn == 0x10)
114 else if (dev->
devfn == 0x18)
117 #ifdef CONFIG_PUV3_DB0913
118 if (dev->
devfn == 0x30)
120 else if (dev->
devfn == 0x60)
122 else if (dev->
devfn == 0x58)
125 #if defined(CONFIG_PUV3_NB0916) || defined(CONFIG_PUV3_SMW0919)
127 if (dev->
devfn == 0x00)
141 unsigned long *zhole_size)
148 if (zone_size[0] <= sz)
151 zone_size[1] = zone_size[0] - sz;
153 zhole_size[1] = zhole_size[0];
161 static inline int pdev_bad_for_parity(
struct pci_dev *dev)
187 pci_read_config_word(dev,
PCI_STATUS, &status);
198 if (pdev_bad_for_parity(dev))
202 switch (dev->
class >> 8) {
253 #ifdef CONFIG_HOTPLUG
266 panic(
"PCI: unable to scan bus!");
270 if (!pci_has_flag(PCI_PROBE_ONLY)) {
293 if (!
strcmp(str,
"debug")) {
296 }
else if (!
strcmp(str,
"firmware")) {
297 pci_add_flags(PCI_PROBE_ONLY);
329 start = (start + 0x3ff) & ~0x3ff;
331 start = (start + align - 1) & ~(align - 1);
348 for (idx = 0; idx < 6; idx++) {
350 if (!(mask & (1 << idx)))
356 " of resource collisions\n", pci_name(dev));
371 if (cmd != old_cmd) {
372 printk(
"PCI: enabling device %s (%04x -> %04x)\n",
373 pci_name(dev), old_cmd, cmd);