]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/keymile/km_arm/km_arm.c
arm/km: enable BOCO2 FPGA download support
[karo-tx-uboot.git] / board / keymile / km_arm / km_arm.c
index daab27bbb71e202c7f8cff4ebbbfc64e340fec5c..c8da823cb289cab715508b221408f05792535d02 100644 (file)
@@ -267,12 +267,6 @@ int board_early_init_f(void)
 #if defined(CONFIG_SYS_EEPROM_WREN)
        kw_gpio_set_valid(KM_KIRKWOOD_ENV_WP, 38);
        kw_gpio_direction_output(KM_KIRKWOOD_ENV_WP, 1);
-#endif
-#if defined(CONFIG_KM_RECONFIG_XLX)
-       /* trigger the reconfiguration of the xilinx fpga */
-       kw_gpio_set_valid(KM_XLX_PROGRAM_B_PIN, 1);
-       kw_gpio_direction_output(KM_XLX_PROGRAM_B_PIN, 0);
-       kw_gpio_direction_input(KM_XLX_PROGRAM_B_PIN);
 #endif
        return 0;
 }
@@ -282,6 +276,21 @@ int board_init(void)
        /* address of boot parameters */
        gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
 
+#if defined(CONFIG_KM_FPGA_CONFIG)
+       trigger_fpga_config();
+#endif
+
+       return 0;
+}
+
+int board_late_init(void)
+{
+#if defined(CONFIG_KM_FPGA_CONFIG)
+       wait_for_fpga_config();
+       fpga_reset();
+       toggle_eeprom_spi_bus();
+#endif
+
        return 0;
 }