diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2011-03-15 11:51:17 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:41:46 -0800 |
commit | dd86ff772b00594d0480fda064ff93a5d10838d5 (patch) | |
tree | 45b6a9b1fd1a9a9cff7d84a17d34c80619f87c1f /drivers/crypto/tegra-aes.c | |
parent | 9b9201c9cb4dfe7e9303ad41ead01ed6696635b5 (diff) |
crypto: tegra-aes: enable/disable irq per request
Original-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>
Rebase-Id: Re4de8ecdfd6507cad5e0196882326d00f5ae79e0
Diffstat (limited to 'drivers/crypto/tegra-aes.c')
-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); |