]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/crypto/fsl/fsl_hash.c
treewide: replace #include <asm-generic/errno.h> with <linux/errno.h>
[karo-tx-uboot.git] / drivers / crypto / fsl / fsl_hash.c
index c298404f2526a1a448f3cc4098b287ee49513506..a63eba389df89eb64e7060da08a22a5ed1228b81 100644 (file)
@@ -12,7 +12,7 @@
 #include "jr.h"
 #include "fsl_hash.h"
 #include <hw_sha.h>
-#include <asm-generic/errno.h>
+#include <linux/errno.h>
 
 #define CRYPTO_MAX_ALG_NAME    80
 #define SHA1_DIGEST_SIZE        20
@@ -84,7 +84,7 @@ static int caam_hash_update(void *hash_ctx, const void *buf,
                            enum caam_hash_algos caam_algo)
 {
        uint32_t final = 0;
-       dma_addr_t addr = virt_to_phys((void *)buf);
+       phys_addr_t addr = virt_to_phys((void *)buf);
        struct sha_ctx *ctx = hash_ctx;
 
        if (ctx->sg_num >= MAX_SG_32) {
@@ -93,11 +93,11 @@ static int caam_hash_update(void *hash_ctx, const void *buf,
        }
 
 #ifdef CONFIG_PHYS_64BIT
-       ctx->sg_tbl[ctx->sg_num].addr_hi = addr >> 32;
+       sec_out32(&ctx->sg_tbl[ctx->sg_num].addr_hi, (uint32_t)(addr >> 32));
 #else
-       ctx->sg_tbl[ctx->sg_num].addr_hi = 0x0;
+       sec_out32(&ctx->sg_tbl[ctx->sg_num].addr_hi, 0x0);
 #endif
-       ctx->sg_tbl[ctx->sg_num].addr_lo = addr;
+       sec_out32(&ctx->sg_tbl[ctx->sg_num].addr_lo, (uint32_t)addr);
 
        sec_out32(&ctx->sg_tbl[ctx->sg_num].len_flag,
                  (size & SG_ENTRY_LENGTH_MASK));