summaryrefslogtreecommitdiff
path: root/tools/updater/update.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-07-24 23:38:38 +0000
committerwdenk <wdenk>2003-07-24 23:38:38 +0000
commit27b207fd0a0941b03f27e2a82c0468b1a090c745 (patch)
tree4d339d7a2a00889f09a876425ce430be57de56e9 /tools/updater/update.c
parent2535d60277cc295adf75cd5721dcecd840c69a63 (diff)
downloadu-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.zip
u-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.gz
u-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.bz2
* 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 'tools/updater/update.c')
-rw-r--r--tools/updater/update.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/updater/update.c b/tools/updater/update.c
index 26204fb..b6d50d5 100644
--- a/tools/updater/update.c
+++ b/tools/updater/update.c
@@ -1,5 +1,5 @@
#include <common.h>
-#include <syscall.h>
+#include <exports.h>
extern unsigned long __dummy;
void do_reset (void);
@@ -8,14 +8,14 @@ void do_updater(void);
void _main(void)
{
int i;
- mon_printf("U-Boot Firmware Updater\n\n\n");
- mon_printf("****************************************************\n"
+ printf("U-Boot Firmware Updater\n\n\n");
+ printf("****************************************************\n"
"* ATTENTION!! PLEASE READ THIS NOTICE CAREFULLY! *\n"
"****************************************************\n\n"
"This program will update your computer's firmware.\n"
"Do NOT remove the disk, reset the machine, or do\n"
"anything that might disrupt functionality. If this\n");
- mon_printf("Program fails, your computer might be unusable, and\n"
+ printf("Program fails, your computer might be unusable, and\n"
"you will need to return your board for reflashing.\n"
"If you find this too risky, remove the diskette and\n"
"switch off your machine now. Otherwise press the \n"
@@ -23,8 +23,8 @@ void _main(void)
do
{
char x;
- while (!mon_tstc());
- x = mon_getc();
+ while (!tstc());
+ x = getc();
if (x == ' ') break;
} while (1);
@@ -32,14 +32,14 @@ void _main(void)
i = 5;
- mon_printf("\nUpdate done. Please remove diskette.\n");
- mon_printf("The machine will automatically reset in %d seconds\n", i);
- mon_printf("You can switch off/reset now when the floppy is removed\n\n");
+ printf("\nUpdate done. Please remove diskette.\n");
+ printf("The machine will automatically reset in %d seconds\n", i);
+ printf("You can switch off/reset now when the floppy is removed\n\n");
while (i)
{
- mon_printf("Resetting in %d\r", i);
- mon_udelay(1000000);
+ printf("Resetting in %d\r", i);
+ udelay(1000000);
i--;
}
do_reset();
@@ -57,11 +57,11 @@ void do_updater(void)
int rc;
flash_sect_protect(0, 0xFFF00000, 0xFFF7FFFF);
- mon_printf("Erasing ");
+ printf("Erasing ");
flash_sect_erase(0xFFF00000, 0xFFF7FFFF);
- mon_printf("Writing ");
+ printf("Writing ");
rc = flash_write((uchar *)addr, 0xFFF00000, 0x7FFFF);
- if (rc != 0) mon_printf("\nFlashing failed due to error %d\n", rc);
- else mon_printf("\ndone\n");
+ if (rc != 0) printf("\nFlashing failed due to error %d\n", rc);
+ else printf("\ndone\n");
flash_sect_protect(1, 0xFFF00000, 0xFFF7FFFF);
}