mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 20:53:03 +02:00
virtio_mmio: add support to set IRQ of a virtio device as wakeup source
According to virtio_mmio wakeup flag in device trees, set its IRQ as wakeup source in virtqueue initialization. Signed-off-by: Minghao Xue <quic_mingxue@quicinc.com> Message-Id: <1654851507-13891-3-git-send-email-quic_mingxue@quicinc.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
51ded7cdf2
commit
02213273f7
|
|
@ -487,6 +487,9 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned int nvqs,
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
if (of_property_read_bool(vm_dev->pdev->dev.of_node, "wakeup-source"))
|
||||||
|
enable_irq_wake(irq);
|
||||||
|
|
||||||
for (i = 0; i < nvqs; ++i) {
|
for (i = 0; i < nvqs; ++i) {
|
||||||
if (!names[i]) {
|
if (!names[i]) {
|
||||||
vqs[i] = NULL;
|
vqs[i] = NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user