summaryrefslogtreecommitdiff
path: root/drivers/crypto/dcp.c
AgeCommit message (Collapse)Author
2014-01-05crypto: mxs - Remove the old DCP driverMarek Vasut
Remove the old DCP driver as it had multiple severe issues. The driver will be replaced by a more robust implementation. Here is a short list of problems with this driver: 1) It only supports AES_CBC 2) The driver was apparently never ran behind anyone working with MXS. ie.: -> Restarting the DCP block is not done via mxs_reset_block() -> The DT name is not "fsl,dcp" or "fsl,mxs-dcp" as other MXS drivers 3) Introduces new ad-hoc IOCTLs 4) The IRQ handler can't use usual completion() in the driver because that'd trigger "scheduling while atomic" oops, yes? Signed-off-by: Marek Vasut <marex@denx.de> Cc: David S. Miller <davem@davemloft.net> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-10-07crypto: dcp - Check the return value from devm_ioremap_resource()Fabio Estevam
devm_ioremap_resource() may fail, so better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-09-24crypto: dcp - Fix the path for releasing the resourcesFabio Estevam
tasklet_kill() is not being called in probe and the remove function releases the resources in the wrong order. Fix these issues. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-09-24crypto: dcp - Use devm_request_irq()Fabio Estevam
Using Use devm_request_irq() can make the code smaller and simpler, as we do not need to call free_irq() in the probe error path and in the remove function. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-09-24crypto: dcp - Use devm_ioremap_resource()Fabio Estevam
Using devm_ioremap_resource() can make the code simpler and smaller. When devm_ioremap_resource() is used there is no need to explicitely check the error returned by platform_get_resource(). Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-06-05crypto: dcp - Staticize local symbolsSachin Kamat
These symbols are referenced only in this file and hence should be static. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Tested-by: Tobias Rauter <tobiasrauter@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-06-05crypto: dcp - Use NULL instead of 0Sachin Kamat
Use NULL instead of 0 for pointer variables. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Tested-by: Tobias Rauter <tobiasrauter@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-06-05crypto: dcp - Use devm_* APIsSachin Kamat
devm_* APIs are device managed and make cleanup and exit code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Tested-by: Tobias Rauter <tobiasrauter@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-06-05crypto: dcp - Remove redundant platform_set_drvdata()Sachin Kamat
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Tested-by: Tobias Rauter <tobiasrauter@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2013-05-28crypto: dcp - Added support for Freescale's DCP co-processorTobias Rauter
This patch enables the DCP crypto functionality on imx28. Currently, only aes-128-cbc is supported. Moreover, the dcpboot misc-device, which is used by Freescale's SDK tools and uses a non-software-readable OTP-key, is added. Changes of v2: - ring buffer for hardware-descriptors - use of ablkcipher walk - OTP key encryption/decryption via misc-device (compatible to Freescale-SDK) - overall cleanup The DCP is also capable of sha1/sha256 but I won't be able to add that anytime soon. Tested with built-in runtime-self-test, tcrypt and openssl via cryptodev 1.6 on imx28-evk and a custom built imx28-board. Signed-off-by: Tobias Rauter <tobias.rauter@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>