aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Kconfig11
-rw-r--r--arch/arm/include/asm/memory.h9
-rw-r--r--arch/arm/kernel/head.S2
3 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 272eadc7a12c..1ecb09bca27e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -211,6 +211,17 @@ config ARM_PATCH_PHYS_VIRT
211 this feature (eg, building a kernel for a single machine) and 211 this feature (eg, building a kernel for a single machine) and
212 you need to shrink the kernel to the minimal size. 212 you need to shrink the kernel to the minimal size.
213 213
214config NO_MACH_MEMORY_H
215 bool
216 help
217 Select this when mach/memory.h is removed.
218
219config PHYS_OFFSET
220 hex "Physical address of main memory"
221 depends on !ARM_PATCH_PHYS_VIRT && NO_MACH_MEMORY_H
222 help
223 Please provide the physical address corresponding to the
224 location of main memory in your system.
214 225
215source "init/Kconfig" 226source "init/Kconfig"
216 227
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 90bca427e367..046c915694cd 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -16,9 +16,12 @@
16#include <linux/compiler.h> 16#include <linux/compiler.h>
17#include <linux/const.h> 17#include <linux/const.h>
18#include <linux/types.h> 18#include <linux/types.h>
19#include <mach/memory.h>
20#include <asm/sizes.h> 19#include <asm/sizes.h>
21 20
21#ifndef CONFIG_NO_MACH_MEMORY_H
22#include <mach/memory.h>
23#endif
24
22/* 25/*
23 * Allow for constants defined here to be used from assembly code 26 * Allow for constants defined here to be used from assembly code
24 * by prepending the UL suffix only with actual C code compilation. 27 * by prepending the UL suffix only with actual C code compilation.
@@ -184,7 +187,11 @@ static inline unsigned long __phys_to_virt(unsigned long x)
184#endif 187#endif
185 188
186#ifndef PHYS_OFFSET 189#ifndef PHYS_OFFSET
190#ifdef PLAT_PHYS_OFFSET
187#define PHYS_OFFSET PLAT_PHYS_OFFSET 191#define PHYS_OFFSET PLAT_PHYS_OFFSET
192#else
193#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
194#endif
188#endif 195#endif
189 196
190/* 197/*
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 7408fd506656..673c806cc106 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -95,7 +95,7 @@ ENTRY(stext)
95 sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) 95 sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET)
96 add r8, r8, r4 @ PHYS_OFFSET 96 add r8, r8, r4 @ PHYS_OFFSET
97#else 97#else
98 ldr r8, =PLAT_PHYS_OFFSET 98 ldr r8, =PHYS_OFFSET @ always constant in this case
99#endif 99#endif
100 100
101 /* 101 /*