diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2009-01-08 10:15:32 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2009-01-08 10:15:32 +0000 |
commit | 4ed78f5c72649002d78d48d9a117826a5d9c36f9 (patch) | |
tree | 7ebe8ac19acabd74117a638da8dbb0c1cedf2600 /firmware/target/mips/ingenic_jz47xx/system-jz4740.c | |
parent | 32d9752dcc73fd1aaa81d484c3d426ca7856b146 (diff) | |
download | rockbox-4ed78f5c72649002d78d48d9a117826a5d9c36f9.tar.gz rockbox-4ed78f5c72649002d78d48d9a117826a5d9c36f9.zip |
Clean up panicf and introduce system_exception_wait to do further target tasks and wait for a button when an unrecoverable error has occurred (panic, UIE, etc.). Returning from that function should reboot or don't return from it. Move UIE and __div0 for ARM to its own file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19716 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/system-jz4740.c')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/system-jz4740.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/system-jz4740.c b/firmware/target/mips/ingenic_jz47xx/system-jz4740.c index c741d9f311..033b42214b 100644 --- a/firmware/target/mips/ingenic_jz47xx/system-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/system-jz4740.c | |||
@@ -887,6 +887,16 @@ void system_reboot(void) | |||
887 | while (1); | 887 | while (1); |
888 | } | 888 | } |
889 | 889 | ||
890 | void system_exception_wait(void) | ||
891 | { | ||
892 | /* check for power button without including any .h file */ | ||
893 | while (1) | ||
894 | { | ||
895 | if( (~(*(volatile unsigned int *)(0xB0010300))) & (1 << 29) ) | ||
896 | break; | ||
897 | } | ||
898 | } | ||
899 | |||
890 | void power_off(void) | 900 | void power_off(void) |
891 | { | 901 | { |
892 | /* Put system into hibernate mode */ | 902 | /* Put system into hibernate mode */ |