summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-22 13:24:09 -0700
committerOlof Johansson <olof@lixom.net>2012-09-22 13:24:09 -0700
commitd6a93ceb3f523be3a00b5ee8c6380653c764927b (patch)
tree9699d60dc3b21e9fc7782af93aefdd334cfc46b7 /drivers/crypto
parentfb6f3d69af95006c0518be7fbcd73bff555c837d (diff)
parent1b90e06b14291ce3c252bd10e4ce981a08152e2e (diff)
downloadop-kernel-dev-d6a93ceb3f523be3a00b5ee8c6380653c764927b.zip
op-kernel-dev-d6a93ceb3f523be3a00b5ee8c6380653c764927b.tar.gz
Merge branch 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux into late/kirkwood
From Jason Cooper: New bindings: - iconnect nand and keys - mv_cesa - gpio-fan * 'kirkwood/dt' of git://git.infradead.org/users/jcooper/linux: ARM: kirkwood: Use devicetree to define DNS-32[05] fan hwmon: Add devicetree bindings to gpio-fan Crypto: CESA: Add support for DT based instantiation. ARM: Kirkwood: Describe iconnect nand in DT. ARM: Kirkwood: Describe iconnect keys in DT.
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/mv_cesa.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index 21c1a87..24ccae4 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -19,6 +19,9 @@
#include <linux/clk.h>
#include <crypto/internal/hash.h>
#include <crypto/sha.h>
+#include <linux/of.h>
+#include <linux/of_platform.h>
+#include <linux/of_irq.h>
#include "mv_cesa.h"
@@ -1062,7 +1065,10 @@ static int mv_probe(struct platform_device *pdev)
goto err_unmap_reg;
}
- irq = platform_get_irq(pdev, 0);
+ if (pdev->dev.of_node)
+ irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
+ else
+ irq = platform_get_irq(pdev, 0);
if (irq < 0 || irq == NO_IRQ) {
ret = irq;
goto err_unmap_sram;
@@ -1170,12 +1176,19 @@ static int mv_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id mv_cesa_of_match_table[] = {
+ { .compatible = "marvell,orion-crypto", },
+ {}
+};
+MODULE_DEVICE_TABLE(of, mv_cesa_of_match_table);
+
static struct platform_driver marvell_crypto = {
.probe = mv_probe,
- .remove = mv_remove,
+ .remove = __devexit_p(mv_remove),
.driver = {
.owner = THIS_MODULE,
.name = "mv_crypto",
+ .of_match_table = of_match_ptr(mv_cesa_of_match_table),
},
};
MODULE_ALIAS("platform:mv_crypto");
OpenPOWER on IntegriCloud