-
Steve Cornelius authored
Early versions of this driver used a set of entropy generation parameters inherited from QorIQ devices. Those parameters were a hardcoded set based upon internally-suggested values, and worked well on QorIQ. However, for certain mx6 devices, oscillator values were found to be exceeding the upper limit, and so RNG instantiation was failing in those cases. This code improves initialization by (a) making sure the oscillator divider is set to a known value, and (b) converting the parameter selection to a symbolic compiler-generated form, instead of using embedded magic number constants. The calculation is now based on the definition of RNG4_ENT_CLOCKS_SAMPLE, which defaults to 1600 unless overridden by something. The lower limit is then set as /4, and the upper limit set to *8. Tested-by: Minnick Michael-B21710 <b21710@freescale.com> Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com> Signed-off-by: Jason Liu <r64343@freescale.com>
1f4aead4