<div class="gmail_quote"><div>Hi Sascha,</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">&gt; +     local_irq_disable();<br>
&gt; +     do_gettimeofday(&amp;before);<br>
&gt; +<br>
&gt; +     plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) &amp;<br>
&gt; +         ~(MXC_CORTEXA8_PLAT_LPC_DSM);<br>
<br>
</div></div>One thing that strikes me here is the fact that this code can probably<br>
run on i.MX53 aswell, right? It&#39;s only that these registers have<br>
different addresses on i.MX53. The MXC_ prefix is therefore not a good<br>
idea. Switching this to MX51_ and having an additional MX53_ register<br>
leads to code duplication. This shows that it&#39;s a bad idea to code<br>
fixed addresses in the code. We should go for base + offset instead<br>
so that this code will have a better start on i.MX53. This of course<br>
needs changes in the current crm_regs.h and probably in the i.MX51/53<br>
clock code.<br>
<div><div></div><div class="h5"></div></div></blockquote><div>Yes, for mx53, it is similar.</div><div>But for the case you are talking about, is it easier that we keep MXC_ prefix in this file and define MXC_ to MX51 or MX53 in crm_regs.h according to which board is running? </div>
<div>In addition, registers for this code are not in one section, which means many BASEx + offset there, if I understand right. Do you have a sample for &#39;base + offset&#39; case? since mx53 just came in, I am not sure about such case.</div>
<div><br></div><div>yong</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5"> </div></div></blockquote></div>