mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
remoteproc/mediatek: acknowledge watchdog IRQ after handled
[ Upstream commit8c545f52dc] Acknowledges watchdog IRQ after handled or kernel keeps receiving the interrupt. Fixes:fd0b6c1ff8("remoteproc/mediatek: Add support for mt8192 SCP") Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20210127082046.3735157-1-tzungbi@google.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dc798d57ca
commit
291803ee73
@@ -47,6 +47,7 @@
|
|||||||
|
|
||||||
#define MT8192_CORE0_SW_RSTN_CLR 0x10000
|
#define MT8192_CORE0_SW_RSTN_CLR 0x10000
|
||||||
#define MT8192_CORE0_SW_RSTN_SET 0x10004
|
#define MT8192_CORE0_SW_RSTN_SET 0x10004
|
||||||
|
#define MT8192_CORE0_WDT_IRQ 0x10030
|
||||||
#define MT8192_CORE0_WDT_CFG 0x10034
|
#define MT8192_CORE0_WDT_CFG 0x10034
|
||||||
|
|
||||||
#define SCP_FW_VER_LEN 32
|
#define SCP_FW_VER_LEN 32
|
||||||
|
|||||||
@@ -184,10 +184,8 @@ static void mt8192_scp_irq_handler(struct mtk_scp *scp)
|
|||||||
|
|
||||||
scp_to_host = readl(scp->reg_base + MT8192_SCP2APMCU_IPC_SET);
|
scp_to_host = readl(scp->reg_base + MT8192_SCP2APMCU_IPC_SET);
|
||||||
|
|
||||||
if (scp_to_host & MT8192_SCP_IPC_INT_BIT)
|
if (scp_to_host & MT8192_SCP_IPC_INT_BIT) {
|
||||||
scp_ipi_handler(scp);
|
scp_ipi_handler(scp);
|
||||||
else
|
|
||||||
scp_wdt_handler(scp, scp_to_host);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SCP won't send another interrupt until we clear
|
* SCP won't send another interrupt until we clear
|
||||||
@@ -195,6 +193,10 @@ static void mt8192_scp_irq_handler(struct mtk_scp *scp)
|
|||||||
*/
|
*/
|
||||||
writel(MT8192_SCP_IPC_INT_BIT,
|
writel(MT8192_SCP_IPC_INT_BIT,
|
||||||
scp->reg_base + MT8192_SCP2APMCU_IPC_CLR);
|
scp->reg_base + MT8192_SCP2APMCU_IPC_CLR);
|
||||||
|
} else {
|
||||||
|
scp_wdt_handler(scp, scp_to_host);
|
||||||
|
writel(1, scp->reg_base + MT8192_CORE0_WDT_IRQ);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static irqreturn_t scp_irq_handler(int irq, void *priv)
|
static irqreturn_t scp_irq_handler(int irq, void *priv)
|
||||||
|
|||||||
Reference in New Issue
Block a user