Lines Matching refs:wakesta

62 wake_reason_t __spm_output_wake_reason(int state_id, const struct wake_status *wakesta)  in __spm_output_wake_reason()  argument
67 if (wakesta != NULL) { in __spm_output_wake_reason()
68 if (wakesta->abort != 0U) { in __spm_output_wake_reason()
70 wakesta->abort, wakesta->timer_out); in __spm_output_wake_reason()
73 if ((wakesta->r12 & BIT(i)) != 0U) { in __spm_output_wake_reason()
75 wakeup_src_str[i], wakesta->timer_out); in __spm_output_wake_reason()
83 wakesta->r12, wakesta->r12_ext, wakesta->r13, wakesta->debug_flag, in __spm_output_wake_reason()
84 wakesta->debug_flag1); in __spm_output_wake_reason()
86 wakesta->raw_sta, wakesta->md32pcm_wakeup_sta, in __spm_output_wake_reason()
87 wakesta->md32pcm_event_sta, wakesta->idle_sta, in __spm_output_wake_reason()
88 wakesta->cg_check_sta); in __spm_output_wake_reason()
90 wakesta->req_sta0, wakesta->req_sta1, wakesta->req_sta2, in __spm_output_wake_reason()
91 wakesta->req_sta3, wakesta->req_sta4, wakesta->isr); in __spm_output_wake_reason()
93 wakesta->rt_req_sta0, wakesta->rt_req_sta1, wakesta->rt_req_sta2); in __spm_output_wake_reason()
95 wakesta->rt_req_sta3, wakesta->rt_req_sta4, wakesta->raw_ext_sta); in __spm_output_wake_reason()
97 wakesta->wake_misc, wakesta->sw_flag0, wakesta->sw_flag1, in __spm_output_wake_reason()
98 wakesta->b_sw_flag0, wakesta->b_sw_flag1, wakesta->src_req); in __spm_output_wake_reason()
100 wakesta->clk_settle, mmio_read_32(SYS_TIMER_VALUE_L), in __spm_output_wake_reason()
103 if (wakesta->timer_out != 0U) { in __spm_output_wake_reason()
105 spm_26m_off_pct = (100 * bk_vtcxo_dur) / wakesta->timer_out; in __spm_output_wake_reason()
454 void __spm_get_wakeup_status(struct wake_status *wakesta, in __spm_get_wakeup_status() argument
457 wakesta->tr.comm.r12 = mmio_read_32(SPM_BK_WAKE_EVENT); in __spm_get_wakeup_status()
458 wakesta->tr.comm.timer_out = mmio_read_32(SPM_BK_PCM_TIMER); in __spm_get_wakeup_status()
459 wakesta->tr.comm.r13 = mmio_read_32(PCM_REG13_DATA); in __spm_get_wakeup_status()
460 wakesta->tr.comm.req_sta0 = mmio_read_32(SRC_REQ_STA_0); in __spm_get_wakeup_status()
461 wakesta->tr.comm.req_sta1 = mmio_read_32(SRC_REQ_STA_1); in __spm_get_wakeup_status()
462 wakesta->tr.comm.req_sta2 = mmio_read_32(SRC_REQ_STA_2); in __spm_get_wakeup_status()
463 wakesta->tr.comm.req_sta3 = mmio_read_32(SRC_REQ_STA_3); in __spm_get_wakeup_status()
464 wakesta->tr.comm.req_sta4 = mmio_read_32(SRC_REQ_STA_4); in __spm_get_wakeup_status()
466 wakesta->tr.comm.debug_flag = mmio_read_32(PCM_WDT_LATCH_SPARE_0); in __spm_get_wakeup_status()
467 wakesta->tr.comm.debug_flag1 = mmio_read_32(PCM_WDT_LATCH_SPARE_1); in __spm_get_wakeup_status()
470 wakesta->tr.comm.debug_flag |= (SPM_DBG_DEBUG_IDX_DDREN_WAKE | in __spm_get_wakeup_status()
472 mmio_write_32(PCM_WDT_LATCH_SPARE_0, wakesta->tr.comm.debug_flag); in __spm_get_wakeup_status()
475 wakesta->tr.comm.b_sw_flag0 = mmio_read_32(SPM_SW_RSV_7); in __spm_get_wakeup_status()
476 wakesta->tr.comm.b_sw_flag1 = mmio_read_32(SPM_SW_RSV_8); in __spm_get_wakeup_status()
479 wakesta->r12 = mmio_read_32(SPM_BK_WAKE_EVENT); in __spm_get_wakeup_status()
480 wakesta->r12_ext = mmio_read_32(SPM_WAKEUP_STA); in __spm_get_wakeup_status()
481 wakesta->raw_sta = mmio_read_32(SPM_WAKEUP_STA); in __spm_get_wakeup_status()
482 wakesta->raw_ext_sta = mmio_read_32(SPM_WAKEUP_EXT_STA); in __spm_get_wakeup_status()
483 wakesta->md32pcm_wakeup_sta = mmio_read_32(MD32PCM_WAKEUP_STA); in __spm_get_wakeup_status()
484 wakesta->md32pcm_event_sta = mmio_read_32(MD32PCM_EVENT_STA); in __spm_get_wakeup_status()
485 wakesta->src_req = mmio_read_32(SPM_SRC_REQ); in __spm_get_wakeup_status()
488 wakesta->wake_misc = mmio_read_32(SPM_BK_WAKE_MISC); in __spm_get_wakeup_status()
491 wakesta->timer_out = mmio_read_32(SPM_BK_PCM_TIMER); in __spm_get_wakeup_status()
494 wakesta->r13 = mmio_read_32(PCM_REG13_DATA); in __spm_get_wakeup_status()
495 wakesta->idle_sta = mmio_read_32(SUBSYS_IDLE_STA); in __spm_get_wakeup_status()
496 wakesta->req_sta0 = mmio_read_32(SRC_REQ_STA_0); in __spm_get_wakeup_status()
497 wakesta->req_sta1 = mmio_read_32(SRC_REQ_STA_1); in __spm_get_wakeup_status()
498 wakesta->req_sta2 = mmio_read_32(SRC_REQ_STA_2); in __spm_get_wakeup_status()
499 wakesta->req_sta3 = mmio_read_32(SRC_REQ_STA_3); in __spm_get_wakeup_status()
500 wakesta->req_sta4 = mmio_read_32(SRC_REQ_STA_4); in __spm_get_wakeup_status()
503 wakesta->cg_check_sta = mmio_read_32(SPM_CG_CHECK_STA); in __spm_get_wakeup_status()
506 wakesta->debug_flag = mmio_read_32(PCM_WDT_LATCH_SPARE_0); in __spm_get_wakeup_status()
507 wakesta->debug_flag1 = mmio_read_32(PCM_WDT_LATCH_SPARE_1); in __spm_get_wakeup_status()
510 wakesta->b_sw_flag0 = mmio_read_32(SPM_SW_RSV_7); in __spm_get_wakeup_status()
511 wakesta->b_sw_flag1 = mmio_read_32(SPM_SW_RSV_8); in __spm_get_wakeup_status()
513 wakesta->rt_req_sta0 = mmio_read_32(SPM_SW_RSV_2); in __spm_get_wakeup_status()
514 wakesta->rt_req_sta1 = mmio_read_32(SPM_SW_RSV_3); in __spm_get_wakeup_status()
515 wakesta->rt_req_sta2 = mmio_read_32(SPM_SW_RSV_4); in __spm_get_wakeup_status()
516 wakesta->rt_req_sta3 = mmio_read_32(SPM_SW_RSV_5); in __spm_get_wakeup_status()
517 wakesta->rt_req_sta4 = mmio_read_32(SPM_SW_RSV_6); in __spm_get_wakeup_status()
520 wakesta->isr = mmio_read_32(SPM_IRQ_STA); in __spm_get_wakeup_status()
523 wakesta->sw_flag0 = mmio_read_32(SPM_SW_FLAG_0); in __spm_get_wakeup_status()
524 wakesta->sw_flag1 = mmio_read_32(SPM_SW_FLAG_1); in __spm_get_wakeup_status()
527 wakesta->clk_settle = mmio_read_32(SPM_CLK_SETTLE); in __spm_get_wakeup_status()
530 wakesta->abort = ((wakesta->debug_flag & DEBUG_ABORT_MASK) | in __spm_get_wakeup_status()
531 (wakesta->debug_flag1 & DEBUG_ABORT_MASK_1)); in __spm_get_wakeup_status()