Skip to content

Commit 01bda44

Browse files
committed
hw/drivers/hash_stm32: Enable for STM32H devices
Comment explicitly mentioned STM32F415 and STM32F417 devices that don't have support for SHA256. Now condition is reversed so those two are marked as not supported. This will enable STM32H7 devices as well as STM32H5. When device does not have supprt for hash HASH symbol will not be defined and build will fail, while right now build for STM32H7 works but hash functionality does not work. Signed-off-by: Jerzy Kasenberg <[email protected]>
1 parent 4df76c8 commit 01bda44

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

hw/drivers/hash/hash_stm32/src/hash_stm32.c

+3-6
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,10 @@ static struct os_mutex gmtx;
3030
* STM32F415xx and STM32F417xx have a HASH unit that only supports MD5/SHA1
3131
*/
3232

33-
#if defined(STM32F437xx) || defined(STM32F439xx) || defined(STM32F479xx) || \
34-
defined(STM32F756xx) || defined(STM32F777xx) || defined(STM32F779xx) || \
35-
defined(STM32L4A6xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || \
36-
defined(STM32L4S9xx)
37-
static uint32_t g_algos = HASH_ALGO_SHA224 | HASH_ALGO_SHA256;
38-
#else
33+
#if defined(STM32F415xx) || defined(STM32F417xx)
3934
static uint32_t g_algos = 0;
35+
#else
36+
static uint32_t g_algos = HASH_ALGO_SHA224 | HASH_ALGO_SHA256;
4037
#endif
4138

4239
static int

0 commit comments

Comments
 (0)