diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2011-03-15 11:51:17 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-03-16 09:47:17 -0800 |
commit | fe13d9d4f67c9d4e68b6c31d904efe51a22bdc52 (patch) | |
tree | bf6290d01339ad55cd70a4fa371597fdb1e65457 /drivers/crypto | |
parent | 2a1398347981234df80dbf016090182df6feb4b5 (diff) |
crypto: tegra-aes: enable/disable irq per request
Change-Id: I7d8fe24ab5aa914fc2753f256eec261fcbf746bc
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/22594
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/tegra-aes.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/crypto/tegra-aes.c b/drivers/crypto/tegra-aes.c index 875ed152d969..c330a94b9e89 100644 --- a/drivers/crypto/tegra-aes.c +++ b/drivers/crypto/tegra-aes.c @@ -247,6 +247,7 @@ static int aes_start_crypt(struct tegra_aes_dev *dd, u32 in_addr, u32 out_addr, /* error, dma xfer complete */ aes_writel(dd, 0x33, INT_ENB); + enable_irq(INT_VDE_BSE_V); cmdq[qlen++] = UCQOPCODE_DMASETUP << ICQBITSHIFT_OPCODE; cmdq[qlen++] = in_addr; @@ -316,9 +317,11 @@ static int aes_start_crypt(struct tegra_aes_dev *dd, u32 in_addr, u32 out_addr, if (ret == 0) { dev_err(dd->dev, "timed out (0x%x)\n", aes_readl(dd, INTR_STATUS)); + disable_irq(INT_VDE_BSE_V); return -ETIMEDOUT; } + disable_irq(INT_VDE_BSE_V); aes_writel(dd, cmdq[qlen - 1], ICMDQUE_WR); return 0; } @@ -626,12 +629,8 @@ static irqreturn_t aes_irq(int irq, void *dev_id) u32 value = aes_readl(dd, INTR_STATUS); dev_dbg(dd->dev, "irq_stat: 0x%x", value); - if (!((value & ENGINE_BUSY_FIELD) & !(value & ICQ_EMPTY_FIELD))) { - /* avoid misfires */ - value &= ~0x33; - aes_writel(dd, value, INT_ENB); + if (!((value & ENGINE_BUSY_FIELD) & !(value & ICQ_EMPTY_FIELD))) complete(&dd->op_complete); - } return IRQ_HANDLED; } @@ -1015,6 +1014,7 @@ static int tegra_aes_probe(struct platform_device *pdev) dev_err(dev, "request_irq failed\n"); goto out; } + disable_irq(INT_VDE_BSE_V); spin_lock_init(&list_lock); spin_lock(&list_lock); |