aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitaly Andrianov2014-07-30 13:31:14 -0500
committerVitaly Andrianov2015-01-21 08:53:04 -0600
commitbaefb659b6cb68b1780cc24573b9a4887589eb42 (patch)
tree55bac0d7314d7ee61a9c6b8c9a44ccdb0c739ee4
parent3b15e21b814f03e7530b206e7d21df0fda83dcf8 (diff)
downloadlinux-baefb659b6cb68b1780cc24573b9a4887589eb42.tar.gz
linux-baefb659b6cb68b1780cc24573b9a4887589eb42.tar.xz
linux-baefb659b6cb68b1780cc24573b9a4887589eb42.zip
arm: keystone2: kexec: change load address for recovery kernel
The recovery kernel has to be loaded in to the different address. Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
-rw-r--r--arch/arm/mach-keystone/Kconfig4
-rw-r--r--arch/arm/mach-keystone/Makefile.boot3
-rw-r--r--arch/arm/mach-keystone/include/mach/memory.h20
3 files changed, 22 insertions, 5 deletions
diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
index 10d56b1fd53..3f4f3415505 100644
--- a/arch/arm/mach-keystone/Kconfig
+++ b/arch/arm/mach-keystone/Kconfig
@@ -5,6 +5,10 @@ config TI_KEYSTONE
5 5
6menu "TI KeyStone Implementations" 6menu "TI KeyStone Implementations"
7 7
8config KEYSTONE_RECOVERY_KERNEL
9 bool "Build recovery kernel"
10 default n
11
8config KEYSTONE2_DMA_COHERENT 12config KEYSTONE2_DMA_COHERENT
9 bool "MPAX based coherency support" 13 bool "MPAX based coherency support"
10 default n 14 default n
diff --git a/arch/arm/mach-keystone/Makefile.boot b/arch/arm/mach-keystone/Makefile.boot
index f3835c43af6..987cd83548b 100644
--- a/arch/arm/mach-keystone/Makefile.boot
+++ b/arch/arm/mach-keystone/Makefile.boot
@@ -1 +1,2 @@
1zreladdr-y := 0x80008000 1zreladdr-$(CONFIG_KEYSTONE_RECOVERY_KERNEL) := 0x90008000
2zreladdr-y ?= 0x80008000
diff --git a/arch/arm/mach-keystone/include/mach/memory.h b/arch/arm/mach-keystone/include/mach/memory.h
index 514682e9f99..411a4d98f32 100644
--- a/arch/arm/mach-keystone/include/mach/memory.h
+++ b/arch/arm/mach-keystone/include/mach/memory.h
@@ -19,13 +19,19 @@
19#define MAX_PHYSMEM_BITS 36 19#define MAX_PHYSMEM_BITS 36
20#define SECTION_SIZE_BITS 34 20#define SECTION_SIZE_BITS 34
21 21
22#define KEYSTONE_LOW_PHYS_START 0x80000000ULL 22#ifdef CONFIG_KEYSTONE_RECOVERY_KERNEL
23#define KEYSTONE_LOW_PHYS_SIZE 0x80000000ULL /* 2G */ 23#define REC_OFFSET 0x10000000ULL
24#else
25#define REC_OFFSET 0
26#endif
27
28#define KEYSTONE_LOW_PHYS_START (0x80000000ULL + REC_OFFSET)
29#define KEYSTONE_LOW_PHYS_SIZE (0x80000000ULL - REC_OFFSET)
24#define KEYSTONE_LOW_PHYS_END (KEYSTONE_LOW_PHYS_START + \ 30#define KEYSTONE_LOW_PHYS_END (KEYSTONE_LOW_PHYS_START + \
25 KEYSTONE_LOW_PHYS_SIZE - 1) 31 KEYSTONE_LOW_PHYS_SIZE - 1)
26 32
27#define KEYSTONE_HIGH_PHYS_START 0x800000000ULL 33#define KEYSTONE_HIGH_PHYS_START (0x800000000ULL + REC_OFFSET)
28#define KEYSTONE_HIGH_PHYS_SIZE 0x400000000ULL /* 16G */ 34#define KEYSTONE_HIGH_PHYS_SIZE (0x400000000ULL - REC_OFFSET)
29#define KEYSTONE_HIGH_PHYS_END (KEYSTONE_HIGH_PHYS_START + \ 35#define KEYSTONE_HIGH_PHYS_END (KEYSTONE_HIGH_PHYS_START + \
30 KEYSTONE_HIGH_PHYS_SIZE - 1) 36 KEYSTONE_HIGH_PHYS_SIZE - 1)
31 37
@@ -37,9 +43,15 @@
37 43
38#ifndef __ASSEMBLY__ 44#ifndef __ASSEMBLY__
39 45
46static inline phys_addr_t __virt_to_phys(unsigned long x);
47
40static inline phys_addr_t __virt_to_idmap(unsigned long x) 48static inline phys_addr_t __virt_to_idmap(unsigned long x)
41{ 49{
50#ifdef CONFIG_KEYSTONE_RECOVERY_KERNEL
51 return __virt_to_phys(x) - KEYSTONE_HIGH_PHYS_START +
52#else
42 return (phys_addr_t)(x) - CONFIG_PAGE_OFFSET + 53 return (phys_addr_t)(x) - CONFIG_PAGE_OFFSET +
54#endif
43 KEYSTONE_LOW_PHYS_START; 55 KEYSTONE_LOW_PHYS_START;
44} 56}
45 57