@@ -13,6 +13,7 @@
#include <ns16550.h>
#include <spi_flash.h>
#include <watchdog.h>
+#include <asm/arch/fpga_manager.h>
#include <asm/arch/misc.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/reset_manager.h>
@@ -126,10 +127,16 @@ int print_cpuinfo(void)
void do_bridge_reset(int enable, unsigned int mask)
{
- if (enable)
- socfpga_reset_deassert_bridges_handoff();
- else
+ if (enable) {
+ if (is_fpgamgr_user_mode()) {
+ socfpga_reset_deassert_bridges_handoff();
+ } else {
+ puts("Bridges: Failed to enable because FPGA is not ");
+ puts("in user mode\n");
+ }
+ } else {
socfpga_bridges_reset();
+ }
}
/*