Commit 770eba36 authored by Ramakrishna Pallala's avatar Ramakrishna Pallala Committed by Anas Nashif
Browse files

tests: power: multicore: Fix power state entry for LMT



Enter SYS_POWER_STATE_CPU_LPS_2(C2LP) state on Lakemont to achieve
the Low Power Sensing Standby(LPSS) state on Quark SE C1000.

Also added a busy loop to have syncronization b/w x86 and ARC
console outputs.

Signed-off-by: default avatarRamakrishna Pallala <ramakrishna.pallala@intel.com>
parent 05434d1b
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -61,13 +61,13 @@ int _sys_soc_suspend(s32_t ticks)

	suspend_devices();

	_sys_soc_set_power_state(SYS_POWER_STATE_DEEP_SLEEP_2);
	_sys_soc_set_power_state(SYS_POWER_STATE_CPU_LPS_2);

	resume_devices();

	printk("LMT: Succeed.\n");

	_sys_soc_power_state_post_ops(SYS_POWER_STATE_DEEP_SLEEP_2);
	_sys_soc_power_state_post_ops(SYS_POWER_STATE_CPU_LPS_2);

	return SYS_PM_DEEP_SLEEP;
}
@@ -150,6 +150,11 @@ void main(void)
	rtc_set_config(rtc_dev, &config);

	while (1) {
		/* Add a busy loop to syncronize the
		 * console output b/w x86 and ARC.
		 */
		k_busy_wait(1000 * 1000);

		/* Simulate some task handling by busy waiting. */
		printk("LMT: busy\n");
		k_busy_wait(TASK_TIME_IN_SEC * 1000 * 1000);