]> git.sur5r.net Git - u-boot/blobdiff - board/delta/delta.c
x86: Rearrange linker script
[u-boot] / board / delta / delta.c
index b127ac8cab7b1e9b5569c3618cdfb6ad9362a177..68c39d23ce19be660ea8cfa205d07ff7de359c20 100644 (file)
@@ -1,10 +1,6 @@
 /*
- * (C) Copyright 2002
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
- *
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
- * Marius Groeger <mgroeger@sysgo.de>
+ * (C) Copyright 2006
+ * DENX Software Engineering
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -26,6 +22,7 @@
  */
 
 #include <common.h>
+#include <netdev.h>
 #include <i2c.h>
 #include <da9030.h>
 #include <malloc.h>
@@ -98,7 +95,6 @@ int board_late_init(void)
        return 0;
 }
 
-
 /*
  * Magic Key Handling, mainly copied from board/lwmon/lwmon.c
  */
@@ -244,7 +240,7 @@ static uchar *key_match (uchar *kbd_data)
        return (NULL);
 }
 
-int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        uchar kbd_data[KEYBD_DATALEN];
        char keybd_env[2 * KEYBD_DATALEN + 1];
@@ -264,8 +260,8 @@ int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 U_BOOT_CMD(
           kbd, 1,      1,      do_kbd,
-          "kbd     - read keyboard status\n",
-          NULL
+          "read keyboard status",
+          ""
 );
 
 #endif /* DELTA_CHECK_KEYBD */
@@ -309,8 +305,8 @@ static void init_DA9030()
        GPCR0 = (1<<17);        /* drive GPIO17 low */
        GPSR0 = (1<<17);        /* drive GPIO17 high */
 
-#if CFG_DA9030_EXTON_DELAY
-       udelay((unsigned long) CFG_DA9030_EXTON_DELAY); /* wait for DA9030 */
+#if CONFIG_SYS_DA9030_EXTON_DELAY
+       udelay((unsigned long) CONFIG_SYS_DA9030_EXTON_DELAY);  /* wait for DA9030 */
 #endif
        GPCR0 = (1<<17);        /* drive GPIO17 low */
 
@@ -324,6 +320,12 @@ static void init_DA9030()
                return;
        }
 
+       val = 0x80;
+       if(i2c_write(addr, IRQ_MASK_B, 1, &val, 1)) {
+               printf("Error accessing DA9030 via i2c.\n");
+               return;
+       }
+
        i2c_reg_write(addr, REG_CONTROL_1_97, 0xfd); /* disable LDO1, enable LDO6 */
        i2c_reg_write(addr, LDO2_3, 0xd1);      /* LDO2 =1,9V, LDO3=3,1V */
        i2c_reg_write(addr, LDO4_5, 0xcc);      /* LDO2 =1,9V, LDO3=3,1V */
@@ -362,3 +364,14 @@ void hw_watchdog_reset(void)
        i2c_reg_write(addr, SYS_CONTROL_A, val);
 }
 #endif
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_SMC91111
+       rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
+#endif
+       return rc;
+}
+#endif