UPSTREAM: 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> Bug: 253945054 Change-Id: I6faa6fa4abb72b936f999472af6579bb059832de (cherry picked from commit 02213273f72a43bad3a8e9c18595a2c74ee487e8) Signed-off-by: Minghao Xue <quic_mingxue@quicinc.com>
This commit is contained in:
committed by
Treehugger Robot
parent
56a0806bcb
commit
2f4a562ed8
@@ -474,6 +474,9 @@ static int vm_find_vqs(struct virtio_device *vdev, unsigned nvqs,
|
||||
if (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) {
|
||||
if (!names[i]) {
|
||||
vqs[i] = NULL;
|
||||
|
||||
Reference in New Issue
Block a user