I've a simple flash utility which is downlaoded via USB at bootup and I want to verify the flash timing delays between commands to make sure we are waiting long enough.
The code is unfortunately a loop in assembly. Yech!!
This code will run in internal memory. However I cant find references to instructions for the OMAP35x. Could someone tell me given a fixed clock frequency , how many clock cycles are executed for this loop.
Note this is single thread execution (based on x-loader) so it will run uninterupted to completion.
/*******************************************************
* Routine: delay
* Description: spinning delay to use before udelay works
******************************************************/
static inline void delay (unsigned long loops)
{
__asm__ volatile ("1:\n"
"subs %0, %0, #1\n"
"bne 1b":"=r" (loops):"0" (loops));
}