Skip to content

Commit

Permalink
os/pm: Cleanup PM code
Browse files Browse the repository at this point in the history
- Remove some logs, change tick printing to %lld because we are using u64 for clock_t
  • Loading branch information
edwakuwaku committed May 13, 2024
1 parent cbc0c53 commit adbb0e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion os/arch/arm/src/amebasmart/amebasmart_pmhelpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ void SOCPS_LPWAP_ipc_int(VOID *Data, u32 IrqStatus, u32 ChanNum)
UNUSED(IrqStatus);
UNUSED(ChanNum);

pmvdbg("IPC wakeup interrupt handler!!\n");
pm_activity(PM_IDLE_DOMAIN, 9);
ipc_get_message(IPC_LP_TO_AP, IPC_L2A_Channel1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ void tizenrt_pre_sleep_processing(uint32_t *expected_idle_time)
SOCPS_SleepPG();
}

/* When we reach back here, LP core might be still printing information
Thus, we should add wait LOGUART TX complete, before AP core start printing logs */
LOGUART_WaitTxComplete();

/* update kernel tick by calculating passed tick from gtimer */
/* get current gtimer timestamp */
tick_passed = SYSTIMER_GetPassTick(tick_before_sleep);
Expand All @@ -311,7 +315,7 @@ void tizenrt_pre_sleep_processing(uint32_t *expected_idle_time)
#else
#ifdef CONFIG_PM_TICKSUPPRESS
if (tizenrt_sleep_handler) {
tizenrt_sleep_handler(ms_passed); /* update kernel tick */
tizenrt_sleep_handler((u64)ms_passed); /* update kernel tick */
}
#endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion os/pm/pm_wakehandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void pm_wakehandler(clock_t missing_tick)
{
irqstate_t flags = enter_critical_section();

pmllvdbg("missing_tick: %d\n", missing_tick);
pmllvdbg("missing_tick: %lld\n", missing_tick);

if (missing_tick > 0) {
clock_timer_nohz((clock_t)missing_tick);
Expand Down

0 comments on commit adbb0e7

Please sign in to comment.