Skip to content

Commit

Permalink
Merge branch 'net-ipa-sc7180-suspend-resume'
Browse files Browse the repository at this point in the history
Alex Elder says:

====================
net: ipa: sc7180 suspend/resume

This series permits suspend/resume to work for the IPA driver
on the Qualcomm SC7180 SoC.  The IPA version on this SoC requires
interrupts to be enabled when the suspend and resume callbacks are
made, and the first patch moves away from using the noirq variants.
The second patch fixes a problem with resume that occurs because
pending interrupts were being cleared before starting a channel.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 16, 2020
2 parents d53b116 + 195ef57 commit 2f6ca95
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions drivers/net/ipa/gsi.c
Original file line number Diff line number Diff line change
@@ -238,11 +238,6 @@ static void gsi_irq_ieob_enable(struct gsi *gsi, u32 evt_ring_id)
iowrite32(val, gsi->virt + GSI_CNTXT_SRC_IEOB_IRQ_MSK_OFFSET);
}

static void gsi_isr_ieob_clear(struct gsi *gsi, u32 mask)
{
iowrite32(mask, gsi->virt + GSI_CNTXT_SRC_IEOB_IRQ_CLR_OFFSET);
}

static void gsi_irq_ieob_disable(struct gsi *gsi, u32 evt_ring_id)
{
u32 val;
@@ -777,7 +772,6 @@ static void gsi_channel_deprogram(struct gsi_channel *channel)
int gsi_channel_start(struct gsi *gsi, u32 channel_id)
{
struct gsi_channel *channel = &gsi->channel[channel_id];
u32 evt_ring_id = channel->evt_ring_id;
int ret;

mutex_lock(&gsi->mutex);
@@ -786,9 +780,6 @@ int gsi_channel_start(struct gsi *gsi, u32 channel_id)

mutex_unlock(&gsi->mutex);

/* Clear the channel's event ring interrupt in case it's pending */
gsi_isr_ieob_clear(gsi, BIT(evt_ring_id));

gsi_channel_thaw(channel);

return ret;
@@ -1093,7 +1084,7 @@ static void gsi_isr_ieob(struct gsi *gsi)
u32 event_mask;

event_mask = ioread32(gsi->virt + GSI_CNTXT_SRC_IEOB_IRQ_OFFSET);
gsi_isr_ieob_clear(gsi, event_mask);
iowrite32(event_mask, gsi->virt + GSI_CNTXT_SRC_IEOB_IRQ_CLR_OFFSET);

while (event_mask) {
u32 evt_ring_id = __ffs(event_mask);
4 changes: 2 additions & 2 deletions drivers/net/ipa/ipa_main.c
Original file line number Diff line number Diff line change
@@ -933,8 +933,8 @@ static int ipa_resume(struct device *dev)
}

static const struct dev_pm_ops ipa_pm_ops = {
.suspend_noirq = ipa_suspend,
.resume_noirq = ipa_resume,
.suspend = ipa_suspend,
.resume = ipa_resume,
};

static struct platform_driver ipa_driver = {

0 comments on commit 2f6ca95

Please sign in to comment.