Skip to contentSkip to conversation

AMCC Crypto4xx Device Driver v6

PATCH In review James Hsiao 2 participants 5 messages Jan 28, 2009 – Feb 5, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AMCC Crypto4xx Device Driver v6

This patch adds support for AMCC ppc4xx security device driver. This is the initial release that includes the driver framework with AES and SHA1 algorithms support.
The remaining algorithms will be released in the near future.

---
 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
index 8b5ba82..4447def 100644
@@ -127,6 +127,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
index dececc4..272b87f 100644
@@ -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
index e522144..9ecc2e4 100644
@@ -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
index 73557b2..9bf4a2b 100644
@@ -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
new file mode 100644
index 0000000..aa376e8
@@ -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

maintainer
#1 lore raw
Quoted 6 lines · James Hsiao

This patch adds support for AMCC ppc4xx security device driver. This is the initial release that includes the driver framework with AES and SHA1 algorithms support.
The remaining algorithms will be released in the near future.

Patch applied. Thanks James!

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
#2 lore raw

Hi Herbert,

Thanks for apply the patch.
Somehow the new directory driver/crypto/amcc is missing from the tree. I can see everything else in the tree except the driver source code. Do you want me to submit a new patch, or you can fix it with the V6 patch.

Thanks
James

Quoted 9 lines · Herbert Xu
Quoted 6 lines · James Hsiao

This patch adds support for AMCC ppc4xx security device driver. This is the initial release that includes the driver framework with AES and SHA1 algorithms support.
The remaining algorithms will be released in the near future.

Patch applied. Thanks James!

maintainer
#3 lore raw
Quoted 6 lines · James Hsiao

Thanks for apply the patch.
Somehow the new directory driver/crypto/amcc is missing from the tree. I can see everything else in the tree except the driver source code. Do you want me to submit a new patch, or you can fix it with the V6 patch.

I'll fix it up.

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
#4 lore raw

Thanks allot!
James

Quoted 11 lines · Herbert Xu
Quoted 6 lines · James Hsiao

Thanks for apply the patch.
Somehow the new directory driver/crypto/amcc is missing from the tree. I can see everything else in the tree except the driver source code. Do you want me to submit a new patch, or you can fix it with the V6 patch.

I'll fix it up.

Thanks,