Merge mach-sun[45]i/pm.

v2: rebase, rename a magic constant.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Remove superfluous functions from pm.c and reindent.

Signed-off-by: Michal Suchanek <hramrach@gmail.com>