summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorVictor(Weiguo) Pan <wpan@nvidia.com>2012-07-02 15:53:08 -0700
committerVarun Colbert <vcolbert@nvidia.com>2012-07-09 16:39:36 -0700
commit25a4796d13bfd8ae0e7618e573ab0aad6f928a6d (patch)
tree1524690036552c18785a7ad482766423d11b3d1e /drivers/crypto
parent6e8cab5c151fea6cbe81b50af1c50da1416ade1e (diff)
crypto: tegra-se: Enable interrupts after clock enable
Because SE interrupts could be enabled in bootloader, if it's not cleared before jumping into kernel, it continues to assert the interrupt line to interrupt controller. When SE interrupts is enabled in kernel, to access SE registers in IST without clock enabled hung the CPU. To fix this issue, interrupt enabling is moved after clock is enabled. bug 1010334 Change-Id: I1b909efce2c9d92c3112039fc217f7c1360f9bbb Reviewed-on: http://git-master/r/113073 (cherry picked from commit b06e6662f738ad01a3b2b6803db654abaa03385e) Signed-off-by: Victor(Weiguo) Pan <wpan@nvidia.com> Change-Id: Ide4b0295c781e0bba7aa071616e3e6160e44ee76 Reviewed-on: http://git-master/r/114064 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/tegra-se.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/crypto/tegra-se.c b/drivers/crypto/tegra-se.c
index 83324162a09f..c03065356984 100644
--- a/drivers/crypto/tegra-se.c
+++ b/drivers/crypto/tegra-se.c
@@ -4,7 +4,7 @@
*
* Support for Tegra Security Engine hardware crypto algorithms.
*
- * Copyright (c) 2011, NVIDIA Corporation.
+ * Copyright (c) 2011-2012, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1902,14 +1902,6 @@ static int tegra_se_probe(struct platform_device *pdev)
goto err_irq;
}
- err = request_irq(se_dev->irq, tegra_se_irq, IRQF_DISABLED,
- DRIVER_NAME, se_dev);
- if (err) {
- dev_err(se_dev->dev, "request_irq failed - irq[%d] err[%d]\n",
- se_dev->irq, err);
- goto err_irq;
- }
-
/* Initialize the clock */
se_dev->pclk = clk_get(se_dev->dev, "se");
if (IS_ERR(se_dev->pclk)) {
@@ -1942,6 +1934,14 @@ static int tegra_se_probe(struct platform_device *pdev)
pm_runtime_enable(se_dev->dev);
tegra_se_key_read_disable_all();
+ err = request_irq(se_dev->irq, tegra_se_irq, IRQF_DISABLED,
+ DRIVER_NAME, se_dev);
+ if (err) {
+ dev_err(se_dev->dev, "request_irq failed - irq[%d] err[%d]\n",
+ se_dev->irq, err);
+ goto clean;
+ }
+
err = tegra_se_alloc_ll_buf(se_dev, SE_MAX_SRC_SG_COUNT,
SE_MAX_DST_SG_COUNT);
if (err) {