Lines Matching refs:pci

355 #define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \  argument
356 ((pci)->device == 0x0c0c) || \
357 ((pci)->device == 0x0d0c) || \
358 ((pci)->device == 0x160c))
360 #define IS_SKL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa170) argument
361 #define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70) argument
362 #define IS_KBL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa171) argument
363 #define IS_KBL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d71) argument
364 #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) argument
365 #define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) || \ argument
366 IS_KBL(pci) || IS_KBL_LP(pci)
448 static void update_pci_byte(struct pci_dev *pci, unsigned int reg, in update_pci_byte() argument
453 pci_read_config_byte(pci, reg, &data); in update_pci_byte()
456 pci_write_config_byte(pci, reg, data); in update_pci_byte()
471 update_pci_byte(chip->pci, AZX_PCIREG_TCSEL, 0x07, 0); in azx_init_pci()
480 update_pci_byte(chip->pci, in azx_init_pci()
489 update_pci_byte(chip->pci, in azx_init_pci()
492 update_pci_byte(chip->pci, in azx_init_pci()
495 update_pci_byte(chip->pci, in azx_init_pci()
503 pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop); in azx_init_pci()
509 pci_write_config_word(chip->pci, INTEL_SCH_HDA_DEVC, snoop); in azx_init_pci()
510 pci_read_config_word(chip->pci, in azx_init_pci()
538 struct pci_dev *pci = chip->pci; in hda_intel_init_chip() local
543 if (IS_SKL_PLUS(pci)) { in hda_intel_init_chip()
544 pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val); in hda_intel_init_chip()
546 pci_write_config_dword(pci, INTEL_HDA_CGCTL, val); in hda_intel_init_chip()
549 if (IS_SKL_PLUS(pci)) { in hda_intel_init_chip()
550 pci_read_config_dword(pci, INTEL_HDA_CGCTL, &val); in hda_intel_init_chip()
552 pci_write_config_dword(pci, INTEL_HDA_CGCTL, val); in hda_intel_init_chip()
558 if (IS_BXT(pci)) in hda_intel_init_chip()
739 if (request_irq(chip->pci->irq, azx_interrupt, in azx_acquire_irq()
744 chip->pci->irq); in azx_acquire_irq()
749 bus->irq = chip->pci->irq; in azx_acquire_irq()
750 pci_intx(chip->pci, !chip->msi); in azx_acquire_irq()
931 pci_disable_msi(chip->pci); in azx_suspend()
942 struct pci_dev *pci = to_pci_dev(dev); in azx_resume() local
961 if (pci_enable_msi(pci) < 0) in azx_resume()
982 struct pci_dev *pci = to_pci_dev(dev); in azx_freeze_noirq() local
984 if (IS_SKL_PLUS(pci)) in azx_freeze_noirq()
985 pci_set_power_state(pci, PCI_D3hot); in azx_freeze_noirq()
992 struct pci_dev *pci = to_pci_dev(dev); in azx_thaw_noirq() local
994 if (IS_SKL_PLUS(pci)) in azx_thaw_noirq()
995 pci_set_power_state(pci, PCI_D0); in azx_thaw_noirq()
1126 static struct pci_dev *get_bound_vga(struct pci_dev *pci);
1128 static void azx_vs_set_state(struct pci_dev *pci, in azx_vs_set_state() argument
1131 struct snd_card *card = pci_get_drvdata(pci); in azx_vs_set_state()
1163 pci->current_state = PCI_D3cold; in azx_vs_set_state()
1177 static bool azx_vs_can_switch(struct pci_dev *pci) in azx_vs_can_switch() argument
1179 struct snd_card *card = pci_get_drvdata(pci); in azx_vs_can_switch()
1197 struct pci_dev *p = get_bound_vga(chip->pci); in init_vga_switcheroo()
1221 err = vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, in register_vga_switcheroo()
1235 #define check_hdmi_disabled(pci) false argument
1243 struct pci_dev *pci = chip->pci; in azx_free() local
1248 pm_runtime_get_noresume(&pci->dev); in azx_free()
1259 vga_switcheroo_unregister_client(chip->pci); in azx_free()
1271 pci_disable_msi(chip->pci); in azx_free()
1279 pci_release_regions(chip->pci); in azx_free()
1281 pci_disable_device(chip->pci); in azx_free()
1313 static struct pci_dev *get_bound_vga(struct pci_dev *pci) in get_bound_vga() argument
1318 switch (pci->vendor) { in get_bound_vga()
1322 if (pci->devfn == 1) { in get_bound_vga()
1323 p = pci_get_domain_bus_and_slot(pci_domain_nr(pci->bus), in get_bound_vga()
1324 pci->bus->number, 0); in get_bound_vga()
1336 static bool check_hdmi_disabled(struct pci_dev *pci) in check_hdmi_disabled() argument
1339 struct pci_dev *p = get_bound_vga(pci); in check_hdmi_disabled()
1384 q = snd_pci_quirk_lookup(chip->pci, position_fix_list); in check_position_fix()
1458 q = snd_pci_quirk_lookup(chip->pci, probe_mask_list); in check_probe_mask()
1502 q = snd_pci_quirk_lookup(chip->pci, msi_black_list); in check_msi()
1537 pci_read_config_byte(chip->pci, 0x42, &val); in azx_check_snoop_available()
1538 if (!(val & 0x80) && chip->pci->revision == 0x30) in azx_check_snoop_available()
1562 static int azx_create(struct snd_card *card, struct pci_dev *pci, in azx_create() argument
1576 err = pci_enable_device(pci); in azx_create()
1582 pci_disable_device(pci); in azx_create()
1589 chip->pci = pci; in azx_create()
1625 pci_disable_device(pci); in azx_create()
1647 struct pci_dev *pci = chip->pci; in azx_first_init() local
1658 pci_read_config_word(pci, 0x40, &tmp3); in azx_first_init()
1659 pci_write_config_word(pci, 0x40, tmp3 | 0x10); in azx_first_init()
1660 pci_write_config_dword(pci, PCI_BASE_ADDRESS_1, 0); in azx_first_init()
1664 err = pci_request_regions(pci, "ICH HD audio"); in azx_first_init()
1669 bus->addr = pci_resource_start(pci, 0); in azx_first_init()
1670 bus->remap_addr = pci_ioremap_bar(pci, 0); in azx_first_init()
1679 pci->no_64bit_msi = true; in azx_first_init()
1681 if (pci_enable_msi(pci) < 0) in azx_first_init()
1688 pci_set_master(pci); in azx_first_init()
1695 if (chip->pci->vendor == PCI_VENDOR_ID_AMD) in azx_first_init()
1699 if (chip->pci->vendor == PCI_VENDOR_ID_ATI) { in azx_first_init()
1731 if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) { in azx_first_init()
1732 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits)); in azx_first_init()
1734 dma_set_mask(&pci->dev, DMA_BIT_MASK(32)); in azx_first_init()
1735 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)); in azx_first_init()
1810 struct pci_dev *pci = chip->pci; in azx_firmware_cb() local
1827 pci_set_drvdata(pci, NULL); in azx_firmware_cb()
1873 pci_disable_msi(chip->pci); in disable_msi_reset_irq()
1962 static int azx_probe(struct pci_dev *pci, in azx_probe() argument
1979 err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, in azx_probe()
1982 dev_err(&pci->dev, "Error creating card!\n"); in azx_probe()
1986 err = azx_create(card, pci, dev, pci_id->driver_data, &chip); in azx_probe()
1992 pci_set_drvdata(pci, card); in azx_probe()
2000 if (check_hdmi_disabled(pci)) { in azx_probe()
2013 &pci->dev, GFP_KERNEL, card, in azx_probe()
2049 struct pci_dev *pci = chip->pci; in azx_probe_continue() local
2062 if (CONTROLLER_IN_GPU(pci)) in azx_probe_continue()
2072 if (CONTROLLER_IN_GPU(pci)) in azx_probe_continue()
2126 pm_runtime_put_noidle(&pci->dev); in azx_probe_continue()
2140 static void azx_remove(struct pci_dev *pci) in azx_remove() argument
2142 struct snd_card *card = pci_get_drvdata(pci); in azx_remove()
2156 static void azx_shutdown(struct pci_dev *pci) in azx_shutdown() argument
2158 struct snd_card *card = pci_get_drvdata(pci); in azx_shutdown()
2415 MODULE_DEVICE_TABLE(pci, azx_ids);