I also have this issue with MX28EVK. I tried modifying the "pm.c" source as suggested elsewhere:
static void mx28_pm_power_off(void)
{
pr_info("poweroff - 1 rtc_persistent0=%08X \n",
__raw_readl(REGS_POWER_BASE + HW_RTC_PERSISTENT0));
__raw_writel(__raw_readl(REGS_POWER_BASE + HW_RTC_PERSISTENT0) & ~BM_RTC_PERSISTENT0_AUTO_RESTART,
REGS_POWER_BASE + HW_RTC_PERSISTENT0); // disable auto-restart
pr_info("poweroff - 2 rtc_persistent0=%08X \n",
__raw_readl(REGS_POWER_BASE + HW_RTC_PERSISTENT0));
pr_info("poweroff - 3 power_reset=%08X \n",
__raw_readl(REGS_POWER_BASE + HW_POWER_RESET));
__raw_writel(BF_POWER_RESET_UNLOCK(0x3e77) | BM_POWER_RESET_PWD,
REGS_POWER_BASE + HW_POWER_RESET);
pr_info("poweroff - 4 power_reset=%08X \n",
__raw_readl(REGS_POWER_BASE + HW_POWER_RESET));
}
And the output I get is:
release pswitch to power down
pswitch power down
poweroff - 1 rtc_persistent0=00002608
poweroff - 2 rtc_persistent0=00002608
poweroff - 3 power_reset=00000000
HTLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLC
PowerPrep start initialize power...
Battery Voltage = 4.24V
5v source detected.Valid battery voltage detected.Booting from battery voltage source.
LLLCJun 16 201108:30:22
FRAC 0x92925552
memory type is DDR2
Wait for ddr ready 1power 0x00820616
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001
start test memory accress
ddr2 0x40000000
finish simple test
LLLLLLLFLCLLJUncompressing Linux... done, booting the kernel.
So the AUTO_RESTART bit is not even set before powering down. This is not the reason for reset. What else is going on?
The PSWITCH is released before the message "pswitch power down" is printed, so it cannot retrigger power on afterwards.
How come nobody got this issue already? No one is trying to power off using PSWITCH?
Regards,
Paolo