Lines Matching refs:pci

348 #define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \  argument
349 ((pci)->device == 0x0c0c) || \
350 ((pci)->device == 0x0d0c) || \
351 ((pci)->device == 0x160c))
433 static void update_pci_byte(struct pci_dev *pci, unsigned int reg, in update_pci_byte() argument
438 pci_read_config_byte(pci, reg, &data); in update_pci_byte()
441 pci_write_config_byte(pci, reg, data); in update_pci_byte()
456 update_pci_byte(chip->pci, AZX_PCIREG_TCSEL, 0x07, 0); in azx_init_pci()
465 update_pci_byte(chip->pci, in azx_init_pci()
474 update_pci_byte(chip->pci, in azx_init_pci()
477 update_pci_byte(chip->pci, in azx_init_pci()
480 update_pci_byte(chip->pci, in azx_init_pci()
488 pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop); in azx_init_pci()
494 pci_write_config_word(chip->pci, INTEL_SCH_HDA_DEVC, snoop); in azx_init_pci()
495 pci_read_config_word(chip->pci, in azx_init_pci()
663 if (request_irq(chip->pci->irq, azx_interrupt, in azx_acquire_irq()
668 chip->pci->irq); in azx_acquire_irq()
673 chip->irq = chip->pci->irq; in azx_acquire_irq()
674 pci_intx(chip->pci, !chip->msi); in azx_acquire_irq()
808 pci_disable_msi(chip->pci); in azx_suspend()
816 struct pci_dev *pci = to_pci_dev(dev); in azx_resume() local
834 if (pci_enable_msi(pci) < 0) in azx_resume()
851 #define IS_SKL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa170) argument
852 #define IS_SKL_LP(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9d70) argument
853 #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) argument
854 #define IS_SKL_PLUS(pci) (IS_SKL(pci) || IS_SKL_LP(pci) || IS_BXT(pci)) argument
858 struct pci_dev *pci = to_pci_dev(dev); in azx_freeze_noirq() local
860 if (IS_SKL_PLUS(pci)) in azx_freeze_noirq()
861 pci_set_power_state(pci, PCI_D3hot); in azx_freeze_noirq()
868 struct pci_dev *pci = to_pci_dev(dev); in azx_thaw_noirq() local
870 if (IS_SKL_PLUS(pci)) in azx_thaw_noirq()
871 pci_set_power_state(pci, PCI_D0); in azx_thaw_noirq()
993 static struct pci_dev *get_bound_vga(struct pci_dev *pci);
995 static void azx_vs_set_state(struct pci_dev *pci, in azx_vs_set_state() argument
998 struct snd_card *card = pci_get_drvdata(pci); in azx_vs_set_state()
1030 pci->current_state = PCI_D3cold; in azx_vs_set_state()
1044 static bool azx_vs_can_switch(struct pci_dev *pci) in azx_vs_can_switch() argument
1046 struct snd_card *card = pci_get_drvdata(pci); in azx_vs_can_switch()
1064 struct pci_dev *p = get_bound_vga(chip->pci); in init_vga_switcheroo()
1088 err = vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, in register_vga_switcheroo()
1103 #define check_hdmi_disabled(pci) false argument
1111 struct pci_dev *pci = chip->pci; in azx_free() local
1116 pm_runtime_get_noresume(&pci->dev); in azx_free()
1127 vga_switcheroo_unregister_client(chip->pci); in azx_free()
1140 pci_disable_msi(chip->pci); in azx_free()
1145 pci_release_regions(chip->pci); in azx_free()
1146 pci_disable_device(chip->pci); in azx_free()
1169 static struct pci_dev *get_bound_vga(struct pci_dev *pci) in get_bound_vga() argument
1174 switch (pci->vendor) { in get_bound_vga()
1178 if (pci->devfn == 1) { in get_bound_vga()
1179 p = pci_get_domain_bus_and_slot(pci_domain_nr(pci->bus), in get_bound_vga()
1180 pci->bus->number, 0); in get_bound_vga()
1192 static bool check_hdmi_disabled(struct pci_dev *pci) in check_hdmi_disabled() argument
1195 struct pci_dev *p = get_bound_vga(pci); in check_hdmi_disabled()
1240 q = snd_pci_quirk_lookup(chip->pci, position_fix_list); in check_position_fix()
1314 q = snd_pci_quirk_lookup(chip->pci, probe_mask_list); in check_probe_mask()
1358 q = snd_pci_quirk_lookup(chip->pci, msi_black_list); in check_msi()
1393 pci_read_config_byte(chip->pci, 0x42, &val); in azx_check_snoop_available()
1394 if (!(val & 0x80) && chip->pci->revision == 0x30) in azx_check_snoop_available()
1415 static int azx_create(struct snd_card *card, struct pci_dev *pci, in azx_create() argument
1429 err = pci_enable_device(pci); in azx_create()
1435 pci_disable_device(pci); in azx_create()
1443 chip->pci = pci; in azx_create()
1495 struct pci_dev *pci = chip->pci; in azx_first_init() local
1505 pci_read_config_word(pci, 0x40, &tmp3); in azx_first_init()
1506 pci_write_config_word(pci, 0x40, tmp3 | 0x10); in azx_first_init()
1507 pci_write_config_dword(pci, PCI_BASE_ADDRESS_1, 0); in azx_first_init()
1511 err = pci_request_regions(pci, "ICH HD audio"); in azx_first_init()
1516 chip->addr = pci_resource_start(pci, 0); in azx_first_init()
1517 chip->remap_addr = pci_ioremap_bar(pci, 0); in azx_first_init()
1526 pci->no_64bit_msi = true; in azx_first_init()
1528 if (pci_enable_msi(pci) < 0) in azx_first_init()
1535 pci_set_master(pci); in azx_first_init()
1542 if (chip->pci->vendor == PCI_VENDOR_ID_AMD) in azx_first_init()
1546 if (chip->pci->vendor == PCI_VENDOR_ID_ATI) { in azx_first_init()
1578 if (!pci_set_dma_mask(pci, DMA_BIT_MASK(dma_bits))) { in azx_first_init()
1579 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(dma_bits)); in azx_first_init()
1581 pci_set_dma_mask(pci, DMA_BIT_MASK(32)); in azx_first_init()
1582 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)); in azx_first_init()
1659 struct pci_dev *pci = chip->pci; in azx_firmware_cb() local
1676 pci_set_drvdata(pci, NULL); in azx_firmware_cb()
1721 pci_disable_msi(chip->pci); in disable_msi_reset_irq()
1806 static int azx_probe(struct pci_dev *pci, in azx_probe() argument
1823 err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, in azx_probe()
1826 dev_err(&pci->dev, "Error creating card!\n"); in azx_probe()
1830 err = azx_create(card, pci, dev, pci_id->driver_data, in azx_probe()
1837 pci_set_drvdata(pci, card); in azx_probe()
1845 if (check_hdmi_disabled(pci)) { in azx_probe()
1858 &pci->dev, GFP_KERNEL, card, in azx_probe()
1893 struct pci_dev *pci = chip->pci; in azx_probe_continue() local
1907 if (CONTROLLER_IN_GPU(pci)) in azx_probe_continue()
1967 pm_runtime_put_noidle(&pci->dev); in azx_probe_continue()
1976 static void azx_remove(struct pci_dev *pci) in azx_remove() argument
1978 struct snd_card *card = pci_get_drvdata(pci); in azx_remove()
1992 static void azx_shutdown(struct pci_dev *pci) in azx_shutdown() argument
1994 struct snd_card *card = pci_get_drvdata(pci); in azx_shutdown()
2245 MODULE_DEVICE_TABLE(pci, azx_ids);