#include <command.h>
#include <malloc.h>
#include <devices.h>
-#include <syscall.h>
#ifdef CONFIG_8xx
#include <mpc8xx.h>
#endif
#ifdef CONFIG_5xx
#include <mpc5xx.h>
#endif
+#ifdef CONFIG_MPC5XXX
+#include <mpc5xxx.h>
+#endif
#if (CONFIG_COMMANDS & CFG_CMD_IDE)
#include <ide.h>
#endif
return (buf);
}
-static void syscalls_init (void)
-{
- ulong *addr;
-
- syscall_tbl[SYSCALL_MALLOC] = (void *) malloc;
- syscall_tbl[SYSCALL_FREE] = (void *) free;
-
- syscall_tbl[SYSCALL_INSTALL_HDLR] = (void *) irq_install_handler;
- syscall_tbl[SYSCALL_FREE_HDLR] = (void *) irq_free_handler;
- syscall_tbl[SYSCALL_GET_TIMER] = (void *)get_timer;
- syscall_tbl[SYSCALL_UDELAY] = (void *)udelay;
-
- addr = (ulong *) 0xc00; /* syscall ISR addr */
-
- /* patch ISR code */
- *addr++ |= (ulong) syscall_tbl >> 16;
- *addr++ |= (ulong) syscall_tbl & 0xFFFF;
- *addr++ |= NR_SYSCALLS >> 16;
- *addr++ |= NR_SYSCALLS & 0xFFFF;
-
-#ifndef CONFIG_5XX
- flush_cache (0x0C00, 0x10);
-#endif
- /* Initialize syscalls stack pointer */
- addr = (ulong *) 0xCFC;
- *addr = (ulong)addr;
-#ifndef CONFIG_5xx
- flush_cache ((ulong)addr, 0x10);
-#endif
-}
-
/*
* All attempts to come up with a "common" initialization sequence
* that works for all boards and architectures failed: some of the
prt_8260_clks,
#endif /* CONFIG_8260 */
checkcpu,
+#if defined(CONFIG_MPC5XXX)
+ prt_mpc5xxx_clks,
+#endif /* CONFIG_MPC5XXX */
checkboard,
INIT_FUNC_WATCHDOG_INIT
#if defined(CONFIG_BMW) || \
#if defined(CONFIG_8xx) || defined(CONFIG_8260) || defined(CONFIG_5xx)
bd->bi_immr_base = CFG_IMMR; /* base of IMMR register */
#endif
+#if defined(CONFIG_MPC5XXX)
+ bd->bi_mbar_base = CFG_MBAR; /* base of internal registers */
+#endif
bd->bi_bootflags = bootflag; /* boot / reboot flag (for LynxOS) */
bd->bi_sccfreq = gd->scc_clk;
bd->bi_vco = gd->vco_out;
#endif /* CONFIG_8260 */
-
+#if defined(CONFIG_MPC5XXX)
+ bd->bi_ipbfreq = gd->ipb_clk;
+ bd->bi_pcifreq = gd->pci_clk;
+#endif /* CONFIG_MPC5XXX */
bd->bi_baudrate = gd->baudrate; /* Console Baudrate */
#ifdef CFG_EXTBDINFO
WATCHDOG_RESET();
- memcpy (id, gd, sizeof (gd_t));
+ memcpy (id, (void *)gd, sizeof (gd_t));
relocate_code (addr_sp, id, addr);
/* Initialize devices */
devices_init ();
- /* allocate syscalls table (console_init_r will fill it in */
- syscall_tbl = (void **) malloc (NR_SYSCALLS * sizeof (void *));
+ /* Initialize the jump table for applications */
+ jumptable_init ();
/* Initialize the console (after the relocation and devices init) */
console_init_r ();
-/** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/
- syscalls_init ();
#if defined(CONFIG_CCM) || \
defined(CONFIG_COGENT) || \