]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: mv_cesa - use gen_pool to reserve the SRAM memory region
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Thu, 18 Jun 2015 13:46:18 +0000 (15:46 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 19 Jun 2015 14:18:02 +0000 (22:18 +0800)
commit0a573ea3c6884641f2d9c3b508f138fe9e99e2c4
treef59a15c9ae84ea0bdf05624a47bc399f0c543e03
parentbf083ea98de9e800db11780e4e32e4bc5a3050b3
crypto: mv_cesa - use gen_pool to reserve the SRAM memory region

The mv_cesa driver currently expects the SRAM memory region to be passed
as a platform device resource.

This approach implies two drawbacks:
- the DT representation is wrong
- the only one that can access the SRAM is the crypto engine

The last point is particularly annoying in some cases: for example on
armada 370, a small region of the crypto SRAM is used to implement the
cpuidle, which means you would not be able to enable both cpuidle and the
CESA driver.

To address that problem, we explicitly define the SRAM device in the DT
and then reference the sram node from the crypto engine node.

Also note that the old way of retrieving the SRAM memory region is still
supported, or in other words, backward compatibility is preserved.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Documentation/devicetree/bindings/crypto/mv_cesa.txt
drivers/crypto/Kconfig
drivers/crypto/mv_cesa.c