<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 15, 2018 at 11:34 AM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 15/03/18 05:56, Udit agarwal wrote:<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+/* TRNG Register */<br>
+<br>
+/* RNG base address */<br>
</blockquote>
<br></span>
Is the module name TRNG or RNG?<span class=""><br></span></blockquote><div>It's TRNG. I'll correct this. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+#define RNG_BASE 0x48310000<br>
+/* RNG clock control */<br>
+#define CM_PER_RNG_CLKCTRL (AM335X_CM_PER_ADDR | (9 << 4))<br>
</blockquote>
<br></span>
This define is probably not for the TRNG register block. Should it move the corresponding register block?<span class=""><br></span></blockquote><div>This define is to enable clock for TRNG module by setting the bit in the main clock register. Should i place this define with other CM definitions? <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+/* rng module clock status bits */<br>
+#define AM335X_CLK_RNG_BIT_MASK (0x30000)<br>
+/* Offset from RNG base for output ready flag */<br>
+#define RNG_STATUS_RDY (1u << 0)<br>
+/* Offset from RNG base for FRO related error */<br>
+#define RNG_STATUS_ERR (1u << 1)<br>
+/* Offset from RNG base for clock status */<br>
+#define RNG_STATUS_CLK (1u << 31)<br>
</blockquote>
<br></span>
Are these offsets or bits?<span class="im HOEnZb"><br></span></blockquote><div>I should have probably marked them as mask bits.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="im HOEnZb">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+/* enable module */<br>
+#define AM335X_RNG_ENABLE (1 << 10)<br>
+<br>
</blockquote>
<br></span><div class="HOEnZb"><div class="h5">
-- <br>
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : <a href="tel:%2B49%2089%20189%2047%2041-16" value="+4989189474116" target="_blank">+49 89 189 47 41-16</a><br>
Fax : <a href="tel:%2B49%2089%20189%2047%2041-09" value="+4989189474109" target="_blank">+49 89 189 47 41-09</a><br>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brain<wbr>s.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br>
</div></div></blockquote></div><br></div></div>