ipcdev 143 drivers/platform/x86/intel_pmc_ipc.c } ipcdev; ipcdev 169 drivers/platform/x86/intel_pmc_ipc.c ipcdev.cmd = cmd; ipcdev 170 drivers/platform/x86/intel_pmc_ipc.c if (ipcdev.irq_mode) { ipcdev 171 drivers/platform/x86/intel_pmc_ipc.c reinit_completion(&ipcdev.cmd_complete); ipcdev 174 drivers/platform/x86/intel_pmc_ipc.c writel(cmd, ipcdev.ipc_base + IPC_CMD); ipcdev 179 drivers/platform/x86/intel_pmc_ipc.c return readl(ipcdev.ipc_base + IPC_STATUS); ipcdev 184 drivers/platform/x86/intel_pmc_ipc.c writel(data, ipcdev.ipc_base + IPC_WRITE_BUFFER + offset); ipcdev 189 drivers/platform/x86/intel_pmc_ipc.c return readb(ipcdev.ipc_base + IPC_READ_BUFFER + offset); ipcdev 194 drivers/platform/x86/intel_pmc_ipc.c return readl(ipcdev.ipc_base + IPC_READ_BUFFER + offset); ipcdev 199 drivers/platform/x86/intel_pmc_ipc.c return readq(ipcdev.gcr_mem_base + offset); ipcdev 204 drivers/platform/x86/intel_pmc_ipc.c if (!ipcdev.has_gcr_regs) ipcdev 226 drivers/platform/x86/intel_pmc_ipc.c spin_lock(&ipcdev.gcr_lock); ipcdev 230 drivers/platform/x86/intel_pmc_ipc.c spin_unlock(&ipcdev.gcr_lock); ipcdev 234 drivers/platform/x86/intel_pmc_ipc.c *data = readl(ipcdev.gcr_mem_base + offset); ipcdev 236 drivers/platform/x86/intel_pmc_ipc.c spin_unlock(&ipcdev.gcr_lock); ipcdev 255 drivers/platform/x86/intel_pmc_ipc.c spin_lock(&ipcdev.gcr_lock); ipcdev 259 drivers/platform/x86/intel_pmc_ipc.c spin_unlock(&ipcdev.gcr_lock); ipcdev 263 drivers/platform/x86/intel_pmc_ipc.c *data = readq(ipcdev.gcr_mem_base + offset); ipcdev 265 drivers/platform/x86/intel_pmc_ipc.c spin_unlock(&ipcdev.gcr_lock); ipcdev 285 drivers/platform/x86/intel_pmc_ipc.c spin_lock(&ipcdev.gcr_lock); ipcdev 289 drivers/platform/x86/intel_pmc_ipc.c spin_unlock(&ipcdev.gcr_lock); ipcdev 293 drivers/platform/x86/intel_pmc_ipc.c writel(data, ipcdev.gcr_mem_base + offset); ipcdev 295 drivers/platform/x86/intel_pmc_ipc.c spin_unlock(&ipcdev.gcr_lock); ipcdev 317 drivers/platform/x86/intel_pmc_ipc.c spin_lock(&ipcdev.gcr_lock); ipcdev 323 drivers/platform/x86/intel_pmc_ipc.c new_val = readl(ipcdev.gcr_mem_base + offset); ipcdev 328 drivers/platform/x86/intel_pmc_ipc.c writel(new_val, ipcdev.gcr_mem_base + offset); ipcdev 330 drivers/platform/x86/intel_pmc_ipc.c new_val = readl(ipcdev.gcr_mem_base + offset); ipcdev 339 drivers/platform/x86/intel_pmc_ipc.c spin_unlock(&ipcdev.gcr_lock); ipcdev 357 drivers/platform/x86/intel_pmc_ipc.c if (ipcdev.irq_mode) { ipcdev 359 drivers/platform/x86/intel_pmc_ipc.c &ipcdev.cmd_complete, IPC_MAX_SEC * HZ)) ipcdev 372 drivers/platform/x86/intel_pmc_ipc.c dev_err(ipcdev.dev, ipcdev 374 drivers/platform/x86/intel_pmc_ipc.c status, ipcdev.cmd); ipcdev 384 drivers/platform/x86/intel_pmc_ipc.c dev_err(ipcdev.dev, ipcdev 386 drivers/platform/x86/intel_pmc_ipc.c ipc_err_sources[i], status, ipcdev.cmd); ipcdev 388 drivers/platform/x86/intel_pmc_ipc.c dev_err(ipcdev.dev, ipcdev 390 drivers/platform/x86/intel_pmc_ipc.c status, ipcdev.cmd); ipcdev 413 drivers/platform/x86/intel_pmc_ipc.c if (ipcdev.dev == NULL) { ipcdev 451 drivers/platform/x86/intel_pmc_ipc.c if (ipcdev.dev == NULL) { ipcdev 456 drivers/platform/x86/intel_pmc_ipc.c writel(dptr, ipcdev.ipc_base + IPC_DPTR); ipcdev 457 drivers/platform/x86/intel_pmc_ipc.c writel(sptr, ipcdev.ipc_base + IPC_SPTR); ipcdev 499 drivers/platform/x86/intel_pmc_ipc.c if (ipcdev.irq_mode) { ipcdev 501 drivers/platform/x86/intel_pmc_ipc.c writel(status | IPC_STATUS_IRQ, ipcdev.ipc_base + IPC_STATUS); ipcdev 503 drivers/platform/x86/intel_pmc_ipc.c complete(&ipcdev.cmd_complete); ipcdev 510 drivers/platform/x86/intel_pmc_ipc.c struct intel_pmc_ipc_dev *pmc = &ipcdev; ipcdev 519 drivers/platform/x86/intel_pmc_ipc.c spin_lock_init(&ipcdev.gcr_lock); ipcdev 662 drivers/platform/x86/intel_pmc_ipc.c .no_reboot_priv = &ipcdev, ipcdev 682 drivers/platform/x86/intel_pmc_ipc.c .parent = ipcdev.dev, ipcdev 686 drivers/platform/x86/intel_pmc_ipc.c .num_res = ipcdev.punit_res_count, ipcdev 693 drivers/platform/x86/intel_pmc_ipc.c ipcdev.punit_dev = pdev; ipcdev 703 drivers/platform/x86/intel_pmc_ipc.c .parent = ipcdev.dev, ipcdev 713 drivers/platform/x86/intel_pmc_ipc.c res->start = ipcdev.acpi_io_base + TCO_BASE_OFFSET; ipcdev 717 drivers/platform/x86/intel_pmc_ipc.c res->start = ipcdev.acpi_io_base + SMI_EN_OFFSET; ipcdev 724 drivers/platform/x86/intel_pmc_ipc.c ipcdev.tco_dev = pdev; ipcdev 734 drivers/platform/x86/intel_pmc_ipc.c .parent = ipcdev.dev, ipcdev 742 drivers/platform/x86/intel_pmc_ipc.c res->start = ipcdev.telem_punit_ssram_base; ipcdev 743 drivers/platform/x86/intel_pmc_ipc.c res->end = res->start + ipcdev.telem_punit_ssram_size - 1; ipcdev 746 drivers/platform/x86/intel_pmc_ipc.c res->start = ipcdev.telem_pmc_ssram_base; ipcdev 747 drivers/platform/x86/intel_pmc_ipc.c res->end = res->start + ipcdev.telem_pmc_ssram_size - 1; ipcdev 753 drivers/platform/x86/intel_pmc_ipc.c ipcdev.telemetry_dev = pdev; ipcdev 766 drivers/platform/x86/intel_pmc_ipc.c dev_err(ipcdev.dev, "Failed to add tco platform device\n"); ipcdev 773 drivers/platform/x86/intel_pmc_ipc.c dev_err(ipcdev.dev, "Failed to add punit platform device\n"); ipcdev 774 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.tco_dev); ipcdev 778 drivers/platform/x86/intel_pmc_ipc.c if (!ipcdev.telem_res_inval) { ipcdev 781 drivers/platform/x86/intel_pmc_ipc.c dev_warn(ipcdev.dev, ipcdev 783 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.punit_dev); ipcdev 784 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.tco_dev); ipcdev 804 drivers/platform/x86/intel_pmc_ipc.c ipcdev.acpi_io_base = res->start; ipcdev 805 drivers/platform/x86/intel_pmc_ipc.c ipcdev.acpi_io_size = size; ipcdev 808 drivers/platform/x86/intel_pmc_ipc.c ipcdev.punit_res_count = 0; ipcdev 817 drivers/platform/x86/intel_pmc_ipc.c punit_res[ipcdev.punit_res_count++] = *res; ipcdev 827 drivers/platform/x86/intel_pmc_ipc.c punit_res[ipcdev.punit_res_count++] = *res; ipcdev 834 drivers/platform/x86/intel_pmc_ipc.c punit_res[ipcdev.punit_res_count++] = *res; ipcdev 842 drivers/platform/x86/intel_pmc_ipc.c punit_res[ipcdev.punit_res_count++] = *res; ipcdev 850 drivers/platform/x86/intel_pmc_ipc.c punit_res[ipcdev.punit_res_count++] = *res; ipcdev 858 drivers/platform/x86/intel_pmc_ipc.c punit_res[ipcdev.punit_res_count++] = *res; ipcdev 875 drivers/platform/x86/intel_pmc_ipc.c ipcdev.ipc_base = addr; ipcdev 877 drivers/platform/x86/intel_pmc_ipc.c ipcdev.gcr_mem_base = addr + PLAT_RESOURCE_GCR_OFFSET; ipcdev 880 drivers/platform/x86/intel_pmc_ipc.c ipcdev.telem_res_inval = 0; ipcdev 885 drivers/platform/x86/intel_pmc_ipc.c ipcdev.telem_res_inval = 1; ipcdev 887 drivers/platform/x86/intel_pmc_ipc.c ipcdev.telem_punit_ssram_base = res->start + ipcdev 889 drivers/platform/x86/intel_pmc_ipc.c ipcdev.telem_punit_ssram_size = TELEM_SSRAM_SIZE; ipcdev 890 drivers/platform/x86/intel_pmc_ipc.c ipcdev.telem_pmc_ssram_base = res->start + ipcdev 892 drivers/platform/x86/intel_pmc_ipc.c ipcdev.telem_pmc_ssram_size = TELEM_SSRAM_SIZE; ipcdev 909 drivers/platform/x86/intel_pmc_ipc.c if (!ipcdev.has_gcr_regs) ipcdev 933 drivers/platform/x86/intel_pmc_ipc.c ipcdev.dev = &pdev->dev; ipcdev 934 drivers/platform/x86/intel_pmc_ipc.c ipcdev.irq_mode = IPC_TRIGGER_MODE_IRQ; ipcdev 935 drivers/platform/x86/intel_pmc_ipc.c init_completion(&ipcdev.cmd_complete); ipcdev 936 drivers/platform/x86/intel_pmc_ipc.c spin_lock_init(&ipcdev.gcr_lock); ipcdev 938 drivers/platform/x86/intel_pmc_ipc.c ipcdev.irq = platform_get_irq(pdev, 0); ipcdev 939 drivers/platform/x86/intel_pmc_ipc.c if (ipcdev.irq < 0) ipcdev 954 drivers/platform/x86/intel_pmc_ipc.c if (devm_request_irq(&pdev->dev, ipcdev.irq, ioc, IRQF_NO_SUSPEND, ipcdev 955 drivers/platform/x86/intel_pmc_ipc.c "intel_pmc_ipc", &ipcdev)) { ipcdev 968 drivers/platform/x86/intel_pmc_ipc.c ipcdev.has_gcr_regs = true; ipcdev 972 drivers/platform/x86/intel_pmc_ipc.c devm_free_irq(&pdev->dev, ipcdev.irq, &ipcdev); ipcdev 974 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.tco_dev); ipcdev 975 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.punit_dev); ipcdev 976 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.telemetry_dev); ipcdev 984 drivers/platform/x86/intel_pmc_ipc.c devm_free_irq(&pdev->dev, ipcdev.irq, &ipcdev); ipcdev 985 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.tco_dev); ipcdev 986 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.punit_dev); ipcdev 987 drivers/platform/x86/intel_pmc_ipc.c platform_device_unregister(ipcdev.telemetry_dev); ipcdev 988 drivers/platform/x86/intel_pmc_ipc.c ipcdev.dev = NULL; ipcdev 52 drivers/platform/x86/intel_punit_ipc.c static inline u32 ipc_read_status(IPC_DEV *ipcdev, IPC_TYPE type) ipcdev 54 drivers/platform/x86/intel_punit_ipc.c return readl(ipcdev->base[type][BASE_IFACE]); ipcdev 57 drivers/platform/x86/intel_punit_ipc.c static inline void ipc_write_cmd(IPC_DEV *ipcdev, IPC_TYPE type, u32 cmd) ipcdev 59 drivers/platform/x86/intel_punit_ipc.c writel(cmd, ipcdev->base[type][BASE_IFACE]); ipcdev 62 drivers/platform/x86/intel_punit_ipc.c static inline u32 ipc_read_data_low(IPC_DEV *ipcdev, IPC_TYPE type) ipcdev 64 drivers/platform/x86/intel_punit_ipc.c return readl(ipcdev->base[type][BASE_DATA] + OFFSET_DATA_LOW); ipcdev 67 drivers/platform/x86/intel_punit_ipc.c static inline u32 ipc_read_data_high(IPC_DEV *ipcdev, IPC_TYPE type) ipcdev 69 drivers/platform/x86/intel_punit_ipc.c return readl(ipcdev->base[type][BASE_DATA] + OFFSET_DATA_HIGH); ipcdev 72 drivers/platform/x86/intel_punit_ipc.c static inline void ipc_write_data_low(IPC_DEV *ipcdev, IPC_TYPE type, u32 data) ipcdev 74 drivers/platform/x86/intel_punit_ipc.c writel(data, ipcdev->base[type][BASE_DATA] + OFFSET_DATA_LOW); ipcdev 77 drivers/platform/x86/intel_punit_ipc.c static inline void ipc_write_data_high(IPC_DEV *ipcdev, IPC_TYPE type, u32 data) ipcdev 79 drivers/platform/x86/intel_punit_ipc.c writel(data, ipcdev->base[type][BASE_DATA] + OFFSET_DATA_HIGH); ipcdev 102 drivers/platform/x86/intel_punit_ipc.c static int intel_punit_ipc_check_status(IPC_DEV *ipcdev, IPC_TYPE type) ipcdev 108 drivers/platform/x86/intel_punit_ipc.c if (ipcdev->irq) { ipcdev 109 drivers/platform/x86/intel_punit_ipc.c if (!wait_for_completion_timeout(&ipcdev->cmd_complete, ipcdev 111 drivers/platform/x86/intel_punit_ipc.c dev_err(ipcdev->dev, "IPC timed out\n"); ipcdev 115 drivers/platform/x86/intel_punit_ipc.c while ((ipc_read_status(ipcdev, type) & CMD_RUN) && --loops) ipcdev 118 drivers/platform/x86/intel_punit_ipc.c dev_err(ipcdev->dev, "IPC timed out\n"); ipcdev 123 drivers/platform/x86/intel_punit_ipc.c status = ipc_read_status(ipcdev, type); ipcdev 126 drivers/platform/x86/intel_punit_ipc.c dev_err(ipcdev->dev, "IPC failed: %s, IPC_STS=0x%x\n", ipcdev 146 drivers/platform/x86/intel_punit_ipc.c IPC_DEV *ipcdev = punit_ipcdev; ipcdev 151 drivers/platform/x86/intel_punit_ipc.c mutex_lock(&ipcdev->lock); ipcdev 153 drivers/platform/x86/intel_punit_ipc.c reinit_completion(&ipcdev->cmd_complete); ipcdev 158 drivers/platform/x86/intel_punit_ipc.c ipc_write_cmd(ipcdev, type, val); ipcdev 159 drivers/platform/x86/intel_punit_ipc.c ret = intel_punit_ipc_check_status(ipcdev, type); ipcdev 161 drivers/platform/x86/intel_punit_ipc.c mutex_unlock(&ipcdev->lock); ipcdev 181 drivers/platform/x86/intel_punit_ipc.c IPC_DEV *ipcdev = punit_ipcdev; ipcdev 186 drivers/platform/x86/intel_punit_ipc.c mutex_lock(&ipcdev->lock); ipcdev 188 drivers/platform/x86/intel_punit_ipc.c reinit_completion(&ipcdev->cmd_complete); ipcdev 192 drivers/platform/x86/intel_punit_ipc.c ipc_write_data_low(ipcdev, type, *in); ipcdev 194 drivers/platform/x86/intel_punit_ipc.c ipc_write_data_high(ipcdev, type, *++in); ipcdev 199 drivers/platform/x86/intel_punit_ipc.c ipc_write_cmd(ipcdev, type, val); ipcdev 201 drivers/platform/x86/intel_punit_ipc.c ret = intel_punit_ipc_check_status(ipcdev, type); ipcdev 206 drivers/platform/x86/intel_punit_ipc.c *out = ipc_read_data_low(ipcdev, type); ipcdev 208 drivers/platform/x86/intel_punit_ipc.c *++out = ipc_read_data_high(ipcdev, type); ipcdev 212 drivers/platform/x86/intel_punit_ipc.c mutex_unlock(&ipcdev->lock); ipcdev 219 drivers/platform/x86/intel_punit_ipc.c IPC_DEV *ipcdev = dev_id; ipcdev 221 drivers/platform/x86/intel_punit_ipc.c complete(&ipcdev->cmd_complete); ipcdev 96 drivers/platform/x86/intel_scu_ipc.c static struct intel_scu_ipc_dev ipcdev; /* Only one for now */ ipcdev 209 drivers/platform/x86/intel_scu_ipc.c struct intel_scu_ipc_dev *scu = &ipcdev; ipcdev 433 drivers/platform/x86/intel_scu_ipc.c struct intel_scu_ipc_dev *scu = &ipcdev; ipcdev 463 drivers/platform/x86/intel_scu_ipc.c struct intel_scu_ipc_dev *scu = &ipcdev; ipcdev 509 drivers/platform/x86/intel_scu_ipc.c struct intel_scu_ipc_dev *scu = &ipcdev; ipcdev 569 drivers/platform/x86/intel_scu_ipc.c struct intel_scu_ipc_dev *scu = &ipcdev; ipcdev 628 drivers/platform/x86/intel_scu_ipc.c struct intel_scu_ipc_dev *scu = &ipcdev;