Commit 46632854 authored by schneider's avatar schneider

Merge branch 'schneider/trng-enable-fix' into 'master'

fix(trng): Enable TRNG before every read

See merge request card10/firmware!398
parents 357a3f0a e8abf592
...@@ -73,11 +73,6 @@ int hardware_early_init(void) ...@@ -73,11 +73,6 @@ int hardware_early_init(void)
*/ */
portexpander_init(); portexpander_init();
/*
* RNG
*/
TRNG_Init(NULL);
/* /*
* Buttons * Buttons
*/ */
......
...@@ -6,6 +6,7 @@ int epic_trng_read(uint8_t *dest, size_t size) ...@@ -6,6 +6,7 @@ int epic_trng_read(uint8_t *dest, size_t size)
if (dest == NULL) if (dest == NULL)
return -EFAULT; return -EFAULT;
TRNG_Init(NULL);
TRNG_Read(MXC_TRNG, dest, size); TRNG_Read(MXC_TRNG, dest, size);
return 0; return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment