crypto: atmel - Add capability case for the 0x600 SHA and AES IP versions
authorSergiu Moga <sergiu.moga@microchip.com>
Wed, 7 Dec 2022 13:59:55 +0000 (15:59 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Dec 2022 14:56:27 +0000 (22:56 +0800)
In order for the driver to be made aware of the capabilities of the SHA
and AES IP versions 0x600 , such as those present on the SAM9X60 SoC's,
add a corresponding switch case to the capability method of the respective
drivers. Without this, besides the capabilities not being correctly set,
the self tests may hang since the driver is endlessly waiting for a
completion to be set by a never occurring DMA interrupt handler.

Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-aes.c
drivers/crypto/atmel-sha.c

index 886bf258544c6d4aed91db938ea2a002b9b01012..063394cfa8742033bd31528ab4ac0b2142bbba78 100644 (file)
@@ -2510,6 +2510,7 @@ static void atmel_aes_get_cap(struct atmel_aes_dev *dd)
        /* keep only major version number */
        switch (dd->hw_version & 0xff0) {
        case 0x700:
+       case 0x600:
        case 0x500:
                dd->caps.has_dualbuff = 1;
                dd->caps.has_cfb64 = 1;
index ca4b01926d1b1fe4a99e9db0659c6280ed1b7d0f..00be792e605cd469fc3a482fc3d41f4fbca36eb6 100644 (file)
@@ -2509,6 +2509,7 @@ static void atmel_sha_get_cap(struct atmel_sha_dev *dd)
        /* keep only major version number */
        switch (dd->hw_version & 0xff0) {
        case 0x700:
+       case 0x600:
        case 0x510:
                dd->caps.has_dma = 1;
                dd->caps.has_dualbuff = 1;