]> git.sur5r.net Git - u-boot/blobdiff - board/st/nhk8815/nhk8815.c
Merge branch 'master' of git://git.denx.de/u-boot-imx
[u-boot] / board / st / nhk8815 / nhk8815.c
index 085a5e0a42731151f8ff29b30a42f68e62551b45..faef8109db84ce0757e8fb17085ba2d91297ced0 100644 (file)
@@ -26,7 +26,9 @@
  */
 
 #include <common.h>
+#include <netdev.h>
 #include <asm/io.h>
+#include <asm/arch/gpio.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -61,9 +63,20 @@ int board_init(void)
        return 0;
 }
 
-int misc_init_r(void)
+int board_late_init(void)
 {
-       setenv("verify", "n");
+       /* Set the two I2C gpio lines to be gpio high */
+       nmk_gpio_set(__SCL, 1); nmk_gpio_set(__SDA, 1);
+       nmk_gpio_dir(__SCL, 1); nmk_gpio_dir(__SDA, 1);
+       nmk_gpio_af(__SCL, GPIO_GPIO); nmk_gpio_af(__SDA, GPIO_GPIO);
+
+       /* Reset the I2C port expander, on GPIO77 */
+       nmk_gpio_af(77, GPIO_GPIO);
+       nmk_gpio_dir(77, 1);
+       nmk_gpio_set(77, 0);
+       udelay(10);
+       nmk_gpio_set(77, 1);
+
        return 0;
 }
 
@@ -77,3 +90,14 @@ int dram_init(void)
        gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
        return 0;
 }
+
+#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