Lines Matching refs:pcidev
186 void (*exit)(struct pci_dev *pcidev);
273 static int default_setup(struct exar8250 *priv, struct pci_dev *pcidev, in default_setup() argument
282 port->port.mapbase = pci_resource_start(pcidev, bar) + offset; in default_setup()
312 pci_fastcom335_setup(struct exar8250 *priv, struct pci_dev *pcidev, in pci_fastcom335_setup() argument
322 err = default_setup(priv, pcidev, idx, offset, port); in pci_fastcom335_setup()
337 switch (pcidev->device) { in pci_fastcom335_setup()
360 pci_connect_tech_setup(struct exar8250 *priv, struct pci_dev *pcidev, in pci_connect_tech_setup() argument
367 return default_setup(priv, pcidev, idx, offset, port); in pci_connect_tech_setup()
371 pci_xr17c154_setup(struct exar8250 *priv, struct pci_dev *pcidev, in pci_xr17c154_setup() argument
378 return default_setup(priv, pcidev, idx, offset, port); in pci_xr17c154_setup()
381 static void setup_gpio(struct pci_dev *pcidev, u8 __iomem *p) in setup_gpio() argument
391 if ((pcidev->vendor == PCI_VENDOR_ID_EXAR) && in setup_gpio()
392 (pcidev->subsystem_vendor != PCI_VENDOR_ID_SEALEVEL)) { in setup_gpio()
414 static struct platform_device *__xr17v35x_register_gpio(struct pci_dev *pcidev, in __xr17v35x_register_gpio() argument
423 pdev->dev.parent = &pcidev->dev; in __xr17v35x_register_gpio()
424 ACPI_COMPANION_SET(&pdev->dev, ACPI_COMPANION(&pcidev->dev)); in __xr17v35x_register_gpio()
451 static int xr17v35x_register_gpio(struct pci_dev *pcidev, struct uart_8250_port *port) in xr17v35x_register_gpio() argument
453 if (pcidev->vendor == PCI_VENDOR_ID_EXAR) in xr17v35x_register_gpio()
455 __xr17v35x_register_gpio(pcidev, &exar_gpio_node); in xr17v35x_register_gpio()
549 static int iot2040_register_gpio(struct pci_dev *pcidev, in iot2040_register_gpio() argument
560 __xr17v35x_register_gpio(pcidev, &iot2040_gpio_node); in iot2040_register_gpio()
599 pci_xr17v35x_setup(struct exar8250 *priv, struct pci_dev *pcidev, in pci_xr17v35x_setup() argument
619 ret = default_setup(priv, pcidev, idx, offset, port); in pci_xr17v35x_setup()
632 setup_gpio(pcidev, p); in pci_xr17v35x_setup()
634 ret = platform->register_gpio(pcidev, port); in pci_xr17v35x_setup()
640 static void pci_xr17v35x_exit(struct pci_dev *pcidev) in pci_xr17v35x_exit() argument
643 struct exar8250 *priv = pci_get_drvdata(pcidev); in pci_xr17v35x_exit()
676 exar_pci_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) in exar_pci_probe() argument
688 rc = pcim_enable_device(pcidev); in exar_pci_probe()
692 maxnr = pci_resource_len(pcidev, bar) >> (board->reg_shift + 3); in exar_pci_probe()
694 if (pcidev->vendor == PCI_VENDOR_ID_ACCESSIO) in exar_pci_probe()
695 nr_ports = BIT(((pcidev->device & 0x38) >> 3) - 1); in exar_pci_probe()
698 else if (pcidev->vendor == PCI_VENDOR_ID_SEALEVEL) in exar_pci_probe()
699 nr_ports = pcidev->device & 0xff; in exar_pci_probe()
701 nr_ports = pcidev->device & 0x0f; in exar_pci_probe()
703 priv = devm_kzalloc(&pcidev->dev, struct_size(priv, line, nr_ports), GFP_KERNEL); in exar_pci_probe()
708 priv->virt = pcim_iomap(pcidev, bar, 0); in exar_pci_probe()
712 pci_set_master(pcidev); in exar_pci_probe()
714 rc = pci_alloc_irq_vectors(pcidev, 1, 1, PCI_IRQ_ALL_TYPES); in exar_pci_probe()
720 uart.port.irq = pci_irq_vector(pcidev, 0); in exar_pci_probe()
721 uart.port.dev = &pcidev->dev; in exar_pci_probe()
723 rc = devm_request_irq(&pcidev->dev, uart.port.irq, exar_misc_handler, in exar_pci_probe()
732 rc = board->setup(priv, pcidev, &uart, i); in exar_pci_probe()
734 dev_err(&pcidev->dev, "Failed to setup port %u\n", i); in exar_pci_probe()
738 dev_dbg(&pcidev->dev, "Setup PCI port: port %lx, irq %d, type %d\n", in exar_pci_probe()
743 dev_err(&pcidev->dev, in exar_pci_probe()
751 pci_set_drvdata(pcidev, priv); in exar_pci_probe()
755 static void exar_pci_remove(struct pci_dev *pcidev) in exar_pci_remove() argument
757 struct exar8250 *priv = pci_get_drvdata(pcidev); in exar_pci_remove()
765 priv->board->exit(pcidev); in exar_pci_remove()
770 struct pci_dev *pcidev = to_pci_dev(dev); in exar_suspend() local
771 struct exar8250 *priv = pci_get_drvdata(pcidev); in exar_suspend()