* (C) Copyright 2012
* Valentin Lontgchamp, Keymile AG, valentin.longchamp@keymile.com
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301 USA
+ * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#define FPGA_INIT_B 0x10
#define FPGA_DONE 0x20
-static int fpga_done()
+static int fpga_done(void)
{
int ret = 0;
u8 regval;
}
#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;
return 0;
}
-