Lines Matching refs:wakesta

71 				       const struct wake_status *wakesta)  in __spm_output_wake_reason()  argument
77 if (wakesta == NULL) { in __spm_output_wake_reason()
81 spm_26m_sta = ((wakesta->debug_flag & SPM_DBG_DEBUG_IDX_26M_SLEEP) == 0U) ? "on" : "off"; in __spm_output_wake_reason()
83 if (wakesta->abort != 0U) { in __spm_output_wake_reason()
85 wakesta->abort, wakesta->timer_out, spm_26m_sta); in __spm_output_wake_reason()
86 } else if (wakesta->r12 == SPM_WAKEUP_REASON_MISSING) { in __spm_output_wake_reason()
88 wakesta->timer_out, spm_26m_sta); in __spm_output_wake_reason()
91 if ((wakesta->r12 & (1U << i)) != 0U) { in __spm_output_wake_reason()
93 wakeup_src_str[i], wakesta->timer_out, spm_26m_sta); in __spm_output_wake_reason()
101 wakesta->r12, wakesta->r12_ext, wakesta->r13, wakesta->debug_flag, in __spm_output_wake_reason()
102 wakesta->debug_flag1); in __spm_output_wake_reason()
104 wakesta->raw_sta, wakesta->md32pcm_wakeup_sta, in __spm_output_wake_reason()
105 wakesta->md32pcm_event_sta, wakesta->idle_sta, in __spm_output_wake_reason()
106 wakesta->cg_check_sta); in __spm_output_wake_reason()
108 wakesta->req_sta0, wakesta->req_sta1, wakesta->req_sta2, in __spm_output_wake_reason()
109 wakesta->req_sta3, wakesta->req_sta4, wakesta->isr); in __spm_output_wake_reason()
111 wakesta->rt_req_sta0, wakesta->rt_req_sta1, wakesta->rt_req_sta2); in __spm_output_wake_reason()
113 wakesta->rt_req_sta3, wakesta->rt_req_sta4, wakesta->raw_ext_sta); in __spm_output_wake_reason()
115 wakesta->wake_misc, wakesta->sw_flag0, wakesta->sw_flag1, in __spm_output_wake_reason()
116 wakesta->b_sw_flag0, wakesta->b_sw_flag1, wakesta->src_req); in __spm_output_wake_reason()
118 wakesta->clk_settle, mmio_read_32(SYS_TIMER_VALUE_L), in __spm_output_wake_reason()
121 if (wakesta->timer_out != 0U) { in __spm_output_wake_reason()
123 spm_26m_off_pct = (100 * bk_vtcxo_dur) / wakesta->timer_out; in __spm_output_wake_reason()
382 void __spm_get_wakeup_status(struct wake_status *wakesta, in __spm_get_wakeup_status() argument
385 wakesta->tr.comm.r12 = mmio_read_32(SPM_BK_WAKE_EVENT); in __spm_get_wakeup_status()
386 wakesta->tr.comm.timer_out = mmio_read_32(SPM_BK_PCM_TIMER); in __spm_get_wakeup_status()
387 wakesta->tr.comm.r13 = mmio_read_32(PCM_REG13_DATA); in __spm_get_wakeup_status()
388 wakesta->tr.comm.req_sta0 = mmio_read_32(SRC_REQ_STA_0); in __spm_get_wakeup_status()
389 wakesta->tr.comm.req_sta1 = mmio_read_32(SRC_REQ_STA_1); in __spm_get_wakeup_status()
390 wakesta->tr.comm.req_sta2 = mmio_read_32(SRC_REQ_STA_2); in __spm_get_wakeup_status()
391 wakesta->tr.comm.req_sta3 = mmio_read_32(SRC_REQ_STA_3); in __spm_get_wakeup_status()
392 wakesta->tr.comm.req_sta4 = mmio_read_32(SRC_REQ_STA_4); in __spm_get_wakeup_status()
393 wakesta->tr.comm.debug_flag = mmio_read_32(PCM_WDT_LATCH_SPARE_0); in __spm_get_wakeup_status()
394 wakesta->tr.comm.debug_flag1 = mmio_read_32(PCM_WDT_LATCH_SPARE_1); in __spm_get_wakeup_status()
397 wakesta->tr.comm.debug_flag |= (SPM_DBG_DEBUG_IDX_DDREN_WAKE | in __spm_get_wakeup_status()
400 wakesta->tr.comm.debug_flag); in __spm_get_wakeup_status()
403 wakesta->tr.comm.b_sw_flag0 = mmio_read_32(SPM_SW_RSV_7); in __spm_get_wakeup_status()
404 wakesta->tr.comm.b_sw_flag1 = mmio_read_32(SPM_SW_RSV_8); in __spm_get_wakeup_status()
407 wakesta->r12 = mmio_read_32(SPM_BK_WAKE_EVENT); in __spm_get_wakeup_status()
408 wakesta->r12_ext = mmio_read_32(SPM_WAKEUP_STA); in __spm_get_wakeup_status()
409 wakesta->raw_sta = mmio_read_32(SPM_WAKEUP_STA); in __spm_get_wakeup_status()
410 wakesta->raw_ext_sta = mmio_read_32(SPM_WAKEUP_EXT_STA); in __spm_get_wakeup_status()
411 wakesta->md32pcm_wakeup_sta = mmio_read_32(MD32PCM_WAKEUP_STA); in __spm_get_wakeup_status()
412 wakesta->md32pcm_event_sta = mmio_read_32(MD32PCM_EVENT_STA); in __spm_get_wakeup_status()
413 wakesta->src_req = mmio_read_32(SPM_SRC_REQ); in __spm_get_wakeup_status()
416 wakesta->wake_misc = mmio_read_32(SPM_BK_WAKE_MISC); in __spm_get_wakeup_status()
419 wakesta->timer_out = mmio_read_32(SPM_BK_PCM_TIMER); in __spm_get_wakeup_status()
422 wakesta->r13 = mmio_read_32(PCM_REG13_DATA); in __spm_get_wakeup_status()
423 wakesta->idle_sta = mmio_read_32(SUBSYS_IDLE_STA); in __spm_get_wakeup_status()
424 wakesta->req_sta0 = mmio_read_32(SRC_REQ_STA_0); in __spm_get_wakeup_status()
425 wakesta->req_sta1 = mmio_read_32(SRC_REQ_STA_1); in __spm_get_wakeup_status()
426 wakesta->req_sta2 = mmio_read_32(SRC_REQ_STA_2); in __spm_get_wakeup_status()
427 wakesta->req_sta3 = mmio_read_32(SRC_REQ_STA_3); in __spm_get_wakeup_status()
428 wakesta->req_sta4 = mmio_read_32(SRC_REQ_STA_4); in __spm_get_wakeup_status()
431 wakesta->cg_check_sta = mmio_read_32(SPM_CG_CHECK_STA); in __spm_get_wakeup_status()
434 wakesta->debug_flag = mmio_read_32(PCM_WDT_LATCH_SPARE_0); in __spm_get_wakeup_status()
435 wakesta->debug_flag1 = mmio_read_32(PCM_WDT_LATCH_SPARE_1); in __spm_get_wakeup_status()
438 wakesta->b_sw_flag0 = mmio_read_32(SPM_SW_RSV_7); in __spm_get_wakeup_status()
439 wakesta->b_sw_flag1 = mmio_read_32(SPM_SW_RSV_8); in __spm_get_wakeup_status()
441 wakesta->rt_req_sta0 = mmio_read_32(SPM_SW_RSV_2); in __spm_get_wakeup_status()
442 wakesta->rt_req_sta1 = mmio_read_32(SPM_SW_RSV_3); in __spm_get_wakeup_status()
443 wakesta->rt_req_sta2 = mmio_read_32(SPM_SW_RSV_4); in __spm_get_wakeup_status()
444 wakesta->rt_req_sta3 = mmio_read_32(SPM_SW_RSV_5); in __spm_get_wakeup_status()
445 wakesta->rt_req_sta4 = mmio_read_32(SPM_SW_RSV_6); in __spm_get_wakeup_status()
448 wakesta->isr = mmio_read_32(SPM_IRQ_STA); in __spm_get_wakeup_status()
451 wakesta->sw_flag0 = mmio_read_32(SPM_SW_FLAG_0); in __spm_get_wakeup_status()
452 wakesta->sw_flag1 = mmio_read_32(SPM_SW_FLAG_1); in __spm_get_wakeup_status()
455 wakesta->clk_settle = mmio_read_32(SPM_CLK_SETTLE); in __spm_get_wakeup_status()
458 wakesta->abort = (wakesta->debug_flag & DEBUG_ABORT_MASK) | in __spm_get_wakeup_status()
459 (wakesta->debug_flag1 & DEBUG_ABORT_MASK_1); in __spm_get_wakeup_status()