• Home
  • Raw
  • Download

Lines Matching refs:ipcdev

113 } ipcdev;  variable
139 ipcdev.cmd = cmd; in ipc_send_command()
140 if (ipcdev.irq_mode) { in ipc_send_command()
141 reinit_completion(&ipcdev.cmd_complete); in ipc_send_command()
144 writel(cmd, ipcdev.ipc_base + IPC_CMD); in ipc_send_command()
149 return readl(ipcdev.ipc_base + IPC_STATUS); in ipc_read_status()
154 writel(data, ipcdev.ipc_base + IPC_WRITE_BUFFER + offset); in ipc_data_writel()
159 return readb(ipcdev.ipc_base + IPC_READ_BUFFER + offset); in ipc_data_readb()
164 return readl(ipcdev.ipc_base + IPC_READ_BUFFER + offset); in ipc_data_readl()
172 if (ipcdev.irq_mode) { in intel_pmc_ipc_check_status()
174 &ipcdev.cmd_complete, IPC_MAX_SEC * HZ)) in intel_pmc_ipc_check_status()
187 dev_err(ipcdev.dev, in intel_pmc_ipc_check_status()
189 status, ipcdev.cmd); in intel_pmc_ipc_check_status()
199 dev_err(ipcdev.dev, in intel_pmc_ipc_check_status()
201 ipc_err_sources[i], status, ipcdev.cmd); in intel_pmc_ipc_check_status()
203 dev_err(ipcdev.dev, in intel_pmc_ipc_check_status()
205 status, ipcdev.cmd); in intel_pmc_ipc_check_status()
228 if (ipcdev.dev == NULL) { in intel_pmc_ipc_simple_command()
266 if (ipcdev.dev == NULL) { in intel_pmc_ipc_raw_cmd()
271 writel(dptr, ipcdev.ipc_base + IPC_DPTR); in intel_pmc_ipc_raw_cmd()
272 writel(sptr, ipcdev.ipc_base + IPC_SPTR); in intel_pmc_ipc_raw_cmd()
314 if (ipcdev.irq_mode) { in ioc()
316 writel(status | IPC_STATUS_IRQ, ipcdev.ipc_base + IPC_STATUS); in ioc()
318 complete(&ipcdev.cmd_complete); in ioc()
329 ipcdev.dev = &pci_dev_get(pdev)->dev; in ipc_pci_probe()
330 ipcdev.irq_mode = IPC_TRIGGER_MODE_IRQ; in ipc_pci_probe()
347 init_completion(&ipcdev.cmd_complete); in ipc_pci_probe()
349 if (request_irq(pdev->irq, ioc, 0, "intel_pmc_ipc", &ipcdev)) { in ipc_pci_probe()
354 ipcdev.ipc_base = ioremap_nocache(pci_resource, len); in ipc_pci_probe()
355 if (!ipcdev.ipc_base) { in ipc_pci_probe()
357 free_irq(pdev->irq, &ipcdev); in ipc_pci_probe()
366 free_irq(pdev->irq, &ipcdev); in ipc_pci_remove()
369 iounmap(ipcdev.ipc_base); in ipc_pci_remove()
370 ipcdev.dev = NULL; in ipc_pci_remove()
489 dev_err(ipcdev.dev, "Failed to alloc punit platform device\n"); in ipc_create_punit_device()
493 pdev->dev.parent = ipcdev.dev; in ipc_create_punit_device()
496 res->start = ipcdev.punit_base; in ipc_create_punit_device()
497 res->end = res->start + ipcdev.punit_size - 1; in ipc_create_punit_device()
500 res->start = ipcdev.punit_base2; in ipc_create_punit_device()
501 res->end = res->start + ipcdev.punit_size2 - 1; in ipc_create_punit_device()
506 dev_err(ipcdev.dev, "Failed to add platform punit resources\n"); in ipc_create_punit_device()
512 dev_err(ipcdev.dev, "Failed to add punit platform device\n"); in ipc_create_punit_device()
515 ipcdev.punit_dev = pdev; in ipc_create_punit_device()
531 dev_err(ipcdev.dev, "Failed to alloc tco platform device\n"); in ipc_create_tco_device()
535 pdev->dev.parent = ipcdev.dev; in ipc_create_tco_device()
538 res->start = ipcdev.acpi_io_base + TCO_BASE_OFFSET; in ipc_create_tco_device()
542 res->start = ipcdev.acpi_io_base + SMI_EN_OFFSET; in ipc_create_tco_device()
546 res->start = ipcdev.gcr_base; in ipc_create_tco_device()
547 res->end = res->start + ipcdev.gcr_size - 1; in ipc_create_tco_device()
551 dev_err(ipcdev.dev, "Failed to add tco platform resources\n"); in ipc_create_tco_device()
557 dev_err(ipcdev.dev, "Failed to add tco platform data\n"); in ipc_create_tco_device()
563 dev_err(ipcdev.dev, "Failed to add tco platform device\n"); in ipc_create_tco_device()
566 ipcdev.tco_dev = pdev; in ipc_create_tco_device()
580 dev_err(ipcdev.dev, "Failed to add tco platform device\n"); in ipc_create_pmc_devices()
585 dev_err(ipcdev.dev, "Failed to add punit platform device\n"); in ipc_create_pmc_devices()
586 platform_device_unregister(ipcdev.tco_dev); in ipc_create_pmc_devices()
604 ipcdev.acpi_io_base = res->start; in ipc_plat_get_res()
605 ipcdev.acpi_io_size = size; in ipc_plat_get_res()
616 ipcdev.punit_base = res->start; in ipc_plat_get_res()
617 ipcdev.punit_size = size; in ipc_plat_get_res()
628 ipcdev.punit_base2 = res->start; in ipc_plat_get_res()
629 ipcdev.punit_size2 = size; in ipc_plat_get_res()
650 ipcdev.ipc_base = addr; in ipc_plat_get_res()
652 ipcdev.gcr_base = res->start + size; in ipc_plat_get_res()
653 ipcdev.gcr_size = PLAT_RESOURCE_GCR_SIZE; in ipc_plat_get_res()
673 ipcdev.dev = &pdev->dev; in ipc_plat_probe()
674 ipcdev.irq_mode = IPC_TRIGGER_MODE_IRQ; in ipc_plat_probe()
675 init_completion(&ipcdev.cmd_complete); in ipc_plat_probe()
677 ipcdev.irq = platform_get_irq(pdev, 0); in ipc_plat_probe()
678 if (ipcdev.irq < 0) { in ipc_plat_probe()
695 if (request_irq(ipcdev.irq, ioc, 0, "intel_pmc_ipc", &ipcdev)) { in ipc_plat_probe()
710 free_irq(ipcdev.irq, &ipcdev); in ipc_plat_probe()
712 platform_device_unregister(ipcdev.tco_dev); in ipc_plat_probe()
713 platform_device_unregister(ipcdev.punit_dev); in ipc_plat_probe()
715 iounmap(ipcdev.ipc_base); in ipc_plat_probe()
728 free_irq(ipcdev.irq, &ipcdev); in ipc_plat_remove()
729 platform_device_unregister(ipcdev.tco_dev); in ipc_plat_remove()
730 platform_device_unregister(ipcdev.punit_dev); in ipc_plat_remove()
731 iounmap(ipcdev.ipc_base); in ipc_plat_remove()
736 ipcdev.dev = NULL; in ipc_plat_remove()