Ejemplo n.º 1
0
/*
 *  ======== IpcPower_idle ========
 */
Void IpcPower_idle()
{
    IpcPower_idleCount++;

    REG32(PDCCMD_REG) = SLEEP_MODE;
    REG32(PDCCMD_REG);

    /* Enable wakeup events */
    Wugen_enableEvent(GPT5_IRQ);
    Wugen_enableEvent(GPT6_IRQ);
    Wugen_enableEvent(MBX_DSP_IRQ);

    asm(" idle");
}
Ejemplo n.º 2
0
/*
 *  ======== IpcPower_suspendSwi ========
 */
static Void IpcPower_suspendSwi(UArg arg0, UArg arg1)
{
    /* Disable wakeup events */
    Wugen_disableEvent(GPT5_IRQ);
    Wugen_disableEvent(GPT6_IRQ);
    Wugen_disableEvent(MBX_DSP_IRQ);

    /* Invoke the BIOS suspend routine */
    Power_suspend(Power_Suspend_HIBERNATE);

    /* Re-enable wakeup events */
    Wugen_enableEvent(GPT5_IRQ);
    Wugen_enableEvent(GPT6_IRQ);
    Wugen_enableEvent(MBX_DSP_IRQ);
}
Ejemplo n.º 3
0
/*!
 *  ======== InterruptDsp_intRegister ======== 
 */
Void InterruptDsp_intRegister(UInt16 remoteProcId, IInterrupt_IntInfo *intInfo,
                              Fxn func, UArg arg)
{
    UInt        key;
    Int         index; 
    InterruptDsp_FxnTable *table;    
    Hwi_Params  hwiParams;    

    /* Ensure that our ID is set correctly */
    Assert_isTrue(InterruptDsp_dspProcId == MultiProc_self(),
            ti_sdo_ipc_Ipc_A_internal);    
    
    /* Ensure that remoteProcId is valid */
    Assert_isTrue(remoteProcId < ti_sdo_utils_MultiProc_numProcessors, 
            ti_sdo_ipc_Ipc_A_invArgument);
   
    /* Ensure that proper intVectorId has been supplied */
    Assert_isTrue(intInfo->intVectorId <= 15, ti_sdo_ipc_Ipc_A_internal);    
    
    if (remoteProcId == InterruptDsp_hostProcId) {
        index = 0;
    }
    else if (remoteProcId == InterruptDsp_core0ProcId) {
        index = 1;
    }
    else {
        /* DSP cannot talk to CORE1 */
        Assert_isTrue(FALSE, ti_sdo_ipc_Ipc_A_internal);
    }
    
    /* Disable global interrupts */
    key = Hwi_disable();

    table = &(InterruptDsp_module->fxnTable[index]); 
    table->func = func;
    table->arg  = arg;
    
    InterruptDsp_intClear(remoteProcId, intInfo);
    
    /* Make sure the interrupt only gets plugged once */
    InterruptDsp_module->numPlugged++;
    if (InterruptDsp_module->numPlugged == 1) {
        Hwi_Params_init(&hwiParams);
        hwiParams.eventId = DSPINT;
        Hwi_create(intInfo->intVectorId,
                   (Hwi_FuncPtr)InterruptDsp_intShmStub,
                   &hwiParams,
                   NULL);
        
        /* Enable the interrupt */
        Wugen_enableEvent(DSPINT);
        Hwi_enableInterrupt(intInfo->intVectorId);
    }
 
    /* Enable the mailbox interrupt to the DSP */
    InterruptDsp_intEnable(remoteProcId, intInfo);
    
    /* Restore global interrupts */
    Hwi_restore(key);
}
Ejemplo n.º 4
0
/*
 *  ======== TimerSupport_enable ========
 *  This function power enables the Timer that is being used by the CLK module.
 *  The physical address of the CONTROL_MSUSPENDMUX_1 (part of the
 *  System Control Module) is set in the TimerSupport.xs file.
 */
Void TimerSupport_enable(UInt timerId, Error_Block *eb)
{
    volatile UInt32 *control = TimerSupport_controlMsuspendMux1Addr;

    if (timerId == 3) {
        control[1] |= (TimerSupport_module->suspSrc[timerId]);
    }
    else {
        control[0] |= (TimerSupport_module->suspSrc[timerId] <<
                       (TIMER5_SUSPEND_BIT + (3 * timerId)));
    }

    Wugen_enableEvent(TIMER5_EVENTNUM + timerId);
}