Merge d8b7b3eda7 on remote branch

Change-Id: I4f7242170e44a2d7f45b4dd3b13f0054c44d4de4
This commit is contained in:
Linux Build Service Account committed 2021-11-16 22:23:15 -08:00
commit b133b2c47e
1 file changed
+19 -13
+19 -13
View File
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/irq.h>
@@ -2171,20 +2171,21 @@ handle_irq:
case SWRM_INTERRUPT_STATUS_CLK_STOP_FINISHED_V2:
break;
case SWRM_INTERRUPT_STATUS_EXT_CLK_STOP_WAKEUP:
if (swrm->state == SWR_MSTR_UP)
if (swrm->state == SWR_MSTR_UP) {
dev_dbg(swrm->dev,
"%s:SWR Master is already up\n",
__func__);
else
} else {
dev_err_ratelimited(swrm->dev,
"%s: SWR wokeup during clock stop\n",
__func__);
/* It might be possible the slave device gets reset
* and slave interrupt gets missed. So re-enable
* Host IRQ and process slave pending
* interrupts, if any.
*/
swrm_enable_slave_irq(swrm);
/* It might be possible the slave device gets
* reset and slave interrupt gets missed. So
* re-enable Host IRQ and process slave pending
* interrupts, if any.
*/
swrm_enable_slave_irq(swrm);
}
break;
default:
dev_err_ratelimited(swrm->dev,
@@ -2489,9 +2490,6 @@ static int swrm_master_init(struct swr_mstr_ctrl *swrm)
reg[len] = SWRM_COMP_CFG_ADDR;
value[len++] = 0x02;
reg[len] = SWRM_COMP_CFG_ADDR;
value[len++] = 0x03;
reg[len] = SWRM_INTERRUPT_CLEAR;
value[len++] = 0xFFFFFFFF;
@@ -2503,6 +2501,9 @@ static int swrm_master_init(struct swr_mstr_ctrl *swrm)
reg[len] = SWR_MSTR_RX_SWRM_CPU_INTERRUPT_EN;
value[len++] = swrm->intr_mask;
reg[len] = SWRM_COMP_CFG_ADDR;
value[len++] = 0x03;
swr_master_bulk_write(swrm, reg, value, len);
if (!swrm_check_link_status(swrm, 0x1)) {
@@ -2675,6 +2676,8 @@ static int swrm_probe(struct platform_device *pdev)
SWRM_NUM_AUTO_ENUM_SLAVES);
ret = -EINVAL;
goto err_pdata_fail;
} else {
swrm->master.num_dev = swrm->num_dev;
}
}
@@ -3128,6 +3131,7 @@ static int swrm_runtime_suspend(struct device *dev)
struct swr_master *mstr = &swrm->master;
struct swr_device *swr_dev;
int current_state = 0;
struct irq_data *irq_data = NULL;
trace_printk("%s: pm_runtime: suspend state: %d\n",
__func__, swrm->state);
@@ -3236,7 +3240,9 @@ static int swrm_runtime_suspend(struct device *dev)
if (swrm->clk_stop_mode0_supp) {
if (swrm->wake_irq > 0) {
enable_irq(swrm->wake_irq);
irq_data = irq_get_irq_data(swrm->wake_irq);
if (irq_data && irqd_irq_disabled(irq_data))
enable_irq(swrm->wake_irq);
} else if (swrm->ipc_wakeup) {
msm_aud_evt_blocking_notifier_call_chain(
SWR_WAKE_IRQ_REGISTER, (void *)swrm);