diff options
author | Victoria Milhoan <vicki.milhoan@freescale.com> | 2015-08-05 18:28:35 (GMT) |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-08-10 15:18:55 (GMT) |
commit | e7472422392461f59bc5d7ddd8542c6a48740336 (patch) | |
tree | 778c4747bed011ecd99592dc5068cd8b20673a4f /drivers/crypto/caam/caamrng.c | |
parent | bf20d772174bbb6b1a7c0b34f04f51caebe2d6aa (diff) | |
download | linux-e7472422392461f59bc5d7ddd8542c6a48740336.tar.xz |
crypto: caam - Add cache coherency support
Freescale i.MX6 ARM platforms do not support hardware cache coherency.
This patch adds cache coherency support to the CAAM driver.
Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com>
Tested-by: Horia Geantă <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/caamrng.c')
-rw-r--r-- | drivers/crypto/caam/caamrng.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c index 5095337..a1d21d5 100644 --- a/drivers/crypto/caam/caamrng.c +++ b/drivers/crypto/caam/caamrng.c @@ -108,6 +108,10 @@ static void rng_done(struct device *jrdev, u32 *desc, u32 err, void *context) atomic_set(&bd->empty, BUF_NOT_EMPTY); complete(&bd->filled); + + /* Buffer refilled, invalidate cache */ + dma_sync_single_for_cpu(jrdev, bd->addr, RN_BUF_SIZE, DMA_FROM_DEVICE); + #ifdef DEBUG print_hex_dump(KERN_ERR, "rng refreshed buf@: ", DUMP_PREFIX_ADDRESS, 16, 4, bd->buf, RN_BUF_SIZE, 1); |