Skip to contentSkip to conversation

crypto: atmel: Add capability case for the 0x600 SHA and AES IP versions

PATCH In review Sergiu Moga 3 participants 3 messages Dec 7, 2022 – Dec 30, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: atmel: Add capability case for the 0x600 SHA and AES IP versions

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.

---
 drivers/crypto/atmel-aes.c | 1 +
 drivers/crypto/atmel-sha.c | 1 +
 2 files changed, 2 insertions(+)
drivers/crypto/atmel-aes.c +1 -0
index 886bf258544c..063394cfa874 100644
@@ -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;
drivers/crypto/atmel-sha.c +1 -0
index ca4b01926d1b..00be792e605c 100644
@@ -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;
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Sergiu Moga

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.

Thanks Sergiu, best regards,
Nicolas

Quoted 29 lines
---
  drivers/crypto/atmel-aes.c | 1 +
  drivers/crypto/atmel-sha.c | 1 +
  2 files changed, 2 insertions(+)
drivers/crypto/atmel-aes.c +1 -0
index 886bf258544c..063394cfa874 100644
@@ -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;
drivers/crypto/atmel-sha.c +1 -0
index ca4b01926d1b..00be792e605c 100644
@@ -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;
Signature · 7 lines
Nicolas Ferre


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer
#2 lore raw
In reply to Sergiu Moga
Quoted 7 lines · Sergiu Moga

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.

Quoted 5 lines
---
 drivers/crypto/atmel-aes.c | 1 +
 drivers/crypto/atmel-sha.c | 1 +
 2 files changed, 2 insertions(+)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt