aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe.montjoie@gmail.com>2019-11-17 17:07:45 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2019-11-22 18:48:38 +0800
commit93c7f4d357de68f1e3a998b2fc775466d75c4c07 (patch)
tree10daa601278d72a11919ed494a9c7aa59cf8cdcf /drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
parentcrypto: mips/chacha - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER (diff)
downloadlinux-dev-93c7f4d357de68f1e3a998b2fc775466d75c4c07.tar.xz
linux-dev-93c7f4d357de68f1e3a998b2fc775466d75c4c07.zip
crypto: sun8i-ce - enable working on big endian
On big endian kernel, the sun8i-ce crypto driver does not works. This patch do the necessary modification to permit it to work on BE kernel (setting descriptor entries as __le32 and adding some cpu_to_le32) Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
index c6ddad3393ed..43db49ceafe4 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h
@@ -103,8 +103,8 @@ struct ce_variant {
};
struct sginfo {
- u32 addr;
- u32 len;
+ __le32 addr;
+ __le32 len;
} __packed;
/*
@@ -112,18 +112,18 @@ struct sginfo {
* The structure of this descriptor could be found in the datasheet
*/
struct ce_task {
- u32 t_id;
- u32 t_common_ctl;
- u32 t_sym_ctl;
- u32 t_asym_ctl;
- u32 t_key;
- u32 t_iv;
- u32 t_ctr;
- u32 t_dlen;
+ __le32 t_id;
+ __le32 t_common_ctl;
+ __le32 t_sym_ctl;
+ __le32 t_asym_ctl;
+ __le32 t_key;
+ __le32 t_iv;
+ __le32 t_ctr;
+ __le32 t_dlen;
struct sginfo t_src[MAX_SG];
struct sginfo t_dst[MAX_SG];
- u32 next;
- u32 reserved[3];
+ __le32 next;
+ __le32 reserved[3];
} __packed __aligned(8);
/*