crypto: inside-secure - Add support for HW with less ring AIC's than rings
authorPascal van Leeuwen <pascalvanl@gmail.com>
Wed, 18 Sep 2019 06:42:40 +0000 (08:42 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 4 Oct 2019 15:06:17 +0000 (01:06 +1000)
commit946a4a2a49195e2d45c71fcb0d887fc1b3fad567
treea476296f32b908ab1da21c7bd39a1a3471fd5e01
parent84ca4e54ab792b550b802950639ab31c57ebe989
crypto: inside-secure - Add support for HW with less ring AIC's than rings

The current driver assumes one dedicated ring interrupt controller per
ring. However, some existing EIP(1)97 HW has less ring AIC's than rings.
This patch allows the driver to work with such HW by detecting how many
ring AIC's are present and restricting the number of rings it *uses* by
the number of ring AIC's present. This allows it to at least function.
(optimization for the future: add ring dispatch functionality in the
interrupt service routine such that multiple rings can be supported from
one ring AIC, allowing all rings to be used)

Signed-off-by: Pascal van Leeuwen <pvanleeuwen@verimatrix.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/inside-secure/safexcel.c
drivers/crypto/inside-secure/safexcel.h