*/
-
#include <common.h>
-#include <syscall.h>
+#include <exports.h>
+
+DECLARE_GLOBAL_DATA_PTR;
#define STANDALONE
#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; \
#ifdef STANDALONE
int ctrlc (void)
{
- if (mon_tstc()) {
- switch (mon_getc ()) {
+ if (tstc()) {
+ switch (getc ()) {
case 0x03: /* ^C - Control C */
return 1;
default:
#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);
}
DEBUG ("Uninstalling dma handler\n");
- mon_free_hdlr (7);
+ free_hdlr (7);
return 0;
}
uint dpalloc (uint size, uint align)
{
- DECLARE_GLOBAL_DATA_PTR;
-
volatile immap_t *immr = (immap_t *) CFG_IMMR;
uint retloc;
uint align_mask, off;