Lines Matching refs:wakesta

25 wake_reason_t __spm_output_wake_reason(const struct wake_status *wakesta)  in __spm_output_wake_reason()  argument
30 if (wakesta == NULL) { in __spm_output_wake_reason()
34 if (wakesta->is_abort != 0U) { in __spm_output_wake_reason()
36 wakesta->tr.comm.r12, in __spm_output_wake_reason()
37 wakesta->tr.comm.debug_flag, wakesta->tr.comm.debug_flag1); in __spm_output_wake_reason()
39 wakesta->sw_flag0, wakesta->sw_flag1, in __spm_output_wake_reason()
40 wakesta->tr.comm.b_sw_flag0, wakesta->tr.comm.b_sw_flag1); in __spm_output_wake_reason()
43 if ((wakesta->tr.comm.r12 & R12_PCM_TIMER) != 0U) { in __spm_output_wake_reason()
45 if ((wakesta->wake_misc & WAKE_MISC_PCM_TIMER_EVENT) != 0U) { in __spm_output_wake_reason()
51 wakesta->tr.comm.r12, wakesta->r12_ext, wakesta->tr.comm.r13, wakesta->tr.comm.debug_flag, in __spm_output_wake_reason()
52 wakesta->tr.comm.debug_flag1); in __spm_output_wake_reason()
54 wakesta->tr.comm.raw_sta, wakesta->md32pcm_wakeup_sta, in __spm_output_wake_reason()
55 wakesta->md32pcm_event_sta, wakesta->idle_sta, in __spm_output_wake_reason()
56 wakesta->cg_check_sta); in __spm_output_wake_reason()
58 wakesta->tr.comm.req_sta0, wakesta->tr.comm.req_sta1, wakesta->tr.comm.req_sta2, in __spm_output_wake_reason()
59 wakesta->tr.comm.req_sta3, wakesta->tr.comm.req_sta4, wakesta->isr); in __spm_output_wake_reason()
61 wakesta->rt_req_sta0, wakesta->rt_req_sta1, wakesta->rt_req_sta2); in __spm_output_wake_reason()
63 wakesta->rt_req_sta3, wakesta->rt_req_sta4, wakesta->raw_ext_sta); in __spm_output_wake_reason()
65 wakesta->wake_misc, wakesta->sw_flag0, wakesta->sw_flag1, in __spm_output_wake_reason()
66 wakesta->tr.comm.b_sw_flag0, wakesta->tr.comm.b_sw_flag1, wakesta->src_req); in __spm_output_wake_reason()
68 wakesta->clk_settle, mmio_read_32(SYS_TIMER_VALUE_L), in __spm_output_wake_reason()
71 if (wakesta->tr.comm.timer_out != 0U) { in __spm_output_wake_reason()
73 spm_26m_off_pct = (100 * bk_vtcxo_dur) / wakesta->tr.comm.timer_out; in __spm_output_wake_reason()
324 void __spm_get_wakeup_status(struct wake_status *wakesta, unsigned int ext_status) in __spm_get_wakeup_status() argument
327 wakesta->tr.comm.r12 = mmio_read_32(SPM_BK_WAKE_EVENT); /* backup of PCM_REG12_DATA */ in __spm_get_wakeup_status()
328 wakesta->r12_ext = mmio_read_32(SPM_WAKEUP_EXT_STA); in __spm_get_wakeup_status()
329 wakesta->tr.comm.raw_sta = mmio_read_32(SPM_WAKEUP_STA); in __spm_get_wakeup_status()
330 wakesta->raw_ext_sta = mmio_read_32(SPM_WAKEUP_EXT_STA); in __spm_get_wakeup_status()
331 wakesta->md32pcm_wakeup_sta = mmio_read_32(MD32PCM_WAKEUP_STA); in __spm_get_wakeup_status()
332 wakesta->md32pcm_event_sta = mmio_read_32(MD32PCM_EVENT_STA); in __spm_get_wakeup_status()
333 wakesta->wake_misc = mmio_read_32(SPM_BK_WAKE_MISC); /* backup of SPM_WAKEUP_MISC */ in __spm_get_wakeup_status()
336 wakesta->tr.comm.timer_out = in __spm_get_wakeup_status()
340 wakesta->tr.comm.r13 = mmio_read_32(PCM_REG13_DATA); in __spm_get_wakeup_status()
341 wakesta->idle_sta = mmio_read_32(SUBSYS_IDLE_STA); in __spm_get_wakeup_status()
342 wakesta->tr.comm.req_sta0 = mmio_read_32(SRC_REQ_STA_0); in __spm_get_wakeup_status()
343 wakesta->tr.comm.req_sta1 = mmio_read_32(SRC_REQ_STA_1); in __spm_get_wakeup_status()
344 wakesta->tr.comm.req_sta2 = mmio_read_32(SRC_REQ_STA_2); in __spm_get_wakeup_status()
345 wakesta->tr.comm.req_sta3 = mmio_read_32(SRC_REQ_STA_3); in __spm_get_wakeup_status()
346 wakesta->tr.comm.req_sta4 = mmio_read_32(SRC_REQ_STA_4); in __spm_get_wakeup_status()
349 wakesta->tr.comm.debug_flag = mmio_read_32(PCM_WDT_LATCH_SPARE_0); in __spm_get_wakeup_status()
350 wakesta->tr.comm.debug_flag1 = mmio_read_32(PCM_WDT_LATCH_SPARE_1); in __spm_get_wakeup_status()
353 wakesta->tr.comm.debug_flag |= (SPM_DBG_DEBUG_IDX_DDREN_WAKE | in __spm_get_wakeup_status()
355 mmio_write_32(PCM_WDT_LATCH_SPARE_0, wakesta->tr.comm.debug_flag); in __spm_get_wakeup_status()
359 wakesta->tr.comm.b_sw_flag0 = mmio_read_32(SPM_SW_RSV_7); /* SPM_SW_RSV_7 */ in __spm_get_wakeup_status()
360 wakesta->tr.comm.b_sw_flag1 = mmio_read_32(SPM_SW_RSV_8); /* SPM_SW_RSV_8 */ in __spm_get_wakeup_status()
363 wakesta->src_req = mmio_read_32(SPM_SRC_REQ); in __spm_get_wakeup_status()
366 wakesta->cg_check_sta = mmio_read_32(SPM_CG_CHECK_STA); in __spm_get_wakeup_status()
368 wakesta->rt_req_sta0 = mmio_read_32(SPM_SW_RSV_2); in __spm_get_wakeup_status()
369 wakesta->rt_req_sta1 = mmio_read_32(SPM_SW_RSV_3); in __spm_get_wakeup_status()
370 wakesta->rt_req_sta2 = mmio_read_32(SPM_SW_RSV_4); in __spm_get_wakeup_status()
371 wakesta->rt_req_sta3 = mmio_read_32(SPM_SW_RSV_5); in __spm_get_wakeup_status()
372 wakesta->rt_req_sta4 = mmio_read_32(SPM_SW_RSV_6); in __spm_get_wakeup_status()
375 wakesta->isr = mmio_read_32(SPM_IRQ_STA); in __spm_get_wakeup_status()
378 wakesta->sw_flag0 = mmio_read_32(SPM_SW_FLAG_0); in __spm_get_wakeup_status()
379 wakesta->sw_flag1 = mmio_read_32(SPM_SW_FLAG_1); in __spm_get_wakeup_status()
382 wakesta->clk_settle = mmio_read_32(SPM_CLK_SETTLE); in __spm_get_wakeup_status()
385 wakesta->is_abort = wakesta->tr.comm.debug_flag & DEBUG_ABORT_MASK; in __spm_get_wakeup_status()
386 wakesta->is_abort |= wakesta->tr.comm.debug_flag1 & DEBUG_ABORT_MASK_1; in __spm_get_wakeup_status()