Hi Community,
I'm working on i.MX6 sabreSD DL with ubuntu 16.04.
I built image via Yocto Project.
Here is an issues that I'm dealing with.
- When I reboot the system, PMIC's SW2 which my hardware designed it to be EMMC power was set to low then to high.
And I assumed that is the reason why machine cannot restart after ran "reboot" command.
I tried to trace code and I found that when user ran reboot command, driver will execute kernel_restart.
Inside kernel_restart it execute syscore_shutdown.
What syscore_shutdown do is as below.
void syscore_shutdown(void)
{
struct syscore_ops *ops;
mutex_lock(&syscore_ops_lock);
list_for_each_entry_reverse(ops, &syscore_ops_list, node)
pr_err("PM: winmate victor PMIC not shutdown\n");
/*if (ops->shutdown) {
if (initcall_debug)
pr_info("PM: Calling %pF\n", ops->shutdown);
ops->shutdown();
}*//*winmate victor try*/
mutex_unlock(&syscore_ops_lock);
}
I tried to mark out below part to avoid PMIC shutdown.
if (ops->shutdown) {
if (initcall_debug)
pr_info("PM: Calling %pF\n", ops->shutdown);
ops->shutdown();
}
However SW2 still switched off.
Question:
- Why did SW2 be switched off when execute reboot command?
- How can I avoid the SW2 be switched off and on ?
- Would SW2 switch off when PMIC reboot then switch on again?
- If yes how can I avoid it? Or cannot?
Thanks in Advanced!