summaryrefslogtreecommitdiff
path: root/lib_nios
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-10-19 23:22:11 +0000
committerwdenk <wdenk>2003-10-19 23:22:11 +0000
commita3ad8e26a4ac96838b2963cb462770c70c9f6443 (patch)
treebe6c86113d1ce3da1d26b19b305d77d00370703f /lib_nios
parentd7281f41094bee59eca958de3c04995a2f79034a (diff)
downloadu-boot-a3ad8e26a4ac96838b2963cb462770c70c9f6443.tar.gz
* Patch by Steven Scholz, 18 Oct 2003:
Fix AT91RM9200 ethernet driver * Patch by Nye Liu, 17 Oct 2003: Fix typo in include/mpc8xx.h * Patch by Richard Woodruff, 16 Oct 03: Fixes for cpu/arm925/interrupt.c - Initialize timestamp & lastdec vars. - fix timestamp overflows. - fix lastdec overflow. - smarter normalization to allow udelay() below 1ms to work. * Patch by Scott McNutt, 16 Oct add networking support for the Altera Nios Development Kit, Cyclone Edition (DK-1C20) * Patch by Jon Diekema, 14 Oct 2003: add hint about doc/README.silent to README file
Diffstat (limited to 'lib_nios')
-rw-r--r--lib_nios/board.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib_nios/board.c b/lib_nios/board.c
index c81c0011e2..8718fecc83 100644
--- a/lib_nios/board.c
+++ b/lib_nios/board.c
@@ -27,6 +27,7 @@
#include <common.h>
#include <devices.h>
#include <watchdog.h>
+#include <net.h>
/*
@@ -107,6 +108,8 @@ void board_init (void)
bd_t *bd;
init_fnc_t **init_fnc_ptr;
+ char *s, *e;
+ int i;
/* Pointer is writable since we allocated a register for it.
* Nios treats CFG_GBL_DATA_OFFSET as an address.
@@ -129,6 +132,12 @@ void board_init (void)
bd->bi_sramstart= CFG_SRAM_BASE;
bd->bi_sramsize = CFG_SRAM_SIZE;
bd->bi_baudrate = CONFIG_BAUDRATE;
+ bd->bi_ip_addr = getenv_IPaddr ("ipaddr");
+ s = getenv ("ethaddr");
+ for (i = 0; i < 6; ++i) {
+ bd->bi_enetaddr[i] = s ? simple_strtoul (s, &e, 16) : 0;
+ if (s) s = (*e) ? e + 1 : e;
+ }
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr) () != 0) {
@@ -164,3 +173,4 @@ void hang (void)
puts("### ERROR ### Please reset board ###\n");
for (;;);
}
+