Allow use of FREESCALE hw RNG without a specific port

This commit is contained in:
Daniele Lacamera
2021-05-12 08:16:20 +02:00
parent 8a17e6c10e
commit 1dfde34852

View File

@ -1798,10 +1798,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
}
#endif /* WOLFSSL_PIC32MZ_RNG */
#elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX) || \
defined(FREESCALE_KSDK_BM) || defined(FREESCALE_FREE_RTOS)
#if defined(FREESCALE_K70_RNGA) || defined(FREESCALE_RNGA)
#elif defined(FREESCALE_K70_RNGA) || defined(FREESCALE_RNGA)
/*
* wc_Generates a RNG seed using the Random Number Generator Accelerator
* on the Kinetis K70. Documentation located in Chapter 37 of
@ -1880,6 +1877,9 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
}
#elif defined(FREESCALE_KSDK_2_0_TRNG)
#ifndef TRNG0
#define TRNG0 TRNG
#endif
int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
{
@ -1920,9 +1920,13 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
return 0;
}
#else
#elif defined(FREESCALE_MQX) || defined(FREESCALE_KSDK_MQX) || \
defined(FREESCALE_KSDK_BM) || defined(FREESCALE_FREE_RTOS)
/*
* Fallback to USE_TEST_GENSEED if a FREESCALE platform did not match any
* of the TRNG/RNGA/RNGB support
*/
#define USE_TEST_GENSEED
#endif /* FREESCALE_K70_RNGA */
#elif defined(WOLFSSL_SILABS_SE_ACCEL)
int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)