baseport/syborg/specific/highrestimer.h
changeset 55 2c1e559d48bf
parent 2 d55eb581a87c
equal deleted inserted replaced
15:cc51249fbd9c 55:2c1e559d48bf
     8 *
     8 *
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
       
    13 * NTT Docomo, Inc : BUG 1296
    13 *
    14 *
    14 * Description:
    15 * Description:
    15 *
    16 *
    16 */
    17 */
    17 
    18 
    48  */
    49  */
    49 //#define GET_HIGH_RES_TICK_COUNT(Rd) asm("nop");
    50 //#define GET_HIGH_RES_TICK_COUNT(Rd) asm("nop");
    50 // Hi-jacking r10 for tmp, not good if Rd is R10 -- grepping the the kernel shows it's not (for now)
    51 // Hi-jacking r10 for tmp, not good if Rd is R10 -- grepping the the kernel shows it's not (for now)
    51 #define GET_HIGH_RES_TICK_COUNT(Rd)						         \
    52 #define GET_HIGH_RES_TICK_COUNT(Rd)						         \
    52   asm("push {r10}");										     \
    53   asm("push {r10}");										     \
    53   asm("mov r10, #2");										     \
    54   asm("mov r10, #1");										     \
    54   asm("ldr "#Rd", =%a0"               : : "i" (KHwBaseRtc + 4)); \
    55   asm("ldr "#Rd", =%a0"               : : "i" (KHwBaseRtc + 4)); \
    55   asm("str r10, ["#Rd", #%a0]"        : : "i" (0));			     \
    56   asm("str r10, ["#Rd", #%a0]"        : : "i" (0));			     \
    56   asm("pop {r10}");                                              \
    57   asm("pop {r10}");                                              \
    57   asm("ldr "#Rd", =%a0"               : : "i" (KHwBaseRtc + 8)); \
    58   asm("ldr "#Rd", =%a0"               : : "i" (KHwBaseRtc + 8)); \
    58   asm("ldr "#Rd", ["#Rd", #%a0]"      : : "i" (0));              
    59   asm("ldr "#Rd", ["#Rd", #%a0]"      : : "i" (0));