From a06752e36be7fc74b4a928026b63b1bf1764497e Mon Sep 17 00:00:00 2001 From: wdenk Date: Wed, 29 Sep 2004 22:43:59 +0000 Subject: * Patch by Sean Chang, 9 Aug 2004: - Added I2C support for ML300. - Added support for ML300 to read out its environment information stored on the EEPROM. - Added support to use board specific parameters as part of U-Boot's environment information. - Updated MLD files to support configuration for new features above. * Patches by Travis Sawyer, 5 Aug 2004: - Remove incorrect bridge settings for eth group 6 - Add call to setup bridge in ppc_440x_eth_initialize - Fix ppc_440x_eth_init to reset the phy only if its the first time through, otherwise, just check the phy for the autonegotiated speed/duplex. This allows the use of netconsole - only print the speed/duplex the first time the phy is reset. --- board/xilinx/ml300/ml300.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'board/xilinx/ml300/ml300.c') diff --git a/board/xilinx/ml300/ml300.c b/board/xilinx/ml300/ml300.c index dbe8a8a..f335fc1 100644 --- a/board/xilinx/ml300/ml300.c +++ b/board/xilinx/ml300/ml300.c @@ -42,6 +42,10 @@ #include #include "xparameters.h" +#ifdef CFG_ENV_IS_IN_EEPROM +extern void convert_env(void); +#endif + int board_pre_init(void) { @@ -51,22 +55,25 @@ board_pre_init(void) int checkboard(void) { - unsigned char *s = getenv("serial#"); - unsigned char *e; + uchar tmp[64]; /* long enough for environment variables */ + uchar *s, *e; + int i = getenv_r("L", tmp, sizeof (tmp)); - if (!s || strncmp(s, "ML300", 9)) { + if (i < 0) { printf("### No HW ID - assuming ML300"); } else { - for (e = s; *e; ++e) { + for (e = tmp; *e; ++e) { if (*e == ' ') break; } - for (; s < e; ++s) { + printf("### Board Serial# is "); + + for (s = tmp; s < e; ++s) { putc(*s); } - } + } putc('\n'); return (0); @@ -107,3 +114,15 @@ get_PCI_freq(void) val = sys_info.freqPCI; return val; } + +#ifdef CONFIG_MISC_INIT_R + +int +misc_init_r() +{ + /* convert env name and value to u-boot standard */ + convert_env(); + return 0; +} + +#endif -- cgit v1.1