AMCC Crypto4xx Device Driver v5
Subsystems (3)
PATCH 1/1 AMCC Crypto4xx Device Driver v5
This is the 5th submission of AMCC's security driver.
- remove aad support in build pd function, since we didn't release any algorithm that use aead yet.
- changed some hardcode value to #defines
- changed local_irq_disable/enable to spinlock_irq_save/restore
- fixed bug in crypto4xx_probe on error exit.
--- arch/powerpc/boot/dts/canyonlands.dts | 7 + arch/powerpc/boot/dts/kilauea.dts | 7 + drivers/crypto/Kconfig | 9 + drivers/crypto/Makefile | 1 + drivers/crypto/amcc/Makefile | 2 + drivers/crypto/amcc/crypto4xx_alg.c | 293 +++++++ drivers/crypto/amcc/crypto4xx_core.c | 1310 +++++++++++++++++++++++++++++++ drivers/crypto/amcc/crypto4xx_core.h | 177 +++++ drivers/crypto/amcc/crypto4xx_reg_def.h | 284 +++++++ drivers/crypto/amcc/crypto4xx_sa.c | 108 +++ drivers/crypto/amcc/crypto4xx_sa.h | 243 ++++++ 11 files changed, 2441 insertions(+), 0 deletions(-) create mode 100644 drivers/crypto/amcc/Makefile create mode 100644 drivers/crypto/amcc/crypto4xx_alg.c create mode 100644 drivers/crypto/amcc/crypto4xx_core.c create mode 100644 drivers/crypto/amcc/crypto4xx_core.h create mode 100644 drivers/crypto/amcc/crypto4xx_reg_def.h create mode 100644 drivers/crypto/amcc/crypto4xx_sa.c create mode 100644 drivers/crypto/amcc/crypto4xx_sa.h
arch/powerpc/boot/dts/canyonlands.dts +7 -0
@@ -116,6 +116,13 @@ dcr-reg = <0x010 0x002>; }; + CRYPTO: crypto@180000 { + compatible = "amcc,ppc460ex-crypto", "amcc,ppc4xx-crypto"; + reg = <4 0x00180000 0x80400>; + interrupt-parent = <&UIC0>; + interrupts = <0x1d 0x4>; + }; + MAL0: mcmal { compatible = "ibm,mcmal-460ex", "ibm,mcmal2"; dcr-reg = <0x180 0x062>;
arch/powerpc/boot/dts/kilauea.dts +7 -0
@@ -94,6 +94,13 @@ dcr-reg = <0x010 0x002>; }; + CRYPTO: crypto@ef700000 { + compatible = "amcc,ppc405ex-crypto", "amcc,ppc4xx-crypto"; + reg = <0xef700000 0x80400>; + interrupt-parent = <&UIC0>; + interrupts = <0x17 0x2>; + }; + MAL0: mcmal { compatible = "ibm,mcmal-405ex", "ibm,mcmal2"; dcr-reg = <0x180 0x062>;
drivers/crypto/Kconfig +9 -0
@@ -200,4 +200,13 @@ config CRYPTO_DEV_IXP4XX help Driver for the IXP4xx NPE crypto engine. +config CRYPTO_DEV_PPC4XX + tristate "Driver AMCC PPC4xx crypto accelerator" + depends on PPC && 4xx + select CRYPTO_HASH + select CRYPTO_ALGAPI + select CRYPTO_BLKCIPHER + help + This option allows you to have support for AMCC crypto acceleration. + endif # CRYPTO_HW
drivers/crypto/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o obj-$(CONFIG_CRYPTO_DEV_HIFN_795X) += hifn_795x.o obj-$(CONFIG_CRYPTO_DEV_TALITOS) += talitos.o obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o +obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += amcc/
drivers/crypto/amcc/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += crypto4xx.o +crypto4xx-objs := crypto4xx_core.o crypto4xx_alg.o crypto4xx_sa.o
drivers/crypto/amcc/crypto4xx_alg.c new file +293 -0
293 lines not on this page · raw message
drivers/crypto/amcc/crypto4xx_core.c new file +1310 -0
1,310 lines not on this page · raw message
drivers/crypto/amcc/crypto4xx_core.h new file +177 -0
177 lines not on this page · raw message
drivers/crypto/amcc/crypto4xx_reg_def.h new file +284 -0
284 lines not on this page · raw message
drivers/crypto/amcc/crypto4xx_sa.c new file +108 -0
108 lines not on this page · raw message
drivers/crypto/amcc/crypto4xx_sa.h new file +243 -0
243 lines not on this page · raw message
Herbert Xu
maintainerQuoted 4 lines · James Hsiao
This is the 5th submission of AMCC's security driver.
- remove aad support in build pd function, since we didn't release any algorithm that use aead yet.
Quoted 8 lines
- changed some hardcode value to #defines
- changed local_irq_disable/enable to spinlock_irq_save/restore
- fixed bug in
crypto4xx_probeon error exit.Signed-off-by James Hsiao <[email protected]>
I was going to apply this but you didn't give me a changelog that I can throw into the tree without feeling guilty!
Please always attach a proper changelog with each submission so I don't have to do this. You can put the changelog elsewhere in the email.
Thanks,
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.txtHi Herbert,
I will re submit the patch with proper changelog.
I had the change log this way is for the reviewer easy to see the difference. But, I agree this is not proper for a newly created driver.
Thanks
James
Quoted 22 lines · Herbert Xu
Quoted 4 lines · James Hsiao
This is the 5th submission of AMCC's security driver.
- remove aad support in build pd function, since we didn't release any algorithm that use aead yet.Quoted 8 lines
- changed some hardcode value to #defines
- changed local_irq_disable/enable to spinlock_irq_save/restore
- fixed bug in
crypto4xx_probeon error exit.Signed-off-by James Hsiao <[email protected]>I was going to apply this but you didn't give me a changelog that I can throw into the tree without feeling guilty!
Please always attach a proper changelog with each submission so I don't have to do this. You can put the changelog elsewhere in the email.
Thanks,
Herbert Xu
maintainerQuoted 4 lines · James Hsiao
I will re submit the patch with proper changelog.
I had the change log this way is for the reviewer easy to see the difference. But, I agree this is not proper for a newly created driver.
Oh yeah I have nothing against the changelog you had but it should be present along with the patch description so it can actually be applied.
Thanks,
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