omap-sham: OMAP SHA1/MD5 driver
Subsystems (5)
v3 cover omap-sham: OMAP SHA1/MD5 driver
Changes to v2:
- Added multi omap kernel support based on comment
- some redundant vars removed
Dmitry Kasatkin (2):
crypto: updates omap sham device related platform code
crypto: omap-sham - omap sha1 & md5 driver
arch/arm/mach-omap2/clock2420_data.c | 2 +- arch/arm/mach-omap2/clock2430_data.c | 2 +- arch/arm/mach-omap2/clock3xxx_data.c | 2 +- arch/arm/mach-omap2/devices.c | 58 +- arch/arm/plat-omap/include/plat/omap34xx.h | 5 + drivers/crypto/Kconfig | 9 + drivers/crypto/Makefile | 2 + drivers/crypto/omap-sham.c | 1347 ++++++++++++++++++++++++++++ 8 files changed, 1414 insertions(+), 13 deletions(-) create mode 100644 drivers/crypto/omap-sham.c
PATCH v3 1/2 crypto: updates omap sham device related platform code
- registration with multi OMAP kernels support
- clocks
--- arch/arm/mach-omap2/clock2420_data.c | 2 +- arch/arm/mach-omap2/clock2430_data.c | 2 +- arch/arm/mach-omap2/clock3xxx_data.c | 2 +- arch/arm/mach-omap2/devices.c | 58 +++++++++++++++++++++++----- arch/arm/plat-omap/include/plat/omap34xx.h | 5 ++ 5 files changed, 56 insertions(+), 13 deletions(-)
arch/arm/mach-omap2/clock2420_data.c +1 -1
@@ -1836,7 +1836,7 @@ static struct omap_clk omap2420_clks[] = {CLK (NULL ,"vlynq_ick" , &vlynq_ick,CK_242X ),CLK (NULL ,"vlynq_fck" , &vlynq_fck,CK_242X ),CLK (NULL ,"des_ick" , &des_ick,CK_242X ), -CLK (NULL ,"sha_ick" , &sha_ick,CK_242X ), +CLK ("omap-sham" ,"ick" , &sha_ick,CK_242X ),CLK ("omap_rng" ,"ick" , &rng_ick,CK_242X ),CLK (NULL ,"aes_ick" , &aes_ick,CK_242X ), CLK(NULL, "pka_ick", &pka_ick, CK_242X),
arch/arm/mach-omap2/clock2430_data.c +1 -1
@@ -1924,7 +1924,7 @@ static struct omap_clk omap2430_clks[] = {CLK (NULL ,"sdma_ick" , &sdma_ick,CK_243X ),CLK (NULL ,"sdrc_ick" , &sdrc_ick,CK_243X ),CLK (NULL ,"des_ick" , &des_ick,CK_243X ), -CLK (NULL ,"sha_ick" , &sha_ick,CK_243X ), +CLK ("omap-sham" ,"ick" , &sha_ick,CK_243X ),CLK ("omap_rng" ,"ick" , &rng_ick,CK_243X ),CLK (NULL ,"aes_ick" , &aes_ick,CK_243X ), CLK(NULL, "pka_ick", &pka_ick, CK_243X),
arch/arm/mach-omap2/clock3xxx_data.c +1 -1
@@ -3360,7 +3360,7 @@ static struct omap_clk omap3xxx_clks[] = {CLK ("mmci-omap-hs.2" ,"ick" , &mmchs3_ick,CK_3430ES2 |CK_AM35XX ),CLK (NULL ,"icr_ick" , &icr_ick,CK_343X ),CLK (NULL ,"aes2_ick" , &aes2_ick,CK_343X ), -CLK (NULL ,"sha12_ick" , &sha12_ick,CK_343X ), +CLK ("omap-sham" ,"ick" , &sha12_ick,CK_343X ),CLK (NULL ,"des2_ick" , &des2_ick,CK_343X ),CLK ("mmci-omap-hs.1" ,"ick" , &mmchs2_ick,CK_3XXX ), CLK("mmci-omap-hs.0", "ick", &mmchs1_ick, CK_3XXX),
arch/arm/mach-omap2/devices.c +48 -10
89 lines not on this page · raw message
arch/arm/plat-omap/include/plat/omap34xx.h +5 -0
@@ -82,5 +82,10 @@#define OMAP34XX_MAILBOX_BASE (L4_34XX_BASE + 0x94000) +/* Security */ +#define OMAP34XX_SEC_BASE (L4_34XX_BASE + 0xA0000) +#define OMAP34XX_SEC_SHA1MD5_BASE (OMAP34XX_SEC_BASE + 0x23000) +#define OMAP34XX_SEC_AES_BASE (OMAP34XX_SEC_BASE + 0x25000) +#endif /* __ASM_ARCH_OMAP3_H */
Signature · 1 line
1.6.3.3
PATCH v3 2/2 crypto: omap-sham - omap sha1 & md5 driver
In reply to Dmitry KasatkinEarlier kernel contained omap sha1 and md5 driver, which was not maintained, was not ported to new crypto APIs and removed from the source tree.
- implements async and sync crypto API using dma and cpu.
- supports multiple sham instances if available
--- drivers/crypto/Kconfig | 9 + drivers/crypto/Makefile | 2 + drivers/crypto/omap-sham.c | 1347 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1358 insertions(+), 0 deletions(-) create mode 100644 drivers/crypto/omap-sham.c
drivers/crypto/Kconfig +9 -0
@@ -222,4 +222,13 @@ config CRYPTO_DEV_PPC4XX help This option allows you to have support for AMCC crypto acceleration. +config CRYPTO_DEV_OMAP_SHAM + tristate "Support for OMAP SHA1/MD5 hw accelerator" + depends on ARCH_OMAP2 || ARCH_OMAP3 + select CRYPTO_SHA1 + select CRYPTO_MD5 + help + OMAP processors have SHA1/MD5 hw accelerator. Select this if you + want to use the OMAP module for SHA1/MD5 algorithms. + endif # CRYPTO_HW
drivers/crypto/Makefile +2 -0
@@ -6,3 +6,5 @@ obj-$(CONFIG_CRYPTO_DEV_MV_CESA) += mv_cesa.o obj-$(CONFIG_CRYPTO_DEV_TALITOS) += talitos.o obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += amcc/ +obj-$(CONFIG_CRYPTO_DEV_OMAP_SHAM) += omap-sham.o +
drivers/crypto/omap-sham.c new file +1347 -0
1,347 lines not on this page · raw message
Signature · 1 line
1.6.3.3
Herbert Xu
maintainerRe: [PATCHv3 2/2] crypto: omap-sham - omap sha1 & md5 driver
Quoted 7 lines · Dmitry Kasatkin
Earlier kernel contained omap sha1 and md5 driver, which was not maintained, was not ported to new crypto APIs and removed from the source tree.
- implements async and sync crypto API using dma and cpu.
- supports multiple sham instances if availableSigned-off-by Dmitry Kasatkin <[email protected]>
You have not addressed my objections raised earlier.
Also, why are you exporting a shash object? You cannot sleep during shash operations (except for setkey).
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtRe: [PATCHv3 2/2] crypto: omap-sham - omap sha1 & md5 driver
Hi,
I am thinking to update to have:
- concurrent requests with queue.
- import/export problem
but it takes a time.
- Dmitry
Quoted 17 lines · ext Herbert Xu
Quoted 8 lines · Dmitry Kasatkin
Earlier kernel contained omap sha1 and md5 driver, which was not maintained, was not ported to new crypto APIs and removed from the source tree.
- implements async and sync crypto API using dma and cpu.
- supports multiple sham instances if availableSigned-off-by Dmitry Kasatkin<[email protected]>You have not addressed my objections raised earlier.
Also, why are you exporting a shash object? You cannot sleep during shash operations (except for setkey).
Cheers,
Re: [PATCHv3 2/2] crypto: omap-sham - omap sha1 & md5 driver
In reply to Herbert XuQuoted 8 lines · ext Herbert Xu
Quoted 6 lines · Dmitry Kasatkin
Earlier kernel contained omap sha1 and md5 driver, which was not maintained, was not ported to new crypto APIs and removed from the source tree.
- implements async and sync crypto API using dma and cpu.
- supports multiple sham instances if available
Quoted 8 lines
Quoted 2 lines
Signed-off-by Dmitry Kasatkin<[email protected]>You have not addressed my objections raised earlier.
Also, why are you exporting a shash object? You cannot sleep during shash operations (except for setkey).
what do you mean "exporting shash object"?
Providing shash alg?
I was not sure if it is needed if ahash is available.
Should I remove shash alg at all?
Quoted 2 lines
Cheers,
Herbert Xu
maintainerRe: [PATCHv3 2/2] crypto: omap-sham - omap sha1 & md5 driver
Quoted 8 lines · Dmitry Kasatkin
what do you mean "exporting shash object"?
Providing shash alg?
I was not sure if it is needed if ahash is available.
Should I remove shash alg at all?
In that case please remove the shash object. ahash by itself is enough.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt