Esempio n. 1
0
File: mct.c Progetto: haposan/seL4
/**
   DONT_TRANSLATE
 */
BOOT_CODE void
initTimer(void)
{
    /* Clear write status */
    mct->global.wstat = mct->global.wstat;
    mct->global.cnt_wstat = mct->global.cnt_wstat;

    /* enable the timer */
    mct->global.tcon = GTCON_EN;
    while (mct->global.wstat != GWSTAT_TCON);
    mct->global.wstat = GWSTAT_TCON;

    /* Setup compare register to trigger in about 10000 years from now */
    MCRR(CNTV_CVAL, 0xffffffffffffffff);

    /* Reset the count down timer */
    resetTimer();
}
Esempio n. 2
0
File: hardware.c Progetto: aoom/seL4
/**
   DONT_TRANSLATE
 */
BOOT_CODE void
initTimer(void)
{
    MCRR(CNTV_CVAL, 0xffffffffffffffff);
    resetTimer();
}