summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-05-22 16:56:32 -0700
committerStefan Agner <stefan.agner@toradex.com>2017-05-30 13:49:22 -0700
commita8e0d437843393309b6db46c0e19f9da0b5d213b (patch)
treedf36ab7db9caa68d534bd2bd8c1511e2ef50d1e2 /arch
parenta2130af576ac29935b8062574f45ca6999852ba4 (diff)
ARM: imx: spare the first 16KiB of OCRAM_S for Cortex-M4
The Cortex-M4 boot vector table is located in the OCRAM_S. When building a firmware with a complete vector table at 0x00000000 Linux overwrites the vector table with suspend information. Use the higher 16KiB for suspend related information so that we can use the lower 16KiB for the Cortex-M4 core. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/pm-imx7.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/pm-imx7.c b/arch/arm/mach-imx/pm-imx7.c
index 92e1a9b0795e..de138a9d541b 100644
--- a/arch/arm/mach-imx/pm-imx7.c
+++ b/arch/arm/mach-imx/pm-imx7.c
@@ -41,6 +41,7 @@
#include "hardware.h"
#include "cpuidle.h"
+#define MX7_SUSPEND_OCRAM_OFFSET 0x4000
#define MX7_SUSPEND_OCRAM_SIZE 0x1000
#define MX7_MAX_DDRC_NUM 32
#define MX7_MAX_DDRC_PHY_NUM 16
@@ -857,7 +858,8 @@ static int __init imx7_dt_find_lpsram(unsigned long node, const char *uname,
if (!prop)
return -EINVAL;
- lpram_addr = be32_to_cpup(prop);
+ /* Add offset so we can use a full vector table for M4 */
+ lpram_addr = be32_to_cpup(prop) + MX7_SUSPEND_OCRAM_OFFSET;
/* We need to create a 1M page table entry. */
iram_tlb_io_desc.virtual = IMX_IO_P2V(lpram_addr & 0xFFF00000);