diff options
author | Raj Rajasekaran <b10872@freescale.com> | 2009-08-19 17:28:32 -0500 |
---|---|---|
committer | Justin Waters <justin.waters@timesys.com> | 2009-10-13 11:05:23 -0400 |
commit | bb15969be7389887c5cd706748bf7fada444b832 (patch) | |
tree | cd7fda2aff4669c69f993b68a9a6e792c11dffc5 | |
parent | 83ad0b377c00fa5ea104f33aff45783f976cefbf (diff) |
ENGR00112764 MX23: DCP crytpo test DCP-AES fail. 100%.
Changed AES config option to be built-into the kernel.
stmp3xxx_dcp_probe() - Moved Algorithm registration below
platform driver data setting and interrupt request calls.
So that algorithms are registered after the platform data is
set. This is done to make it work with latest linux crypto
API changes.
Signed-off-by: Raj Rajasekaran <b10872@freescale.com>
-rw-r--r-- | arch/arm/configs/imx233_defconfig | 2 | ||||
-rw-r--r-- | drivers/crypto/stmp3xxx_dcp.c | 52 |
2 files changed, 27 insertions, 27 deletions
diff --git a/arch/arm/configs/imx233_defconfig b/arch/arm/configs/imx233_defconfig index e96ed5a7285f..3f53401cb47f 100644 --- a/arch/arm/configs/imx233_defconfig +++ b/arch/arm/configs/imx233_defconfig @@ -1632,7 +1632,7 @@ CONFIG_CRYPTO_SHA1=m # # Ciphers # -CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_AES=Y # CONFIG_CRYPTO_ANUBIS is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_BLOWFISH is not set diff --git a/drivers/crypto/stmp3xxx_dcp.c b/drivers/crypto/stmp3xxx_dcp.c index 654dc5bff08c..ff02ec807ec0 100644 --- a/drivers/crypto/stmp3xxx_dcp.c +++ b/drivers/crypto/stmp3xxx_dcp.c @@ -1225,32 +1225,6 @@ static int stmp3xxx_dcp_probe(struct platform_device *pdev) init_completion(&sdcp->op_wait[i]); } - ret = crypto_register_alg(&dcp_aes_alg); - if (ret != 0) { - dev_err(&pdev->dev, "Failed to register aes crypto\n"); - goto err_kfree; - } - - ret = crypto_register_alg(&dcp_aes_ecb_alg); - if (ret != 0) { - dev_err(&pdev->dev, "Failed to register aes ecb crypto\n"); - goto err_unregister_aes; - } - - ret = crypto_register_alg(&dcp_aes_cbc_alg); - if (ret != 0) { - dev_err(&pdev->dev, "Failed to register aes cbc crypto\n"); - goto err_unregister_aes_ecb; - } - -#ifndef DISABLE_SHA1 - ret = crypto_register_alg(&dcp_sha1_alg); - if (ret != 0) { - dev_err(&pdev->dev, "Failed to register aes cbc crypto\n"); - goto err_unregister_aes_cbc; - } -#endif - platform_set_drvdata(pdev, sdcp); /* Soft reset and remove the clock gate */ @@ -1310,6 +1284,32 @@ static int stmp3xxx_dcp_probe(struct platform_device *pdev) global_sdcp = sdcp; + ret = crypto_register_alg(&dcp_aes_alg); + if (ret != 0) { + dev_err(&pdev->dev, "Failed to register aes crypto\n"); + goto err_kfree; + } + + ret = crypto_register_alg(&dcp_aes_ecb_alg); + if (ret != 0) { + dev_err(&pdev->dev, "Failed to register aes ecb crypto\n"); + goto err_unregister_aes; + } + + ret = crypto_register_alg(&dcp_aes_cbc_alg); + if (ret != 0) { + dev_err(&pdev->dev, "Failed to register aes cbc crypto\n"); + goto err_unregister_aes_ecb; + } + +#ifndef DISABLE_SHA1 + ret = crypto_register_alg(&dcp_sha1_alg); + if (ret != 0) { + dev_err(&pdev->dev, "Failed to register aes cbc crypto\n"); + goto err_unregister_aes_cbc; + } +#endif + dev_notice(&pdev->dev, "DCP crypto enabled.!\n"); return 0; |