dp: Check for ARM first for usleep.

Zynq systems may have both MicroBlaze and ARM. If this is the case, assume that
the application is running on an ARM processor.

Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
Andrei-Liviu Simion 2015-01-21 10:25:48 -08:00 committed by Nava kishore Manne
parent aa72195688
commit 4d686c08e0
2 changed files with 8 additions and 8 deletions

View file

@ -457,7 +457,10 @@ void XDprx_WaitUs(XDprx *InstancePtr, u32 MicroSeconds)
return;
}
#if defined(__MICROBLAZE__)
#if defined(__arm__)
/* Wait the requested amount of time. */
usleep(MicroSeconds);
#elif defined(__MICROBLAZE__)
if (InstancePtr->UserTimerWaitUs != NULL) {
/* Use the timer handler specified by the user for better
* accuracy. */
@ -468,9 +471,6 @@ void XDprx_WaitUs(XDprx *InstancePtr, u32 MicroSeconds)
u32 MilliSeconds = (MicroSeconds + 999) / 1000;
MB_Sleep(MilliSeconds);
}
#elif defined(__arm__)
/* Wait the requested amount of time. */
usleep(MicroSeconds);
#endif
}

View file

@ -1387,7 +1387,10 @@ void XDptx_WaitUs(XDptx *InstancePtr, u32 MicroSeconds)
return;
}
#if defined(__MICROBLAZE__)
#if defined(__arm__)
/* Wait the requested amount of time. */
usleep(MicroSeconds);
#elif defined(__MICROBLAZE__)
if (InstancePtr->UserTimerWaitUs != NULL) {
/* Use the timer handler specified by the user for better
* accuracy. */
@ -1398,9 +1401,6 @@ void XDptx_WaitUs(XDptx *InstancePtr, u32 MicroSeconds)
u32 MilliSeconds = (MicroSeconds + 999) / 1000;
MB_Sleep(MilliSeconds);
}
#elif defined(__arm__)
/* Wait the requested amount of time. */
usleep(MicroSeconds);
#endif
}