Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 5 Apr 2017 13:57:07 +0000 (21:57 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 5 Apr 2017 13:57:07 +0000 (21:57 +0800)
Merge the crypto tree to resolve conflict between caam changes.

1  2 
drivers/crypto/caam/ctrl.c
drivers/crypto/caam/intern.h
drivers/crypto/ccp/ccp-dev-v5.c
drivers/crypto/ccp/ccp-dev.h
include/linux/ccp.h

@@@ -311,15 -307,9 +311,14 @@@ static int caam_remove(struct platform_
        ctrlpriv = dev_get_drvdata(ctrldev);
        ctrl = (struct caam_ctrl __iomem *)ctrlpriv->ctrl;
  
-       /* Remove platform devices for JobRs */
-       for (ring = 0; ring < ctrlpriv->total_jobrs; ring++)
-               of_device_unregister(ctrlpriv->jrpdev[ring]);
+       /* Remove platform devices under the crypto node */
+       of_platform_depopulate(ctrldev);
  
 +#ifdef CONFIG_CAAM_QI
 +      if (ctrlpriv->qidev)
 +              caam_qi_shutdown(ctrlpriv->qidev);
 +#endif
 +
        /* De-initialize RNG state handles initialized by this driver. */
        if (ctrlpriv->rng4_sh_init)
                deinstantiate_rng(ctrldev, ctrlpriv->rng4_sh_init);
@@@ -410,6 -400,34 +409,17 @@@ int caam_get_era(void
  }
  EXPORT_SYMBOL(caam_get_era);
  
 -#ifdef CONFIG_DEBUG_FS
 -static int caam_debugfs_u64_get(void *data, u64 *val)
 -{
 -      *val = caam64_to_cpu(*(u64 *)data);
 -      return 0;
 -}
 -
 -static int caam_debugfs_u32_get(void *data, u64 *val)
 -{
 -      *val = caam32_to_cpu(*(u32 *)data);
 -      return 0;
 -}
 -
 -DEFINE_SIMPLE_ATTRIBUTE(caam_fops_u32_ro, caam_debugfs_u32_get, NULL, "%llu\n");
 -DEFINE_SIMPLE_ATTRIBUTE(caam_fops_u64_ro, caam_debugfs_u64_get, NULL, "%llu\n");
 -#endif
 -
+ static const struct of_device_id caam_match[] = {
+       {
+               .compatible = "fsl,sec-v4.0",
+       },
+       {
+               .compatible = "fsl,sec4.0",
+       },
+       {},
+ };
+ MODULE_DEVICE_TABLE(of, caam_match);
  /* Probe routine for CAAM top (controller) level */
  static int caam_probe(struct platform_device *pdev)
  {
                goto iounmap_ctrl;
        }
  
 +#ifdef CONFIG_DEBUG_FS
 +      /*
 +       * FIXME: needs better naming distinction, as some amalgamation of
 +       * "caam" and nprop->full_name. The OF name isn't distinctive,
 +       * but does separate instances
 +       */
 +      perfmon = (struct caam_perfmon __force *)&ctrl->perfmon;
 +
 +      ctrlpriv->dfs_root = debugfs_create_dir(dev_name(dev), NULL);
 +      ctrlpriv->ctl = debugfs_create_dir("ctl", ctrlpriv->dfs_root);
 +#endif
++
        ring = 0;
-       ridx = 0;
-       ctrlpriv->total_jobrs = 0;
        for_each_available_child_of_node(nprop, np)
                if (of_device_is_compatible(np, "fsl,sec-v4.0-job-ring") ||
                    of_device_is_compatible(np, "fsl,sec4.0-job-ring")) {
@@@ -66,10 -66,6 +66,9 @@@ struct caam_drv_private_jr 
  struct caam_drv_private {
  
        struct device *dev;
-       struct platform_device **jrpdev; /* Alloc'ed array per sub-device */
 +#ifdef CONFIG_CAAM_QI
 +      struct device *qidev;
 +#endif
        struct platform_device *pdev;
  
        /* Physical-presence section */
Simple merge
Simple merge
Simple merge