Lines Matching defs:wakesta

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