Commit Graph
8 Commits
Author SHA1 Message Date
Cristian Stoica 5be4d4c94b crypto: replace scatterwalk_sg_next with sg_next
Modify crypto drivers to use the generic SG helper since
both of them are equivalent and the one from crypto is redundant.

See also:
  468577abe3   reverted in
  b2ab4a57b0

Signed-off-by: Cristian Stoica <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
2015-01-26 11:34:22 +11:00
Asaf Vertz 42d2e780c6 crypto: omap-des - fix BUG_ON condition
dd->total is unsigned so it won't do any good to check for negative
value after subtracting instead of that we should check if the
subtracted value is bigger than him

This was partially found by using a static code analysis program
called cppcheck.

Signed-off-by: Asaf Vertz <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
2015-01-08 21:46:17 +11:00
Wolfram Sang 5573bc03c6 crypto: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <[email protected]>
2014-10-20 16:20:25 +02:00
Nishanth Menon f51f593b3e crypto: omap-des - handle error of pm_runtime_get_sync
pm_runtime_get_sync may not always succeed depending on SoC involved.
So handle the error appropriately ensuring usage_count is accurate in
case of failure.

Signed-off-by: Nishanth Menon <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Reported-by: Joachim Eastwood <[email protected]>
Tested-by: Joachim Eastwood <[email protected]>
Acked-by: Joel Fernandes <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
2014-04-16 20:40:19 +08:00
Jingoo Han 2496be2edd crypto: omap-des - use devm_ioremap_resource()
Use devm_ioremap_resource() because devm_request_and_ioremap() is
obsoleted by devm_ioremap_resource().

Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Joel Fernandes <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
2014-04-16 20:40:11 +08:00
Jingoo Han 26f25b2695 crypto: omap-des - make local functions static
Make omap_des_copy_needed(), omap_des_copy_sgs(), because these
functions are used only in this file.

Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Joel Fernandes <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
2014-03-10 20:13:40 +08:00
Jingoo Han e78f91932d crypto: omap-des - Use SIMPLE_DEV_PM_OPS macro
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler.

Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
2014-03-10 20:13:39 +08:00
Joel Fernandes e91aa9d50c crypto: omap-des - Add omap-des driver for OMAP4/AM43xx
Add omap-des driver with platform data for OMAP4/AM43xx. Support added for DES
ECB and CBC modes. Also add support for 3DES operation where 3 64-bit keys are
used to perform a DES encrypt-decrypt-encrypt (des3_ede) operation on a buffer.

Tests have been conducted with the CRYPTO test manager, and functionality is
verified at different page length alignments.

Signed-off-by: Joel Fernandes <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
2014-02-27 05:56:56 +08:00