diff options
-rw-r--r-- | arch/arm/mach-keystone/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/mach-keystone/Makefile.boot | 3 | ||||
-rw-r--r-- | arch/arm/mach-keystone/include/mach/memory.h | 20 |
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 | ||
6 | menu "TI KeyStone Implementations" | 6 | menu "TI KeyStone Implementations" |
7 | 7 | ||
8 | config KEYSTONE_RECOVERY_KERNEL | ||
9 | bool "Build recovery kernel" | ||
10 | default n | ||
11 | |||
8 | config KEYSTONE2_DMA_COHERENT | 12 | config 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 @@ | |||
1 | zreladdr-y := 0x80008000 | 1 | zreladdr-$(CONFIG_KEYSTONE_RECOVERY_KERNEL) := 0x90008000 |
2 | zreladdr-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 | ||
46 | static inline phys_addr_t __virt_to_phys(unsigned long x); | ||
47 | |||
40 | static inline phys_addr_t __virt_to_idmap(unsigned long x) | 48 | static 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 | ||