summaryrefslogtreecommitdiff
path: root/arch/arm/mach-socfpga/misc_s10.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-07 09:37:11 -0400
committerTom Rini <trini@konsulko.com>2019-05-07 09:37:11 -0400
commit6984044d0516d855ec621fff741f372932d28669 (patch)
treeb95d8bb5c2feee06d194440eeb38df9976ff8a25 /arch/arm/mach-socfpga/misc_s10.c
parent44237e272f1eac3b026709e76333a07b2d3a3523 (diff)
parent32e308dd796f34f85d1c088e3218fa3403a9080f (diff)
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
- Assorted stratix10 fixes. - DDR driver DM migration.
Diffstat (limited to 'arch/arm/mach-socfpga/misc_s10.c')
-rw-r--r--arch/arm/mach-socfpga/misc_s10.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-socfpga/misc_s10.c b/arch/arm/mach-socfpga/misc_s10.c
index 60c96090ce..29abc4a54c 100644
--- a/arch/arm/mach-socfpga/misc_s10.c
+++ b/arch/arm/mach-socfpga/misc_s10.c
@@ -16,6 +16,7 @@
#include <asm/arch/misc.h>
#include <asm/pl310.h>
#include <linux/libfdt.h>
+#include <asm/arch/mailbox_s10.h>
#include <dt-bindings/reset/altr,rst-mgr-s10.h>
@@ -152,5 +153,16 @@ int arch_early_init_r(void)
void do_bridge_reset(int enable, unsigned int mask)
{
+ /* Check FPGA status before bridge enable */
+ if (enable) {
+ int ret = mbox_get_fpga_config_status(MBOX_RECONFIG_STATUS);
+
+ if (ret && ret != MBOX_CFGSTAT_STATE_CONFIG)
+ ret = mbox_get_fpga_config_status(MBOX_CONFIG_STATUS);
+
+ if (ret)
+ return;
+ }
+
socfpga_bridges_reset(enable);
}