crypto: s5p-sss - Remove useless hash interrupt handler
[cascardo/linux.git] / drivers / crypto / s5p-sss.c
index 3730fb0..71ca6a5 100644 (file)
  *
  */
 
+#include <linux/clk.h>
+#include <linux/crypto.h>
+#include <linux/dma-mapping.h>
 #include <linux/err.h>
-#include <linux/module.h>
-#include <linux/init.h>
 #include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
-#include <linux/clk.h>
+#include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/scatterlist.h>
-#include <linux/dma-mapping.h>
-#include <linux/io.h>
-#include <linux/of.h>
-#include <linux/crypto.h>
-#include <linux/interrupt.h>
 
-#include <crypto/algapi.h>
-#include <crypto/aes.h>
 #include <crypto/ctr.h>
+#include <crypto/aes.h>
+#include <crypto/algapi.h>
 #include <crypto/scatterwalk.h>
 
 #define _SBF(s, v)                      ((v) << (s))
 
 /**
  * struct samsung_aes_variant - platform specific SSS driver data
- * @has_hash_irq: true if SSS module uses hash interrupt, false otherwise
  * @aes_offset: AES register offset from SSS module's base.
  *
  * Specifies platform specific configuration of SSS module.
  * expansion of its usage.
  */
 struct samsung_aes_variant {
-       bool                        has_hash_irq;
        unsigned int                aes_offset;
 };
 
@@ -178,7 +176,6 @@ struct s5p_aes_dev {
        struct clk                 *clk;
        void __iomem               *ioaddr;
        void __iomem               *aes_ioaddr;
-       int                         irq_hash;
        int                         irq_fc;
 
        struct ablkcipher_request  *req;
@@ -201,12 +198,10 @@ struct s5p_aes_dev {
 static struct s5p_aes_dev *s5p_dev;
 
 static const struct samsung_aes_variant s5p_aes_data = {
-       .has_hash_irq   = true,
        .aes_offset     = 0x4000,
 };
 
 static const struct samsung_aes_variant exynos_aes_data = {
-       .has_hash_irq   = false,
        .aes_offset     = 0x200,
 };
 
@@ -421,15 +416,13 @@ static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
 
        spin_lock_irqsave(&dev->lock, flags);
 
-       if (irq == dev->irq_fc) {
-               status = SSS_READ(dev, FCINTSTAT);
-               if (status & SSS_FCINTSTAT_BRDMAINT)
-                       s5p_aes_rx(dev);
-               if (status & SSS_FCINTSTAT_BTDMAINT)
-                       s5p_aes_tx(dev);
+       status = SSS_READ(dev, FCINTSTAT);
+       if (status & SSS_FCINTSTAT_BRDMAINT)
+               s5p_aes_rx(dev);
+       if (status & SSS_FCINTSTAT_BTDMAINT)
+               s5p_aes_tx(dev);
 
-               SSS_WRITE(dev, FCINTPEND, status);
-       }
+       SSS_WRITE(dev, FCINTPEND, status);
 
        spin_unlock_irqrestore(&dev->lock, flags);
 
@@ -577,7 +570,6 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode)
        return;
 
 outdata_error:
-       s5p_free_sg_cpy(dev, &dev->sg_src_cpy);
        s5p_unset_indata(dev);
 
 indata_error:
@@ -796,21 +788,6 @@ static int s5p_aes_probe(struct platform_device *pdev)
                goto err_irq;
        }
 
-       if (variant->has_hash_irq) {
-               pdata->irq_hash = platform_get_irq(pdev, 1);
-               if (pdata->irq_hash < 0) {
-                       err = pdata->irq_hash;
-                       dev_warn(dev, "hash interrupt is not available.\n");
-                       goto err_irq;
-               }
-               err = devm_request_irq(dev, pdata->irq_hash, s5p_aes_interrupt,
-                                      IRQF_SHARED, pdev->name, pdev);
-               if (err < 0) {
-                       dev_warn(dev, "hash interrupt is not available.\n");
-                       goto err_irq;
-               }
-       }
-
        pdata->busy = false;
        pdata->variant = variant;
        pdata->dev = dev;