diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-22 16:24:09 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-22 16:24:09 -0400 |
commit | d6a93ceb3f523be3a00b5ee8c6380653c764927b (patch) | |
tree | 9699d60dc3b21e9fc7782af93aefdd334cfc46b7 /drivers/crypto | |
parent | fb6f3d69af95006c0518be7fbcd73bff555c837d (diff) | |
parent | 1b90e06b14291ce3c252bd10e4ce981a08152e2e (diff) |
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.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c index 21c1a87032b7..24ccae453e79 100644 --- a/drivers/crypto/mv_cesa.c +++ b/drivers/crypto/mv_cesa.c | |||
@@ -19,6 +19,9 @@ | |||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
20 | #include <crypto/internal/hash.h> | 20 | #include <crypto/internal/hash.h> |
21 | #include <crypto/sha.h> | 21 | #include <crypto/sha.h> |
22 | #include <linux/of.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | #include <linux/of_irq.h> | ||
22 | 25 | ||
23 | #include "mv_cesa.h" | 26 | #include "mv_cesa.h" |
24 | 27 | ||
@@ -1062,7 +1065,10 @@ static int mv_probe(struct platform_device *pdev) | |||
1062 | goto err_unmap_reg; | 1065 | goto err_unmap_reg; |
1063 | } | 1066 | } |
1064 | 1067 | ||
1065 | irq = platform_get_irq(pdev, 0); | 1068 | if (pdev->dev.of_node) |
1069 | irq = irq_of_parse_and_map(pdev->dev.of_node, 0); | ||
1070 | else | ||
1071 | irq = platform_get_irq(pdev, 0); | ||
1066 | if (irq < 0 || irq == NO_IRQ) { | 1072 | if (irq < 0 || irq == NO_IRQ) { |
1067 | ret = irq; | 1073 | ret = irq; |
1068 | goto err_unmap_sram; | 1074 | goto err_unmap_sram; |
@@ -1170,12 +1176,19 @@ static int mv_remove(struct platform_device *pdev) | |||
1170 | return 0; | 1176 | return 0; |
1171 | } | 1177 | } |
1172 | 1178 | ||
1179 | static const struct of_device_id mv_cesa_of_match_table[] = { | ||
1180 | { .compatible = "marvell,orion-crypto", }, | ||
1181 | {} | ||
1182 | }; | ||
1183 | MODULE_DEVICE_TABLE(of, mv_cesa_of_match_table); | ||
1184 | |||
1173 | static struct platform_driver marvell_crypto = { | 1185 | static struct platform_driver marvell_crypto = { |
1174 | .probe = mv_probe, | 1186 | .probe = mv_probe, |
1175 | .remove = mv_remove, | 1187 | .remove = __devexit_p(mv_remove), |
1176 | .driver = { | 1188 | .driver = { |
1177 | .owner = THIS_MODULE, | 1189 | .owner = THIS_MODULE, |
1178 | .name = "mv_crypto", | 1190 | .name = "mv_crypto", |
1191 | .of_match_table = of_match_ptr(mv_cesa_of_match_table), | ||
1179 | }, | 1192 | }, |
1180 | }; | 1193 | }; |
1181 | MODULE_ALIAS("platform:mv_crypto"); | 1194 | MODULE_ALIAS("platform:mv_crypto"); |