Move kernel and modules based on CONFIG_ZONE_DMA=y
Move kernel and modules based on CONFIG_ZONE_DMA=y instead of
CONFIG_COMCERTO_ZONE_DMA_NCNB=y.
This change allows CONFIG_COMCERTO_ZONE_DMA_NCNB to be disabled
without affecting physical memory layout.
Whether CONFIG_ZONE_DMA is enabled alone or together with
CONFIG_COMCERTO_ZONE_DMA_NCNB, we want the memory layout to be:
0MB-44MB: DMA zone
44MB-64MB: COMCERTO_DDR_SHARED_BASE
64MB- : Linux kernel
Optimus uses:
CONFIG_ZONE_DMA=y
CONFIG_COMCERTO_ZONE_DMA_NCNB=y
SpaceCast uses:
CONFIG_ZONE_DMA=y
CONFIG_COMCERTO_ZONE_DMA_NCNB=n
This change complements the changes:
commit 24fc119798ca8da0b50a950b594358550510f5fb
Author: Matthias Kaehlcke <mka@google.com>
Date: Mon Oct 5 12:12:17 2015 -0700
Comcerto: Enable ZONE_DMA
commit 289dfb638cbc3257483093a16447ffc99ce01281
Author: Matthias Kaehlcke <mka@google.com>
Date: Mon Oct 5 12:25:48 2015 -0700
Comcerto: Only change text offset when DMA NCNB is enabled
Change-Id: I688f57bfc01bd445f102e92d73100f3a634901ca
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 11aa00c..72561c4 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -141,7 +141,7 @@
machine-$(CONFIG_ARCH_CNS3XXX) := cns3xxx
machine-$(CONFIG_ARCH_COMCERTO) := comcerto
ifeq ($(CONFIG_ARCH_COMCERTO),y)
-textofs-$(CONFIG_COMCERTO_ZONE_DMA_NCNB) := 0x04008000
+textofs-$(CONFIG_ZONE_DMA) := 0x04008000
endif
machine-$(CONFIG_ARCH_DAVINCI) := davinci
machine-$(CONFIG_ARCH_DOVE) := dove
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index a8941af..dc20932 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -50,7 +50,7 @@
*/
#define TASK_SIZE_26 UL(0x04000000)
-#ifndef CONFIG_COMCERTO_ZONE_DMA_NCNB
+#ifndef CONFIG_ZONE_DMA
/*
* The module space lives between the addresses given by TASK_SIZE
* and PAGE_OFFSET - it must be within 32MB of the kernel text.
diff --git a/arch/arm/mach-comcerto/Makefile.boot b/arch/arm/mach-comcerto/Makefile.boot
index 133025b..121a94a 100644
--- a/arch/arm/mach-comcerto/Makefile.boot
+++ b/arch/arm/mach-comcerto/Makefile.boot
@@ -1,5 +1,5 @@
ifeq ($(CONFIG_ARCH_M86XXX),y)
-ifeq ($(CONFIG_COMCERTO_ZONE_DMA_NCNB),y)
+ifeq ($(CONFIG_ZONE_DMA),y)
zreladdr-y := 0x04008000
else
zreladdr-y := 0x00008000