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"
49 * ish_event_tracer() - Callback function to dump trace messages
71 * ish_init() - Init function
87 dev_err(dev->devc, "ISH: hw start failed.\n"); in ish_init()
91 /* Start the inter process communication to ISH processor */ in ish_init()
94 dev_err(dev->devc, "ISHTP: Protocol init failed.\n"); in ish_init()
110 return !pm_suspend_via_firmware() || pdev->device == CHV_DEVICE_ID; in ish_should_enter_d0i3()
115 return !pm_resume_via_firmware() || pdev->device == CHV_DEVICE_ID; in ish_should_leave_d0i3()
128 return -ENODEV; in enable_gpe()
130 wakeup = &adev->wakeup; in enable_gpe()
132 acpi_sts = acpi_enable_gpe(wakeup->gpe_device, wakeup->gpe_number); in enable_gpe()
135 return -EIO; in enable_gpe()
140 return -ENODEV; in enable_gpe()
148 pci_pme_capable(pdev, PCI_D3cold)) && !enable_gpe(&pdev->dev)) { in enable_pme_wake()
150 dev_dbg(&pdev->dev, "ish ipc driver pme wake enabled\n"); in enable_pme_wake()
155 * ish_probe() - PCI driver probe callback
169 struct device *dev = &pdev->dev; in ish_probe()
173 return -ENODEV; in ish_probe()
195 ret = -ENOMEM; in ish_probe()
199 ishtp->print_log = ish_event_tracer; in ish_probe()
202 hw->mem_addr = pcim_iomap_table(pdev)[0]; in ish_probe()
203 ishtp->pdev = pdev; in ish_probe()
207 if (!pdev->msi_enabled && !pdev->msix_enabled) in ish_probe()
210 ret = devm_request_irq(dev, pdev->irq, ish_irq_handler, in ish_probe()
213 dev_err(dev, "ISH: request IRQ %d failed\n", pdev->irq); in ish_probe()
217 dev_set_drvdata(ishtp->devc, ishtp); in ish_probe()
219 init_waitqueue_head(&ishtp->suspend_wait); in ish_probe()
220 init_waitqueue_head(&ishtp->resume_wait); in ish_probe()
223 if (pdev->device == EHL_Ax_DEVICE_ID) in ish_probe()
234 * ish_remove() - PCI driver remove callback
253 * ish_resume_handler() - Work function to complete resume
265 uint32_t fwsts = dev->ops->get_fw_status(dev); in ish_resume_handler()
267 if (ish_should_leave_d0i3(pdev) && !dev->suspend_flag in ish_resume_handler()
269 disable_irq_wake(pdev->irq); in ish_resume_handler()
276 if (dev->resume_flag) in ish_resume_handler()
277 wait_event_interruptible_timeout(dev->resume_wait, in ish_resume_handler()
278 !dev->resume_flag, in ish_resume_handler()
285 if (dev->resume_flag) in ish_resume_handler()
289 * Resume from the D3, full reboot of ISH processor will happen, in ish_resume_handler()
297 * ish_suspend() - ISH suspend callback
314 if (dev->suspend_flag) in ish_suspend()
317 dev->resume_flag = 0; in ish_suspend()
318 dev->suspend_flag = 1; in ish_suspend()
322 if (dev->suspend_flag) in ish_suspend()
323 wait_event_interruptible_timeout(dev->suspend_wait, in ish_suspend()
324 !dev->suspend_flag, in ish_suspend()
327 if (dev->suspend_flag) { in ish_suspend()
340 enable_irq_wake(pdev->irq); in ish_suspend()
355 * ish_resume() - ISH resume callback
368 if (dev->pdev->device == EHL_Ax_DEVICE_ID) { in ish_resume()
371 dev_dbg(dev->devc, "set power state to D0 for ehl\n"); in ish_resume()
375 dev->resume_flag = 1; in ish_resume()