The PCIe FPGAs now have to support 2 resets: one for the non traffic
affecting part (PCIe) and one for the traffic affecting part.
When the FPGA is not reconfigured, we only reset the PCIe part.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
#define FPGA_INIT_B 0x10
#define FPGA_DONE 0x20
#define FPGA_INIT_B 0x10
#define FPGA_DONE 0x20
+static int fpga_done(void)
{
int ret = 0;
u8 regval;
{
int ret = 0;
u8 regval;
+#define PCIE_RST 0x10
+#define TRAFFIC_RST 0x04
int fpga_reset(void)
{
int ret = 0;
int fpga_reset(void)
{
int ret = 0;
if (!check_boco2()) {
/* we do not have BOCO2, this is not really used */
return 0;
}
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);
if (ret)
return ret;
/* small delay for the pulse */
udelay(10);
- ret = boco_set_bits(PRST1, BRIDGE_RST);
+ ret = boco_set_bits(PRST1, resets);