Lines Matching +full:inter +full:- +full:processor

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 2014-2016, Intel Corporation.
23 #include "ishtp-dev.h"
24 #include "hw-ish.h"
84 * ish_event_tracer() - Callback function to dump trace messages
106 * ish_init() - Init function
122 dev_err(dev->devc, "ISH: hw start failed.\n");
126 /* Start the inter process communication to ISH processor */
129 dev_err(dev->devc, "ISHTP: Protocol init failed.\n");
145 return !pm_suspend_via_firmware() || pdev->device == PCI_DEVICE_ID_INTEL_ISH_CHV;
151 u32 fwsts = dev->ops->get_fw_status(dev);
153 if (dev->suspend_flag || !IPC_IS_ISH_ILUP(fwsts))
156 return !pm_resume_via_firmware() || pdev->device == PCI_DEVICE_ID_INTEL_ISH_CHV;
160 * ish_probe() - PCI driver probe callback
174 struct device *dev = &pdev->dev;
178 return -ENODEV;
200 ret = -ENOMEM;
204 ishtp->print_log = ish_event_tracer;
205 ishtp->driver_data = &ishtp_driver_data[ent->driver_data];
208 hw->mem_addr = pcim_iomap_table(pdev)[0];
209 ishtp->pdev = pdev;
218 if (!pdev->msi_enabled && !pdev->msix_enabled)
221 ret = devm_request_irq(dev, pdev->irq, ish_irq_handler,
224 dev_err(dev, "ISH: request IRQ %d failed\n", pdev->irq);
228 dev_set_drvdata(ishtp->devc, ishtp);
230 init_waitqueue_head(&ishtp->suspend_wait);
231 init_waitqueue_head(&ishtp->resume_wait);
234 if (pdev->device == PCI_DEVICE_ID_INTEL_ISH_EHL_Ax)
245 * ish_remove() - PCI driver remove callback
260 * ish_shutdown() - PCI driver shutdown callback
267 if (pdev->device == PCI_DEVICE_ID_INTEL_ISH_EHL_Ax)
274 * ish_resume_handler() - Work function to complete resume
288 if (device_may_wakeup(&pdev->dev))
289 disable_irq_wake(pdev->irq);
296 if (dev->resume_flag)
297 wait_event_interruptible_timeout(dev->resume_wait,
298 !dev->resume_flag,
305 if (dev->resume_flag)
309 * Resume from the D3, full reboot of ISH processor will happen,
317 * ish_suspend() - ISH suspend callback
334 if (dev->suspend_flag)
337 dev->resume_flag = 0;
338 dev->suspend_flag = 1;
342 if (dev->suspend_flag)
343 wait_event_interruptible_timeout(dev->suspend_wait,
344 !dev->suspend_flag,
347 if (dev->suspend_flag) {
360 if (device_may_wakeup(&pdev->dev))
361 enable_irq_wake(pdev->irq);
376 * ish_resume() - ISH resume callback
389 dev->resume_flag = 1;
395 queue_work(dev->unbound_wq, &resume_work);
420 return sysfs_emit(buf, "%u.%u.%u.%u\n", dev->base_ver.major,
421 dev->base_ver.minor, dev->base_ver.hotfix,
422 dev->base_ver.build);
431 return sysfs_emit(buf, "%u.%u.%u.%u\n", dev->prj_ver.major,
432 dev->prj_ver.minor, dev->prj_ver.hotfix,
433 dev->prj_ver.build);
448 return dev->driver_data->fw_generation ? attr->mode : 0;