]> git.sur5r.net Git - u-boot/blobdiff - board/keymile/km_arm/fpga_config.c
Tegra: T30: Beaver: Fix board/board_name env vars, s/b beaver, not cardhu
[u-boot] / board / keymile / km_arm / fpga_config.c
index 8ac63931ec5c288355be2156f92ed01eb7265a83..66a3baf0f71a5b6d79b8f16232a23cee5944806f 100644 (file)
@@ -99,7 +99,7 @@ static int boco_set_bits(u8 reg, u8 flags)
 #define FPGA_INIT_B    0x10
 #define FPGA_DONE      0x20
 
-static int fpga_done()
+static int fpga_done(void)
 {
        int ret = 0;
        u8 regval;
@@ -206,25 +206,30 @@ int wait_for_fpga_config(void)
 }
 
 #define PRST1          0x4
-#define BRIDGE_RST     0x4
+#define PCIE_RST       0x10
+#define TRAFFIC_RST    0x04
 
 int fpga_reset(void)
 {
        int ret = 0;
+       u8 resets;
 
        if (!check_boco2()) {
                /* we do not have BOCO2, this is not really used */
                return 0;
        }
 
-       ret = boco_clear_bits(PRST1, BRIDGE_RST);
+       /* if we have skipped, we only want to reset the PCIe part */
+       resets = skip ? PCIE_RST : PCIE_RST | TRAFFIC_RST;
+
+       ret = boco_clear_bits(PRST1, resets);
        if (ret)
                return ret;
 
        /* small delay for the pulse */
        udelay(10);
 
-       ret = boco_set_bits(PRST1, BRIDGE_RST);
+       ret = boco_set_bits(PRST1, resets);
        if (ret)
                return ret;
 
@@ -248,4 +253,3 @@ int toggle_eeprom_spi_bus(void)
 
        return 0;
 }
-