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 /examples/mem_to_mem_idma2intr.c | |
parent | 2535d60277cc295adf75cd5721dcecd840c69a63 (diff) | |
download | u-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 'examples/mem_to_mem_idma2intr.c')
-rw-r--r-- | examples/mem_to_mem_idma2intr.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/examples/mem_to_mem_idma2intr.c b/examples/mem_to_mem_idma2intr.c index 3f0fd37..3a269c9 100644 --- a/examples/mem_to_mem_idma2intr.c +++ b/examples/mem_to_mem_idma2intr.c @@ -28,7 +28,7 @@ #include <common.h> -#include <syscall.h> +#include <exports.h> #define STANDALONE @@ -36,13 +36,6 @@ #include <command.h> #include <watchdog.h> #else /* Standalone app of PPCBoot */ -#include <syscall.h> -#define printf mon_printf -#define tstc mon_tstc -#define getc mon_getc -#define putc mon_putc -#define udelay mon_udelay -#define malloc mon_malloc #define WATCHDOG_RESET() { \ *(ushort *)(CFG_IMMR + 0x1000E) = 0x556c; \ *(ushort *)(CFG_IMMR + 0x1000E) = 0xaa39; \ @@ -180,8 +173,8 @@ uint dpinit_done = 0; #ifdef STANDALONE int ctrlc (void) { - if (mon_tstc()) { - switch (mon_getc ()) { + if (tstc()) { + switch (getc ()) { case 0x03: /* ^C - Control C */ return 1; default: @@ -209,19 +202,20 @@ int memcmp(const void * cs,const void * ct,size_t count) #endif /* STANDALONE */ #ifdef STANDALONE -int mem_to_mem_idma2intr (bd_t * bd, int argc, char *argv[]) +int mem_to_mem_idma2intr (int argc, char *argv[]) #else int do_idma (bd_t * bd, int argc, char *argv[]) #endif /* STANDALONE */ { int i; + app_startup(argv); dpinit_done = 0; idma_init (); DEBUG ("Installing dma handler\n"); - mon_install_hdlr (7, dmadone_handler, (void *) bdf); + install_hdlr (7, dmadone_handler, (void *) bdf); memset ((void *) 0x100000, 'a', 512); memset ((void *) 0x200000, 'b', 512); @@ -232,7 +226,7 @@ int do_idma (bd_t * bd, int argc, char *argv[]) } DEBUG ("Uninstalling dma handler\n"); - mon_free_hdlr (7); + free_hdlr (7); return 0; } |