Mike,

>From: Mike Chan [mailto:m...@android.com]
>Sent: Thursday, June 18, 2009 1:42 PM
>
>
>+        /* Kick DLL state machine if lock not started */
>+kick_dll:
>+       ldr     r4, sdrc_dlla_ctrl      /* get dlla addr */
>+       ldr     r5, [r4]                /* grab value */
>+       mov     r6, r5                  /* save value */
>
>Richard, could this be done in one instruction, eliminating the need for the 
>r5 >temporary register? Or was this done intentionally?

Its on purpose I suppose, perhaps there is an optimization.

Above I want to make sure I restore the value I came in with for dlla_ctrl.  I 
save off value in r5 for this.

Below I clear and set dllidle bit.  I don't take the time to figure out if it 
was set or not coming into function.  I saved off value in r5 to allow for 
this.  It is legal for it to be set or cleared in normal operation.

The below set/clear needs to happen as 2 writes.  The 3rd write is a restore.  
You could be mindful of input value and perhaps not do a 3rd write but my guess 
is that will take more code then it saves.

>+       orr     r6, r6, #0x10           /* dllidle on */
>+       str     r6, [r4]
>+       dsb
>+       bic     r6, #0x10               /* dllidle off */
>+       str     r6, [r4]
>+       dsb
>+       str     r6, [r4]                /* restore old value */
>+       b wait_dll_lock_timed
>+

Regards,
Richard W.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to