Hi, On Tue, Jul 14, 2015 at 09:42:39AM +0800, Jun Nie wrote: > 2015-07-13 20:00 GMT+08:00 Sebastian Reichel : > > On Mon, Jul 06, 2015 at 04:35:30PM +0800, Jun Nie wrote: > >> Register with kernel restart handler instead of setting arm_pm_restart > >> directly. > >> > >> [...] > >> > >> +static int zx_restart_handler(struct notifier_block *this, > >> + unsigned long mode, void *cmd) > >> +{ > >> + writel_relaxed(1, base + 0xb0); > >> + writel_relaxed(1, pcu_base + 0x34); > >> + > >> + while (1) > >> + cpu_do_idle(); > > > > mdelay(some_time); > > pr_emerg("Unable to restart system\n"); > > I do not think these code can be executed as reset will happen after > register writing and while loop will stop any further code execution. > Please point out issue if any. Please remove the while loop. Instead wait for a reasonable amount of time. If something goes wrong print an error message and return NOTIFY_DONE. You can see an example in syscon-reboot.c -- Sebastian