mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
PCI: tegra264: dma: Add poll to disarm MSI
To avoid getting spurious interrupts during XDMA channel reset, Add polling of MSI states for NV_XDMA_CHANNEL_DEBUG_REGISTER_4_0 register once channel is disabled. Bug 4742850 Change-Id: Id39e53f0fd33faa4358a3648e6baea8cc96c187c Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3330634 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Jon Hunter
parent
8cb3f30c12
commit
6dbef270d8
@@ -122,7 +122,7 @@ static inline void xdma_hw_deinit(void *cookie, u32 ch)
|
|||||||
{
|
{
|
||||||
struct xdma_prv *prv = (struct xdma_prv *)cookie;
|
struct xdma_prv *prv = (struct xdma_prv *)cookie;
|
||||||
int err;
|
int err;
|
||||||
u32 val = 0;
|
u32 val = 0, debug_reg_b4_poll;
|
||||||
|
|
||||||
val = xdma_channel_rd(prv->xdma_base, ch, XDMA_CHANNEL_CTRL);
|
val = xdma_channel_rd(prv->xdma_base, ch, XDMA_CHANNEL_CTRL);
|
||||||
val &= ~XDMA_CHANNEL_CTRL_EN;
|
val &= ~XDMA_CHANNEL_CTRL_EN;
|
||||||
@@ -133,12 +133,8 @@ static inline void xdma_hw_deinit(void *cookie, u32 ch)
|
|||||||
if (err)
|
if (err)
|
||||||
dev_err(prv->dev, "failed to reset dma channel: %d st: 0x%x\n", ch, val);
|
dev_err(prv->dev, "failed to reset dma channel: %d st: 0x%x\n", ch, val);
|
||||||
|
|
||||||
/*
|
/* Store the value before polling to print post polling status for fail case */
|
||||||
* FIXME DEBUG regiser access is failing due to PLM issue in backdoor boot, verify and
|
debug_reg_b4_poll = xdma_channel_rd(prv->xdma_base, ch, XDMA_CHANNEL_DEBUG_REGISTER_4);
|
||||||
* enable on silicon
|
|
||||||
*/
|
|
||||||
#if 0
|
|
||||||
dev_err(prv->dev, "poll on ch channel: %d dis done st: 0x%x\n", ch, val);
|
|
||||||
|
|
||||||
err = readl_poll_timeout_atomic(prv->xdma_base + XDMA_CHANNEL_DEBUG_REGISTER_4, val,
|
err = readl_poll_timeout_atomic(prv->xdma_base + XDMA_CHANNEL_DEBUG_REGISTER_4, val,
|
||||||
(val & (XDMA_CHANNEL_DEBUG_REGISTER_4_INTR_ENGINE_MSI_CHAN_ISR_INPROG_FSM |
|
(val & (XDMA_CHANNEL_DEBUG_REGISTER_4_INTR_ENGINE_MSI_CHAN_ISR_INPROG_FSM |
|
||||||
@@ -147,9 +143,8 @@ static inline void xdma_hw_deinit(void *cookie, u32 ch)
|
|||||||
XDMA_CHANNEL_DEBUG_REGISTER_4_INTR_ENGINE_MSI_CHAN_MSI_DISP_SHADOW_GEN_STATUS_MSI |
|
XDMA_CHANNEL_DEBUG_REGISTER_4_INTR_ENGINE_MSI_CHAN_MSI_DISP_SHADOW_GEN_STATUS_MSI |
|
||||||
XDMA_CHANNEL_DEBUG_REGISTER_4_INTR_ENGINE_MSI_CHAN_MSI_DISP_SHADOW_FUNC_ERR_DETECTED)) == 0, 1, 10000);
|
XDMA_CHANNEL_DEBUG_REGISTER_4_INTR_ENGINE_MSI_CHAN_MSI_DISP_SHADOW_FUNC_ERR_DETECTED)) == 0, 1, 10000);
|
||||||
if (err)
|
if (err)
|
||||||
dev_err(prv->dev, "failed to reset msi channel: 0 st: 0x%x\n", val);
|
dev_err(prv->dev, "failed to reset msi channel:%d. B4 poll st:0x%x Post poll st:0x%x\n",
|
||||||
dev_err(prv->dev, "poll on msi disable done channel: %d st: 0x%x\n", ch, val);
|
ch, debug_reg_b4_poll, val);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** From OSI */
|
/** From OSI */
|
||||||
|
|||||||
Reference in New Issue
Block a user