Beispiel #1
0
wake_reason_t spm_let_the_dog_home(void)
{
    spm_wdt_restart();
    spm_write(SPM_PCM_SW_INT_CLEAR,0xf);
    spm_write(SPM_PCM_CON1, (spm_read(SPM_PCM_CON1) & ~CON1_PCM_WDT_EN) | CON1_CFG_KEY);
    spm_notice("spm_let_the_dog_home\n");
}
Beispiel #2
0
void spm_output_sleep_option(void)
{
    spm_notice("PWAKE_EN:%d, PCMWDT_EN:%d, BYPASS_SYSPWREQ:%d, "
               "CTRL_33VCORE:%d, CTRL_33VRF18:%d\n",
               SPM_PWAKE_EN, SPM_PCMWDT_EN, SPM_BYPASS_SYSPWREQ,
               SPM_CTRL_33VCORE, SPM_CTRL_33VRF18);
}
void spm_hot_plug_out_after(u32 target_core)
{
//#ifndef SPM_SODI_ONLY
    spm_notice("spm_hot_plug_out_after()........ target_core = 0x%x\n", target_core);    

    switch (target_core)
    {
        case 0 : spm_write(SPM_PCM_EVENT_VECTOR2, (spm_read(SPM_PCM_EVENT_VECTOR2) | SPM_PCM_HOTPLUG));  break;                     
        case 1 : spm_write(SPM_PCM_EVENT_VECTOR3, (spm_read(SPM_PCM_EVENT_VECTOR3) | SPM_PCM_HOTPLUG));  break;    
        default : break;
    }
//#endif
}
Beispiel #4
0
wake_reason_t spm_let_the_dog_out(void)
{
    unsigned long flags;
    static wake_reason_t last_wr = WR_NONE;
    
    spm_notice("spm_let_the_dog_out\n");

    //spin_lock_irqsave(&spm_lock, flags);
    
    if (spm_init_pcm(&pcm_config_wdt)==false)
      goto  ERROR;
    
    spm_kick_pcm(&pcm_config_wdt);
        
ERROR:
    //spin_unlock_irqrestore(&spm_lock, flags);

    return last_wr;
}
Beispiel #5
0
void spm_output_sleep_option(void)
{
    spm_notice("AP_ONLY_SLEEP:%d, PWAKE_EN:%d, BYPASS_SYSPWREQ:%d\n",
               SPM_AP_ONLY_SLEEP, SPM_PWAKE_EN, SPM_BYPASS_SYSPWREQ);
}
Beispiel #6
0
void spm_wdt_set_fiq_cb(fiq_isr_handler FuncPtr)
{
   spm_wdt_fiq_bark = FuncPtr;          // C
   spm_notice("spm_wdt_set_fiq_cb:0x%X\n",FuncPtr);
}
Beispiel #7
0
void spm_wdt_set_irq_cb(irq_handler_t FuncPtr)
{
   spm_wdt_irq_bark = FuncPtr;          // C
   spm_notice("spm_wdt_set_irq_cb:0x%X\n",FuncPtr);
}
Beispiel #8
0
void spm_wdt_set_reset_length(unsigned int value)//used to set wdt timeout interval
{
    pcm_config_wdt.wdt_val_ms = value;
    spm_notice("spm_wdt_set_reset_length:%d\n",pcm_config_wdt.wdt_val_ms);
}
Beispiel #9
0
/***********************Exposed API*************************/
void spm_wdt_restart(void) //used to kick wdt.
{
    spm_write(SPM_POWER_ON_VAL1,spm_read(SPM_POWER_ON_VAL1)| R7_wdt_kick_p);
    spm_write(SPM_POWER_ON_VAL1,spm_read(SPM_POWER_ON_VAL1)& ~R7_wdt_kick_p);
		spm_notice("spm_wdt_restart\n");
}
void spm_output_sleep_option(void)
{
    spm_notice("PWAKE_EN:%d, PCMWDT_EN:%d, BYPASS_SYSPWREQ:%d, I2C_CHANNEL:%d\n",
               SPM_PWAKE_EN, SPM_PCMWDT_EN, SPM_BYPASS_SYSPWREQ, I2C_CHANNEL);
}
Beispiel #11
0
void spm_pcm_dump_regs(void)          
{                                     
    /* SPM register */
    spm_notice("POWER_ON_VAL0   0x%x = 0x%x\n", SPM_POWER_ON_VAL0          , spm_read(SPM_POWER_ON_VAL0));
    spm_notice("POWER_ON_VAL1   0x%x = 0x%x\n", SPM_POWER_ON_VAL1          , spm_read(SPM_POWER_ON_VAL1));
    spm_notice("PCM_PWR_IO_EN   0x%x = 0x%x\n", SPM_PCM_PWR_IO_EN          , spm_read(SPM_PCM_PWR_IO_EN));
    spm_notice("PCM_REG0_DATA   0x%x = 0x%x\n", SPM_PCM_REG0_DATA          , spm_read(SPM_PCM_REG0_DATA));
    spm_notice("PCM_REG7_DATA   0x%x = 0x%x\n", SPM_PCM_REG7_DATA          , spm_read(SPM_PCM_REG7_DATA));
    spm_notice("PCM_REG13_DATA  0x%x = 0x%x\n", SPM_PCM_REG13_DATA         , spm_read(SPM_PCM_REG13_DATA));
    spm_notice("CLK_CON         0x%x = 0x%x\n", SPM_CLK_CON                , spm_read(SPM_CLK_CON));
    spm_notice("AP_DVFS_CON     0x%x = 0x%x\n", SPM_AP_DVFS_CON_SET        , spm_read(SPM_AP_DVFS_CON_SET));
    spm_notice("PWR_STATUS      0x%x = 0x%x\n", SPM_PWR_STATUS             , spm_read(SPM_PWR_STATUS));
    spm_notice("PWR_STATUS_S    0x%x = 0x%x\n", SPM_PWR_STATUS_S           , spm_read(SPM_PWR_STATUS_S));
    spm_notice("SLEEP_TIMER_STA 0x%x = 0x%x\n", SPM_SLEEP_TIMER_STA        , spm_read(SPM_SLEEP_TIMER_STA));
    spm_notice("WAKE_EVENT_MASK 0x%x = 0x%x\n", SPM_SLEEP_WAKEUP_EVENT_MASK, spm_read(SPM_SLEEP_WAKEUP_EVENT_MASK));

    // PCM register
    spm_notice("PCM_REG0_DATA   0x%x = 0x%x\n", SPM_PCM_REG0_DATA          , spm_read(SPM_PCM_REG0_DATA));
    spm_notice("PCM_REG1_DATA   0x%x = 0x%x\n", SPM_PCM_REG1_DATA          , spm_read(SPM_PCM_REG1_DATA));
    spm_notice("PCM_REG2_DATA   0x%x = 0x%x\n", SPM_PCM_REG2_DATA          , spm_read(SPM_PCM_REG2_DATA));
    spm_notice("PCM_REG3_DATA   0x%x = 0x%x\n", SPM_PCM_REG3_DATA          , spm_read(SPM_PCM_REG3_DATA));
    spm_notice("PCM_REG4_DATA   0x%x = 0x%x\n", SPM_PCM_REG4_DATA          , spm_read(SPM_PCM_REG4_DATA));
    spm_notice("PCM_REG5_DATA   0x%x = 0x%x\n", SPM_PCM_REG5_DATA          , spm_read(SPM_PCM_REG5_DATA));
    spm_notice("PCM_REG6_DATA   0x%x = 0x%x\n", SPM_PCM_REG6_DATA          , spm_read(SPM_PCM_REG6_DATA));
    spm_notice("PCM_REG7_DATA   0x%x = 0x%x\n", SPM_PCM_REG7_DATA          , spm_read(SPM_PCM_REG7_DATA));
    spm_notice("PCM_REG8_DATA   0x%x = 0x%x\n", SPM_PCM_REG8_DATA          , spm_read(SPM_PCM_REG8_DATA));
    spm_notice("PCM_REG9_DATA   0x%x = 0x%x\n", SPM_PCM_REG9_DATA          , spm_read(SPM_PCM_REG9_DATA));
    spm_notice("PCM_REG10_DATA   0x%x = 0x%x\n", SPM_PCM_REG10_DATA          , spm_read(SPM_PCM_REG10_DATA));
    spm_notice("PCM_REG11_DATA   0x%x = 0x%x\n", SPM_PCM_REG11_DATA          , spm_read(SPM_PCM_REG11_DATA));
    spm_notice("PCM_REG12_DATA   0x%x = 0x%x\n", SPM_PCM_REG12_DATA          , spm_read(SPM_PCM_REG12_DATA));
    spm_notice("PCM_REG13_DATA   0x%x = 0x%x\n", SPM_PCM_REG13_DATA          , spm_read(SPM_PCM_REG13_DATA));
    spm_notice("PCM_REG14_DATA   0x%x = 0x%x\n", SPM_PCM_REG14_DATA          , spm_read(SPM_PCM_REG14_DATA));
    spm_notice("PCM_REG15_DATA   0x%x = 0x%x\n", SPM_PCM_REG15_DATA          , spm_read(SPM_PCM_REG15_DATA));    
}
Beispiel #12
0
void spm_dump_pll_regs(void)
{
    /* PLL register */
    spm_notice("ARMPLL_CON0       0x%X = 0x%X\n",ARMPLL_CON0       ,spm_read(ARMPLL_CON0       ));
    spm_notice("ARMPLL_CON1       0x%X = 0x%X\n",ARMPLL_CON1       ,spm_read(ARMPLL_CON1       ));
    spm_notice("ARMPLL_PWR_CON0   0x%X = 0x%X\n",ARMPLL_PWR_CON0   ,spm_read(ARMPLL_PWR_CON0   ));     
    spm_notice("MAINPLL_CON0      0x%X = 0x%X\n",MAINPLL_CON0      ,spm_read(MAINPLL_CON0      ));  
    spm_notice("MAINPLL_CON1      0x%X = 0x%X\n",MAINPLL_CON1      ,spm_read(MAINPLL_CON1      ));  
    spm_notice("MAINPLL_PWR_CON0  0x%X = 0x%X\n",MAINPLL_PWR_CON0  ,spm_read(MAINPLL_PWR_CON0  ));      
    spm_notice("UNIVPLL_CON0      0x%X = 0x%X\n",UNIVPLL_CON0      ,spm_read(UNIVPLL_CON0      ));  
    spm_notice("UNIVPLL_CON1      0x%X = 0x%X\n",(UNIVPLL_CON0+4)  ,spm_read(UNIVPLL_CON0+4    ));  
    spm_notice("UNIVPLL_PWR_CON0  0x%X = 0x%X\n",UNIVPLL_PWR_CON0  ,spm_read(UNIVPLL_PWR_CON0  ));      
    spm_notice("WHPLL_CON0        0x%X = 0x%X\n",WHPLL_CON0        ,spm_read(WHPLL_CON0        ));
    spm_notice("WHPLL_CON1        0x%X = 0x%X\n",WHPLL_CON1        ,spm_read(WHPLL_CON1        ));
    spm_notice("WHPLL_PWR_CON0    0x%X = 0x%X\n",WHPLL_PWR_CON0    ,spm_read(WHPLL_PWR_CON0    ));    
    spm_notice("WHPLL_PATHSEL_CON 0x%X = 0x%X\n",WHPLL_PATHSEL_CON ,spm_read(WHPLL_PATHSEL_CON ));        
}