summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/arm/conf/ARMADA38X5
-rw-r--r--sys/boot/fdt/dts/arm/armada-388-gp.dts7
-rw-r--r--sys/boot/fdt/dts/arm/armada-38x.dtsi31
-rw-r--r--sys/dev/cesa/cesa.c3
4 files changed, 45 insertions, 1 deletions
diff --git a/sys/arm/conf/ARMADA38X b/sys/arm/conf/ARMADA38X
index 1903e62..519127b 100644
--- a/sys/arm/conf/ARMADA38X
+++ b/sys/arm/conf/ARMADA38X
@@ -81,6 +81,11 @@ device iic
device iicbus
device twsi
+# CESA
+device cesa
+device crypto
+device cryptodev
+
#FDT
options FDT
options FDT_DTB_STATIC
diff --git a/sys/boot/fdt/dts/arm/armada-388-gp.dts b/sys/boot/fdt/dts/arm/armada-388-gp.dts
index 1d03ced..44ff1cc 100644
--- a/sys/boot/fdt/dts/arm/armada-388-gp.dts
+++ b/sys/boot/fdt/dts/arm/armada-388-gp.dts
@@ -62,6 +62,13 @@
ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>;
internal-regs {
+ crypto@90000 {
+ status = "okay";
+ };
+ crypto@92000 {
+ status = "okay";
+ };
+
spi@10600 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
diff --git a/sys/boot/fdt/dts/arm/armada-38x.dtsi b/sys/boot/fdt/dts/arm/armada-38x.dtsi
index d93dab2..736d41a 100644
--- a/sys/boot/fdt/dts/arm/armada-38x.dtsi
+++ b/sys/boot/fdt/dts/arm/armada-38x.dtsi
@@ -63,6 +63,8 @@
gpio1 = &gpio1;
serial0 = &uart0;
serial1 = &uart1;
+ sram0 = &SRAM0;
+ sram1 = &SRAM1;
};
pmu {
@@ -70,6 +72,16 @@
interrupts-extended = <&mpic 3>;
};
+ SRAM0: sram@f1100000 {
+ compatible = "mrvl,cesa-sram";
+ reg = <0xf1100000 0x0010000>;
+ };
+
+ SRAM1: sram@f1110000 {
+ compatible = "mrvl,cesa-sram";
+ reg = <0xf1110000 0x0010000>;
+ };
+
soc {
compatible = "marvell,armada380-mbus", "simple-bus";
#address-cells = <2>;
@@ -140,6 +152,25 @@
#size-cells = <1>;
ranges = <0 MBUS_ID(0xf0, 0x01) 0 0x100000>;
+ crypto@90000 {
+ compatible = "mrvl,cesa";
+ reg = <0x90000 0x10000>;
+ interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&gic>;
+ sram-handle = <&SRAM0>;
+ status = "disabled";
+ };
+
+ crypto@92000 {
+ compatible = "mrvl,cesa";
+ reg = <0x92000 0x1000 /* tdma base reg chan 1 */
+ 0x9F000 0x1000>; /* cesa base reg chan 1 */
+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-parent = <&gic>;
+ sram-handle = <&SRAM1>;
+ status = "disabled";
+ };
+
L2: cache-controller@8000 {
compatible = "arm,pl310-cache";
reg = <0x8000 0x1000>;
diff --git a/sys/dev/cesa/cesa.c b/sys/dev/cesa/cesa.c
index ea35ae7..ec5a973 100644
--- a/sys/dev/cesa/cesa.c
+++ b/sys/dev/cesa/cesa.c
@@ -1043,6 +1043,7 @@ cesa_attach(device_t dev)
switch (d) {
case MV_DEV_88F6281:
case MV_DEV_88F6282:
+ case MV_DEV_88F6828:
sc->sc_tperr = 0;
break;
case MV_DEV_MV78100:
@@ -1214,7 +1215,7 @@ cesa_attach(device_t dev)
/* Register in OCF */
sc->sc_cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE);
- if (sc->sc_cid) {
+ if (sc->sc_cid < 0) {
device_printf(dev, "could not get crypto driver id\n");
goto err8;
}
OpenPOWER on IntegriCloud