summaryrefslogtreecommitdiff
path: root/board/xilinx/ml300/ml300.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-09-29 22:43:59 +0000
committerwdenk <wdenk>2004-09-29 22:43:59 +0000
commita06752e36be7fc74b4a928026b63b1bf1764497e (patch)
treeb71ddbcee4e4cc03e8ea98738b605a1c3879a703 /board/xilinx/ml300/ml300.c
parentda93ed8147a000505ac7b7ed4e2fb50532596a3c (diff)
downloadu-boot-imx-a06752e36be7fc74b4a928026b63b1bf1764497e.zip
u-boot-imx-a06752e36be7fc74b4a928026b63b1bf1764497e.tar.gz
u-boot-imx-a06752e36be7fc74b4a928026b63b1bf1764497e.tar.bz2
* 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.
Diffstat (limited to 'board/xilinx/ml300/ml300.c')
-rw-r--r--board/xilinx/ml300/ml300.c31
1 files changed, 25 insertions, 6 deletions
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 <asm/processor.h>
#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