summaryrefslogtreecommitdiffstats
path: root/board/keymile/km_arm/fpga_config.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-02-17 14:22:02 -0500
committerTom Rini <trini@ti.com>2014-02-17 14:22:02 -0500
commitc4d376fd1c2bce8d64cec0431dd3f24957b6dec4 (patch)
treede17e3a67fa4a48f3b9571bff2399cb0a24558bc /board/keymile/km_arm/fpga_config.c
parentb1ad03c242dae3712b9be66026f5d8c6f919c00b (diff)
parent5e77a745b24d9b98aa635293972f04fd6f0c6b38 (diff)
downloadblackbird-obmc-uboot-c4d376fd1c2bce8d64cec0431dd3f24957b6dec4.tar.gz
blackbird-obmc-uboot-c4d376fd1c2bce8d64cec0431dd3f24957b6dec4.zip
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'board/keymile/km_arm/fpga_config.c')
-rw-r--r--board/keymile/km_arm/fpga_config.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/board/keymile/km_arm/fpga_config.c b/board/keymile/km_arm/fpga_config.c
index cbfc7d2175..51a3cfe647 100644
--- a/board/keymile/km_arm/fpga_config.c
+++ b/board/keymile/km_arm/fpga_config.c
@@ -189,6 +189,31 @@ int wait_for_fpga_config(void)
return 0;
}
+#if defined(KM_PCIE_RESET_MPP7)
+
+#define KM_PEX_RST_GPIO_PIN 7
+int fpga_reset(void)
+{
+ if (!check_boco2()) {
+ /* we do not have BOCO2, this is not really used */
+ return 0;
+ }
+
+ printf("PCIe reset through GPIO7: ");
+ /* apply PCIe reset via GPIO */
+ kw_gpio_set_valid(KM_PEX_RST_GPIO_PIN, 1);
+ kw_gpio_direction_output(KM_PEX_RST_GPIO_PIN, 1);
+ kw_gpio_set_value(KM_PEX_RST_GPIO_PIN, 0);
+ udelay(1000*10);
+ kw_gpio_set_value(KM_PEX_RST_GPIO_PIN, 1);
+
+ printf(" done\n");
+
+ return 0;
+}
+
+#else
+
#define PRST1 0x4
#define PCIE_RST 0x10
#define TRAFFIC_RST 0x04
@@ -219,6 +244,7 @@ int fpga_reset(void)
return 0;
}
+#endif
/* the FPGA was configured, we configure the BOCO2 so that the EEPROM
* is available from the Bobcat SPI bus */
OpenPOWER on IntegriCloud