From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dV9SH-0000YU-GD for barebox@lists.infradead.org; Wed, 12 Jul 2017 04:40:55 +0000 From: Oleksij Rempel Date: Wed, 12 Jul 2017 06:40:27 +0200 Message-Id: <20170712044028.9309-1-o.rempel@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v1] crypto: caam: use dma_alloc_coherent instead of dma_alloc To: barebox@lists.infradead.org, l.stach@pengutronix.de Cc: Oleksij Rempel It is a fixup for following patch: | commit ef4144b4ab6301d7417af3eb4d79cfc66bf0e731 | Date: Wed Mar 22 10:14:37 2017 +0100 | | crypto: caam - fix RNG buffer cache alignment Signed-off-by: Oleksij Rempel --- drivers/crypto/caam/caamrng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c index 31a92731d2..51c267e3d3 100644 --- a/drivers/crypto/caam/caamrng.c +++ b/drivers/crypto/caam/caamrng.c @@ -203,8 +203,6 @@ static inline int rng_create_job_desc(struct caam_rng_ctx *ctx, int buf_id) init_job_desc_shared(desc, ctx->sh_desc_dma, sh_len, HDR_SHARE_DEFER | HDR_REVERSE); - bd->addr = (dma_addr_t)bd->buf; - append_seq_out_ptr_intlen(desc, bd->addr, RN_BUF_SIZE, 0); #ifdef DEBUG print_hex_dump(KERN_ERR, "rng job desc@: ", DUMP_PREFIX_OFFSET, 16, 4, @@ -218,7 +216,7 @@ static int caam_init_buf(struct caam_rng_ctx *ctx, int buf_id) struct buf_data *bd = &ctx->bufs[buf_id]; int err; - bd->buf = dma_alloc(RN_BUF_SIZE); + bd->buf = dma_alloc_coherent(RN_BUF_SIZE, &bd->addr); err = rng_create_job_desc(ctx, buf_id); if (err) -- 2.11.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox