]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/gateworks/gw_ventana/gw_ventana.c
imx: ventana: add i210 support
[karo-tx-uboot.git] / board / gateworks / gw_ventana / gw_ventana.c
index 8d086f84abea5381b185d70558de0cc633b3d82f..303b13a0f89cfa22dd25948a3ef98b614a85e7f4 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/imx-common/mxc_i2c.h>
 #include <asm/imx-common/boot_mode.h>
 #include <asm/imx-common/sata.h>
+#include <asm/imx-common/spi.h>
 #include <asm/imx-common/video.h>
 #include <jffs2/load_kernel.h>
 #include <hwconfig.h>
@@ -356,9 +357,14 @@ iomux_v3_cfg_t const ecspi1_pads[] = {
        IOMUX_PADS(PAD_EIM_D16__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL)),
 };
 
+int board_spi_cs_gpio(unsigned bus, unsigned cs)
+{
+       return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(3, 19)) : -1;
+}
+
 static void setup_spi(void)
 {
-       gpio_direction_output(CONFIG_SF_DEFAULT_CS, 1);
+       gpio_direction_output(IMX_GPIO_NR(3, 19), 1);
        SETUP_IOMUX_PADS(ecspi1_pads);
 }
 #endif
@@ -398,6 +404,10 @@ int board_eth_init(bd_t *bis)
                cpu_eth_init(bis);
 #endif
 
+#ifdef CONFIG_E1000
+       e1000_initialize(bis);
+#endif
+
 #ifdef CONFIG_CI_UDC
        /* For otg ethernet*/
        usb_eth_initialize(bis);
@@ -1477,7 +1487,7 @@ int misc_init_r(void)
  *  - board (full model from EEPROM)
  *  - peripherals removed from DTB if not loaded on board (per EEPROM config)
  */
-void ft_board_setup(void *blob, bd_t *bd)
+int ft_board_setup(void *blob, bd_t *bd)
 {
        struct ventana_board_info *info = &ventana_info;
        struct ventana_eeprom_config *cfg;
@@ -1489,7 +1499,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        if (getenv("fdt_noauto")) {
                puts("   Skiping ft_board_setup (fdt_noauto defined)\n");
-               return;
+               return 0;
        }
 
        /* Update partition nodes using info from mtdparts env var */
@@ -1498,7 +1508,7 @@ void ft_board_setup(void *blob, bd_t *bd)
 
        if (!model) {
                puts("invalid board info: Leaving FDT fully enabled\n");
-               return;
+               return 0;
        }
        printf("   Adjusting FDT per EEPROM for %s...\n", model);
 
@@ -1517,7 +1527,7 @@ void ft_board_setup(void *blob, bd_t *bd)
         */
        if (getenv("fdt_noconfig")) {
                puts("   Skiping periperhal config (fdt_noconfig defined)\n");
-               return;
+               return 0;
        }
        cfg = econfig;
        while (cfg->name) {
@@ -1527,6 +1537,8 @@ void ft_board_setup(void *blob, bd_t *bd)
                }
                cfg++;
        }
+
+       return 0;
 }
 #endif /* defined(CONFIG_OF_FLAT_TREE) && defined(CONFIG_OF_BOARD_SETUP) */