Lines Matching defs:h

22 #include <sys/note.h>
23 #include <sys/conf.h>
24 #include <sys/debug.h>
25 #include <sys/sunddi.h>
26 #include <sys/pci.h>
27 #include <sys/pcie.h>
28 #include <sys/bitmap.h>
29 #include <sys/autoconf.h>
30 #include <sys/sysmacros.h>
31 #include <sys/pci_cap.h>
47 #define PCI_CAP_BASE(h, id, base_p) (*base_p ? DDI_SUCCESS : \
48 (id ? PCI_CAP_LOCATE(h, id, base_p) : DDI_FAILURE))
54 pci_cap_probe(ddi_acc_handle_t h, uint16_t index,
61 status = pci_config_get16(h, PCI_CONF_STAT);
67 for (i = 0, base = pci_config_get8(h, PCI_CONF_CAP_PTR);
68 base && i < index; base = pci_config_get8(h, base
71 if ((id = pci_config_get8(h, base)) == 0xff)
77 if ((pcix_cmd = pci_config_get16(h, base +
86 if ((id = pci_config_get8(h, base)) != 0xff)
94 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32)
106 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32)
125 pci_lcap_locate(ddi_acc_handle_t h, uint8_t id, uint16_t *base_p)
130 status = pci_config_get16(h, PCI_CONF_STAT);
135 header = pci_config_get8(h, PCI_CONF_HEADER);
152 for (base = pci_config_get8(h, base); base;
153 base = pci_config_get8(h, base + PCI_CAP_NEXT_PTR)) {
154 if (pci_config_get8(h, base) == id) {
168 pci_xcap_locate(ddi_acc_handle_t h, uint16_t id, uint16_t *base_p)
173 status = pci_config_get16(h, PCI_CONF_STAT);
181 if ((xcaps_hdr = pci_config_get32(h, base)) == PCI_CAP_EINVAL32)
206 pci_htcap_locate(ddi_acc_handle_t h, uint16_t reg_mask, uint16_t reg_val,
212 status = pci_config_get16(h, PCI_CONF_STAT);
217 header = pci_config_get8(h, PCI_CONF_HEADER);
231 for (base = pci_config_get8(h, base); base;
232 base = pci_config_get8(h, base + PCI_CAP_NEXT_PTR)) {
233 if (pci_config_get8(h, base) == PCI_CAP_ID_HT &&
234 (pci_config_get16(h, base + PCI_CAP_ID_REGS_OFF) &
252 pci_cap_get(ddi_acc_handle_t h, pci_cap_config_size_t size,
257 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS)
270 data = pci_config_get8(h, offset);
273 data = pci_config_get16(h, offset);
276 data = pci_config_get32(h, offset);
282 PCI_CAP_DBG("pci_cap_get: %p[x%x]=x%x\n", (void *)h, offset, data);
293 pci_cap_put(ddi_acc_handle_t h, pci_cap_config_size_t size,
301 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS)
308 pci_config_put8(h, offset, data);
311 pci_config_put16(h, offset, data);
314 pci_config_put32(h, offset, data);
329 pci_cap_read(ddi_acc_handle_t h, uint32_t id, uint16_t base,
338 if (PCI_CAP_BASE(h, id, &base) != DDI_SUCCESS)
342 if ((*ptr++ = pci_config_get32(h, base)) == PCI_CAP_EINVAL32)