diff options
author | wdenk <wdenk> | 2003-07-24 23:38:38 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-07-24 23:38:38 +0000 |
commit | 27b207fd0a0941b03f27e2a82c0468b1a090c745 (patch) | |
tree | 4d339d7a2a00889f09a876425ce430be57de56e9 /post | |
parent | 2535d60277cc295adf75cd5721dcecd840c69a63 (diff) | |
download | device_goldelico_gta04_u-boot-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.gz device_goldelico_gta04_u-boot-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.bz2 device_goldelico_gta04_u-boot-27b207fd0a0941b03f27e2a82c0468b1a090c745.zip |
* Implement new mechanism to export U-Boot's functions to standalone
applications: instead of using (PPC-specific) system calls we now
use a jump table; please see doc/README.standalone for details
* Patch by Dave Westwood, 24 Jul 2003:
added support for Unity OS (a proprietary OS)
Diffstat (limited to 'post')
-rw-r--r-- | post/post.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/post/post.c b/post/post.c index 0474f1f75..28dd5f79a 100644 --- a/post/post.c +++ b/post/post.c @@ -64,18 +64,27 @@ void post_bootmode_init (void) { DECLARE_GLOBAL_DATA_PTR; int bootmode = post_bootmode_get (0); - - if (post_hotkeys_pressed(gd) && !(bootmode & POST_POWERTEST)) { - bootmode = POST_SLOWTEST; + int newword; + + if (post_hotkeys_pressed() && !(bootmode & POST_POWERTEST)) { + newword = BOOTMODE_MAGIC | POST_SLOWTEST; } else if (bootmode == 0) { - bootmode = POST_POWERON; + newword = BOOTMODE_MAGIC | POST_POWERON; } else if (bootmode == POST_POWERON || bootmode == POST_SLOWTEST) { - bootmode = POST_NORMAL; + newword = BOOTMODE_MAGIC | POST_NORMAL; } else { - return; + /* Use old value */ + newword = post_word_load () & ~POST_COLDBOOT; } - post_word_store (BOOTMODE_MAGIC | bootmode); + if (bootmode == 0) + { + /* We are booting after power-on */ + newword |= POST_COLDBOOT; + } + + post_word_store (newword); + /* Reset activity record */ gd->post_log_word = 0; } @@ -89,7 +98,7 @@ int post_bootmode_get (unsigned int *last_test) return 0; } - bootmode = word & 0xFF; + bootmode = word & 0x7F; if (last_test && (bootmode & POST_POWERTEST)) { *last_test = (word >> 8) & 0xFF; |