diff options
-rw-r--r-- | arch/arm/boards/avnet-zedboard/lowlevel.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c index b50c36b288..9b90ef112b 100644 --- a/arch/arm/boards/avnet-zedboard/lowlevel.c +++ b/arch/arm/boards/avnet-zedboard/lowlevel.c @@ -31,6 +31,16 @@ extern char __dtb_zynq_zed_start[]; static void avnet_zedboard_ps7_init(void) { + /* + * Read OCM mapping configuration, if only the upper 64 KByte are + * mapped to the high address, it's very likely that we just got control + * from the BootROM. If the mapping is changed something other than the + * BootROM was running before us. Skip PS7 init to avoid cutting the + * branch we are sitting on in that case. + */ + if ((readl(0xf8000910) & 0xf) != 0x8) + return; + /* open sesame */ writel(0x0000DF0D, ZYNQ_SLCR_UNLOCK); |