Lines Matching +full:reg +full:- +full:names
6 * Copyright 1997--1999 Martin Mares <mj@ucw.cz>
23 * The PCI interface treats multi-function devices as independent
39 #define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */
65 unsigned char number; /* PCI_SLOT(pci_dev->devfn) */
71 return kobject_name(&slot->kobj); in pci_slot_name()
90 /* #0-5: standard PCI resources */
100 PCI_IOV_RESOURCE_END = PCI_IOV_RESOURCES + PCI_SRIOV_NUM_BARS - 1,
108 PCI_BRIDGE_RESOURCE_NUM - 1,
125 #define PCI_POWER_ERROR ((pci_power_t __force) -1)
162 /* Use #PERST to reset PCI-E device */
165 /* Use PCI-E Hot Reset to reset device */
239 struct list_head bus_list; /* node in per-bus list */
243 void *sysdata; /* hook for sys-specific extension */
252 unsigned int class; /* 3 bytes: (base,sub,prog-if) */
255 u8 pcie_cap; /* PCI-E capability offset */
256 u8 pcie_type:4; /* PCI-E device/port type */
257 u8 pcie_mpss:3; /* PCI-E Max Payload Size Supported */
266 or supports 64-bit transfers. */
270 pci_power_t current_state; /* Current operating state. In ACPI-speak,
271 this is D0-D3, D0 being fully functional,
285 unsigned int d3_delay; /* D3->D0 transition time in ms */
302 resource_size_t fw_addr[DEVICE_COUNT_RESOURCE]; /* FW-assigned addr */
306 unsigned int multifunction:1;/* Part of multi-function device */
344 struct pci_sriov *sriov; /* SR-IOV capability related */
354 if (dev->is_virtfn) in pci_physfn()
355 dev = dev->physfn; in pci_physfn()
369 return (pdev->error_state != pci_channel_io_normal); in pci_channel_offline()
378 hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) { in pci_find_saved_cap()
379 if (tmp->cap.cap_nr == cap) in pci_find_saved_cap()
388 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); in pci_add_saved_cap()
401 * This does not apply to ACPI _CRS windows, even with the _DEC subtractive-
425 void *sysdata; /* hook for sys-specific extension */
450 * Returns true if the pci bus is root (behind host-pci bridge),
455 return !(pbus->parent); in pci_is_root_bus()
461 return pci_dev->msi_enabled || pci_dev->msix_enabled; in pci_dev_msi_enabled()
478 /* Low-level architecture-dependent routines */
490 unsigned int devfn, int reg, int len, u32 *val);
492 unsigned int devfn, int reg, int len, u32 val);
504 /* ---------------------------------------------------------------- */
505 /** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides
536 /* MMIO has been re-enabled, but not DMA */
549 /* ---------------------------------------------------------------- */
555 const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */
557 void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
571 * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table
581 * PCI_DEVICE - macro used to describe a specific pci device
594 * PCI_DEVICE_CLASS - macro used to describe a specific pci device class
595 * @dev_class: the class, subclass, prog-if triple for this device
608 * PCI_VDEVICE - macro used to describe a specific pci device in short form
697 #define dev_is_pci(d) ((d)->bus == &pci_bus_type)
698 #define dev_is_pf(d) ((dev_is_pci(d) ? to_pci_dev(d)->is_physfn : false))
751 return pci_bus_read_config_byte(dev->bus, dev->devfn, where, val); in pci_read_config_byte()
755 return pci_bus_read_config_word(dev->bus, dev->devfn, where, val); in pci_read_config_word()
760 return pci_bus_read_config_dword(dev->bus, dev->devfn, where, val); in pci_read_config_dword()
764 return pci_bus_write_config_byte(dev->bus, dev->devfn, where, val); in pci_write_config_byte()
768 return pci_bus_write_config_word(dev->bus, dev->devfn, where, val); in pci_write_config_word()
773 return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val); in pci_write_config_dword()
785 return (atomic_read(&pdev->enable_cnt) > 0); in pci_is_enabled()
790 return pdev->is_managed; in pci_is_managed()
893 /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
938 /* Proper probing supporting hot-pluggable devices */
975 #include <linux/pci-dma.h>
980 dma_pool_create(name, &pdev->dev, size, align, allocation)
1003 return -1; in pci_enable_msi_block()
1018 return -1; in pci_enable_msix()
1170 return -EIO; in pci_enable_device()
1178 return -EIO; in pci_set_dma_mask()
1183 return -EIO; in pci_set_consistent_dma_mask()
1189 return -EIO; in pci_set_dma_max_seg_size()
1195 return -EIO; in pci_set_dma_seg_boundary()
1200 return -EBUSY; in pci_assign_resource()
1283 return -EIO; in pci_request_regions()
1319 /* Include architecture-dependent settings and functions */
1324 #define PCIBIOS_MAX_MEM_32 (-1)
1329 #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start)
1330 #define pci_resource_end(dev, bar) ((dev)->resource[(bar)].end)
1331 #define pci_resource_flags(dev, bar) ((dev)->resource[(bar)].flags)
1337 (pci_resource_end((dev), (bar)) - \
1340 /* Similar to the helpers above, these manipulate per-pci_dev
1341 * driver-specific data. They are really just a wrapper around
1346 return dev_get_drvdata(&pdev->dev); in pci_get_drvdata()
1351 dev_set_drvdata(&pdev->dev, data); in pci_set_drvdata()
1359 return dev_name(&pdev->dev); in pci_name()
1363 /* Some archs don't want to expose struct resource to userland as-is
1371 *start = rsrc->start; in pci_resource_to_user()
1372 *end = rsrc->end; in pci_resource_to_user()
1379 * For at least a part of these bugs we need a work-around, so both
1380 * generic (drivers/pci/quirks.c) and per-architecture code can define
1484 return -ENODEV; in pci_enable_sriov()
1505 * pci_pcie_cap - get the saved PCIe capability offset
1517 return dev->pcie_cap; in pci_pcie_cap()
1521 * pci_is_pcie - check if the PCI device is PCI Express capable
1537 /* Large Resource Data Type Tag Item Names */
1539 #define PCI_VPD_LTIN_RO_DATA 0x10 /* Read-Only Data */
1540 #define PCI_VPD_LTIN_RW_DATA 0x11 /* Read-Write Data */
1546 /* Small Resource Data Type Tag Item Names */
1565 * pci_vpd_lrdt_size - Extracts the Large Resource Data Type length
1576 * pci_vpd_srdt_size - Extracts the Small Resource Data Type length
1587 * pci_vpd_info_field_size - Extracts the information field length
1598 * pci_vpd_find_tag - Locates the Resource Data Type tag provided
1605 * -ENOENT otherwise.
1610 * pci_vpd_find_info_keyword - Locates an information field keyword in the VPD
1617 * -ENOENT otherwise.
1622 /* PCI <-> OF binding helpers */
1635 return pdev ? pdev->dev.of_node : NULL; in pci_device_to_OF_node()
1640 return bus ? bus->dev.of_node : NULL; in pci_bus_to_OF_node()
1651 * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device