From 3e38691e8f7aa0d9b498d76c7279ddec6e4946f3 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sat, 5 Apr 2003 00:53:31 +0000 Subject: * Patch by Arun Dharankar, 4 Apr 2003: Add IDMA example code (tested on 8260 only) * Add support for Purple Board (MIPS64 5Kc) * Add support for MIPS64 5Kc CPUs * Fix missing setting of "loadaddr" and "bootfile" on ARM and MIPS * Patch by Denis Peter, 04 Apr 2003: - update MIP405-4 board * Patches by Denis Peter, 03 April 2003: - fix PCI IRQs on MPL boards - fix two more un-relocated pointer problems * Fix behaviour of "run" command: - print error message iv variable does not exist - terminate processing of arguments in case of error * Patches by Peter Figuli, 10 Mar 2003 - Add support for BTUART on PXA platform - Add support for WEP EP250 (PXA) board * Fix flash problems on INCA-IP; add tool to allow bruning images to flash using a BDI2000 * Implement fix for I2C Edge Conditions problem for all boards that use the bit-banging driver (common/soft_i2c.c) * Add patches by Robert Schwebel, 31 Mar 2003: - csb226 board: bring in sync with innokom/memsetup.S - csb226 board: fix MDREFR handling - misc doc fixes / extensions - innokom board: cleanup, MDREFR fix in memsetup.S, config update - add BOOT_PROGRESS to armlinux.c --- lib_mips/board.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'lib_mips') diff --git a/lib_mips/board.c b/lib_mips/board.c index a07cb3fe4a..4bab3c5855 100644 --- a/lib_mips/board.c +++ b/lib_mips/board.c @@ -177,6 +177,9 @@ void board_init_f(ulong bootflag) bd_t *bd; init_fnc_t **init_fnc_ptr; ulong addr, addr_sp, len = CFG_MONITOR_LEN; +#ifdef CONFIG_PURPLE + void copy_code (ulong); +#endif /* Pointer is writable since we allocated a register for it. */ @@ -271,6 +274,14 @@ void board_init_f(ulong bootflag) bd->bi_baudrate = gd->baudrate; /* Console Baudrate */ memcpy (id, gd, sizeof (gd_t)); + + /* On the purple board we copy the code in a special way + * in order to solve flash problems + */ +#ifdef CONFIG_PURPLE + copy_code(addr); +#endif + relocate_code (addr_sp, id, addr); /* NOTREACHED - relocate_code() does not return */ @@ -383,6 +394,21 @@ void board_init_r (gd_t *id, ulong dest_addr) console_init_r (); /** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/ + /* Initialize from environment */ + if ((s = getenv ("loadaddr")) != NULL) { + load_addr = simple_strtoul (s, NULL, 16); + } +#if (CONFIG_COMMANDS & CFG_CMD_NET) + if ((s = getenv ("bootfile")) != NULL) { + copy_filename (BootFile, s, sizeof (BootFile)); + } +#endif /* CFG_CMD_NET */ + +#if defined(CONFIG_MISC_INIT_R) + /* miscellaneous platform dependent initialisations */ + misc_init_r (); +#endif + #if (CONFIG_COMMANDS & CFG_CMD_NET) && defined(CONFIG_NET_MULTI) puts ("Net: "); eth_initialize(gd->bd); -- cgit v1.2.1