summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam
diff options
context:
space:
mode:
authorFranck LENORMAND <franck.lenormand@nxp.com>2018-01-18 16:35:45 +0100
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit7e0390ca327e2807d12aaca35d9f87c94ec470dd (patch)
treef1f6ecddf899f4125314c8e0a8ba1b43258ebfb1 /drivers/crypto/caam
parent656393653516fa7b94ba89bfe1d375077b0e0bc6 (diff)
MLK-17412-01: Fix secvio driver to have same driver name as DTS
The name of the driver was "snvs-secvio" which doesn't corresponds to its use in the differents dts files. This patch change the driver name to "caam-snvs" to corresponds to the dts files. Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Diffstat (limited to 'drivers/crypto/caam')
-rw-r--r--drivers/crypto/caam/secvio.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/crypto/caam/secvio.c b/drivers/crypto/caam/secvio.c
index 4bbebb9d341d..c6a29d49de68 100644
--- a/drivers/crypto/caam/secvio.c
+++ b/drivers/crypto/caam/secvio.c
@@ -11,6 +11,13 @@
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_address.h>
+
+/* The driver is matched with node caam_snvs to get regmap
+ * It will then retrieve interruption and tamper alarm configuration from
+ * node caam-secvio searching for the compat string "fsl,imx6q-caam-secvio"
+ */
+#define DRIVER_NAME "caam-snvs"
+
/*
* These names are associated with each violation handler.
* The source names were taken from MX6, and are based on recommendations
@@ -219,12 +226,13 @@ static int snvs_secvio_probe(struct platform_device *pdev)
npirq = of_find_compatible_node(NULL, NULL, "fsl,imx6q-caam-secvio");
if (!npirq) {
- dev_err(svdev, "can't identify secvio interrupt\n");
+ dev_err(svdev, "can't find secvio node\n");
kfree(svpriv);
return -EINVAL;
}
svpriv->irq = irq_of_parse_and_map(npirq, 0);
if (svpriv->irq <= 0) {
+ dev_err(svdev, "can't identify secvio interrupt\n");
kfree(svpriv);
return -EINVAL;
}
@@ -234,7 +242,7 @@ static int snvs_secvio_probe(struct platform_device *pdev)
itd = of_get_property(npirq, "internal-boot-tamper", NULL);
etd = of_get_property(npirq, "external-pin-tamper", NULL);
if (!jtd | !wtd | !itd | !etd ) {
- dev_err(svdev, "can't identify tamper alarm configuration\n");
+ dev_err(svdev, "can't identify all tamper alarm configuration\n");
kfree(svpriv);
return -EINVAL;
}
@@ -285,7 +293,7 @@ static int snvs_secvio_probe(struct platform_device *pdev)
(unsigned long)svdev);
error = request_irq(svpriv->irq, snvs_secvio_interrupt,
- IRQF_SHARED, "snvs-secvio", svdev);
+ IRQF_SHARED, DRIVER_NAME, svdev);
if (error) {
dev_err(svdev, "can't connect secvio interrupt\n");
irq_dispose_mapping(svpriv->irq);
@@ -317,7 +325,7 @@ MODULE_DEVICE_TABLE(of, snvs_secvio_match);
static struct platform_driver snvs_secvio_driver = {
.driver = {
- .name = "snvs-secvio",
+ .name = DRIVER_NAME,
.owner = THIS_MODULE,
.of_match_table = snvs_secvio_match,
},