2013-02-13 10:06:42 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
|
|
|
|
*
|
|
|
|
* GPLv2 only
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <io.h>
|
|
|
|
|
|
|
|
#include <mach/devices.h>
|
2013-02-16 18:23:45 +00:00
|
|
|
#include <mach/sysregs.h>
|
2013-02-13 10:06:42 +00:00
|
|
|
|
|
|
|
void __noreturn reset_cpu(ulong addr)
|
|
|
|
{
|
|
|
|
hingbank_set_pwr_hard_reset();
|
|
|
|
asm(" wfi");
|
|
|
|
|
|
|
|
while(1);
|
|
|
|
}
|
2013-02-16 21:07:59 +00:00
|
|
|
|
|
|
|
void __noreturn poweroff()
|
|
|
|
{
|
|
|
|
shutdown_barebox();
|
|
|
|
|
|
|
|
hingbank_set_pwr_shutdown();
|
2013-02-20 12:55:36 +00:00
|
|
|
asm(" wfi");
|
|
|
|
|
2013-02-16 21:07:59 +00:00
|
|
|
while(1);
|
|
|
|
}
|