From 80a1845d6166a3f4765f26e7f99f012c9b62ec98 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Tue, 5 Jul 2011 22:52:51 -0400 Subject: [PATCH] --- yaml --- r: 270180 b: refs/heads/master c: 1b9f95f8ade9efc2bd49f0e7b9dc61a038ac3eef h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/Kconfig | 11 +++++++++++ trunk/arch/arm/include/asm/memory.h | 9 ++++++++- trunk/arch/arm/kernel/head.S | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 8206039b4330..21cdf5ff5163 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 67f462b29310814a8de29d35b422a9ed41d5f39a +refs/heads/master: 1b9f95f8ade9efc2bd49f0e7b9dc61a038ac3eef diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index 272eadc7a12c..1ecb09bca27e 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -211,6 +211,17 @@ config ARM_PATCH_PHYS_VIRT this feature (eg, building a kernel for a single machine) and you need to shrink the kernel to the minimal size. +config NO_MACH_MEMORY_H + bool + help + Select this when mach/memory.h is removed. + +config PHYS_OFFSET + hex "Physical address of main memory" + depends on !ARM_PATCH_PHYS_VIRT && NO_MACH_MEMORY_H + help + Please provide the physical address corresponding to the + location of main memory in your system. source "init/Kconfig" diff --git a/trunk/arch/arm/include/asm/memory.h b/trunk/arch/arm/include/asm/memory.h index 90bca427e367..046c915694cd 100644 --- a/trunk/arch/arm/include/asm/memory.h +++ b/trunk/arch/arm/include/asm/memory.h @@ -16,9 +16,12 @@ #include #include #include -#include #include +#ifndef CONFIG_NO_MACH_MEMORY_H +#include +#endif + /* * Allow for constants defined here to be used from assembly code * 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) #endif #ifndef PHYS_OFFSET +#ifdef PLAT_PHYS_OFFSET #define PHYS_OFFSET PLAT_PHYS_OFFSET +#else +#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET) +#endif #endif /* diff --git a/trunk/arch/arm/kernel/head.S b/trunk/arch/arm/kernel/head.S index 7408fd506656..673c806cc106 100644 --- a/trunk/arch/arm/kernel/head.S +++ b/trunk/arch/arm/kernel/head.S @@ -95,7 +95,7 @@ ENTRY(stext) sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) add r8, r8, r4 @ PHYS_OFFSET #else - ldr r8, =PLAT_PHYS_OFFSET + ldr r8, =PHYS_OFFSET @ always constant in this case #endif /*