diff options
Diffstat (limited to 'drivers/crypto/talitos.c')
-rw-r--r-- | drivers/crypto/talitos.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 4bcd825b5739..854e2632f9a6 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
@@ -161,7 +161,7 @@ struct talitos_private { | |||
161 | static void to_talitos_ptr(struct talitos_ptr *talitos_ptr, dma_addr_t dma_addr) | 161 | static void to_talitos_ptr(struct talitos_ptr *talitos_ptr, dma_addr_t dma_addr) |
162 | { | 162 | { |
163 | talitos_ptr->ptr = cpu_to_be32(lower_32_bits(dma_addr)); | 163 | talitos_ptr->ptr = cpu_to_be32(lower_32_bits(dma_addr)); |
164 | talitos_ptr->eptr = cpu_to_be32(upper_32_bits(dma_addr)); | 164 | talitos_ptr->eptr = upper_32_bits(dma_addr); |
165 | } | 165 | } |
166 | 166 | ||
167 | /* | 167 | /* |
@@ -332,10 +332,9 @@ static int talitos_submit(struct device *dev, struct talitos_desc *desc, | |||
332 | 332 | ||
333 | /* GO! */ | 333 | /* GO! */ |
334 | wmb(); | 334 | wmb(); |
335 | out_be32(priv->reg + TALITOS_FF(ch), | 335 | out_be32(priv->reg + TALITOS_FF(ch), upper_32_bits(request->dma_desc)); |
336 | cpu_to_be32(upper_32_bits(request->dma_desc))); | ||
337 | out_be32(priv->reg + TALITOS_FF_LO(ch), | 336 | out_be32(priv->reg + TALITOS_FF_LO(ch), |
338 | cpu_to_be32(lower_32_bits(request->dma_desc))); | 337 | lower_32_bits(request->dma_desc)); |
339 | 338 | ||
340 | spin_unlock_irqrestore(&priv->chan[ch].head_lock, flags); | 339 | spin_unlock_irqrestore(&priv->chan[ch].head_lock, flags); |
341 | 340 | ||
@@ -1751,14 +1750,14 @@ static int ahash_init_sha224_swinit(struct ahash_request *areq) | |||
1751 | ahash_init(areq); | 1750 | ahash_init(areq); |
1752 | req_ctx->swinit = 1;/* prevent h/w initting context with sha256 values*/ | 1751 | req_ctx->swinit = 1;/* prevent h/w initting context with sha256 values*/ |
1753 | 1752 | ||
1754 | req_ctx->hw_context[0] = cpu_to_be32(SHA224_H0); | 1753 | req_ctx->hw_context[0] = SHA224_H0; |
1755 | req_ctx->hw_context[1] = cpu_to_be32(SHA224_H1); | 1754 | req_ctx->hw_context[1] = SHA224_H1; |
1756 | req_ctx->hw_context[2] = cpu_to_be32(SHA224_H2); | 1755 | req_ctx->hw_context[2] = SHA224_H2; |
1757 | req_ctx->hw_context[3] = cpu_to_be32(SHA224_H3); | 1756 | req_ctx->hw_context[3] = SHA224_H3; |
1758 | req_ctx->hw_context[4] = cpu_to_be32(SHA224_H4); | 1757 | req_ctx->hw_context[4] = SHA224_H4; |
1759 | req_ctx->hw_context[5] = cpu_to_be32(SHA224_H5); | 1758 | req_ctx->hw_context[5] = SHA224_H5; |
1760 | req_ctx->hw_context[6] = cpu_to_be32(SHA224_H6); | 1759 | req_ctx->hw_context[6] = SHA224_H6; |
1761 | req_ctx->hw_context[7] = cpu_to_be32(SHA224_H7); | 1760 | req_ctx->hw_context[7] = SHA224_H7; |
1762 | 1761 | ||
1763 | /* init 64-bit count */ | 1762 | /* init 64-bit count */ |
1764 | req_ctx->hw_context[8] = 0; | 1763 | req_ctx->hw_context[8] = 0; |
@@ -2333,8 +2332,7 @@ static int talitos_remove(struct platform_device *ofdev) | |||
2333 | talitos_unregister_rng(dev); | 2332 | talitos_unregister_rng(dev); |
2334 | 2333 | ||
2335 | for (i = 0; i < priv->num_channels; i++) | 2334 | for (i = 0; i < priv->num_channels; i++) |
2336 | if (priv->chan[i].fifo) | 2335 | kfree(priv->chan[i].fifo); |
2337 | kfree(priv->chan[i].fifo); | ||
2338 | 2336 | ||
2339 | kfree(priv->chan); | 2337 | kfree(priv->chan); |
2340 | 2338 | ||
@@ -2389,6 +2387,9 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, | |||
2389 | DESC_HDR_MODE0_MDEU_SHA256; | 2387 | DESC_HDR_MODE0_MDEU_SHA256; |
2390 | } | 2388 | } |
2391 | break; | 2389 | break; |
2390 | default: | ||
2391 | dev_err(dev, "unknown algorithm type %d\n", t_alg->algt.type); | ||
2392 | return ERR_PTR(-EINVAL); | ||
2392 | } | 2393 | } |
2393 | 2394 | ||
2394 | alg->cra_module = THIS_MODULE; | 2395 | alg->cra_module = THIS_MODULE; |
@@ -2401,8 +2402,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev, | |||
2401 | return t_alg; | 2402 | return t_alg; |
2402 | } | 2403 | } |
2403 | 2404 | ||
2404 | static int talitos_probe(struct platform_device *ofdev, | 2405 | static int talitos_probe(struct platform_device *ofdev) |
2405 | const struct of_device_id *match) | ||
2406 | { | 2406 | { |
2407 | struct device *dev = &ofdev->dev; | 2407 | struct device *dev = &ofdev->dev; |
2408 | struct device_node *np = ofdev->dev.of_node; | 2408 | struct device_node *np = ofdev->dev.of_node; |
@@ -2579,7 +2579,7 @@ static const struct of_device_id talitos_match[] = { | |||
2579 | }; | 2579 | }; |
2580 | MODULE_DEVICE_TABLE(of, talitos_match); | 2580 | MODULE_DEVICE_TABLE(of, talitos_match); |
2581 | 2581 | ||
2582 | static struct of_platform_driver talitos_driver = { | 2582 | static struct platform_driver talitos_driver = { |
2583 | .driver = { | 2583 | .driver = { |
2584 | .name = "talitos", | 2584 | .name = "talitos", |
2585 | .owner = THIS_MODULE, | 2585 | .owner = THIS_MODULE, |
@@ -2591,13 +2591,13 @@ static struct of_platform_driver talitos_driver = { | |||
2591 | 2591 | ||
2592 | static int __init talitos_init(void) | 2592 | static int __init talitos_init(void) |
2593 | { | 2593 | { |
2594 | return of_register_platform_driver(&talitos_driver); | 2594 | return platform_driver_register(&talitos_driver); |
2595 | } | 2595 | } |
2596 | module_init(talitos_init); | 2596 | module_init(talitos_init); |
2597 | 2597 | ||
2598 | static void __exit talitos_exit(void) | 2598 | static void __exit talitos_exit(void) |
2599 | { | 2599 | { |
2600 | of_unregister_platform_driver(&talitos_driver); | 2600 | platform_driver_unregister(&talitos_driver); |
2601 | } | 2601 | } |
2602 | module_exit(talitos_exit); | 2602 | module_exit(talitos_exit); |
2603 | 2603 | ||