diff options
author | Kevin | 2014-11-15 10:00:36 +0800 |
---|---|---|
committer | Kevin | 2014-11-15 10:00:36 +0800 |
commit | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (patch) | |
tree | de942df665fac4bac0d9cb7ae86910fe937b0c1a /ANDROID_3.4.5/arch/arm/mm | |
parent | 392e8802486cb573b916e746010e141a75f507e6 (diff) | |
download | FOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.tar.gz FOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.tar.bz2 FOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.zip |
add via modify part source code for wm8880 4.4 kitkat
Diffstat (limited to 'ANDROID_3.4.5/arch/arm/mm')
-rw-r--r-- | ANDROID_3.4.5/arch/arm/mm/Kconfig | 11 | ||||
-rw-r--r-- | ANDROID_3.4.5/arch/arm/mm/dma-mapping.c | 2 | ||||
-rw-r--r-- | ANDROID_3.4.5/arch/arm/mm/init.c | 20 | ||||
-rw-r--r-- | ANDROID_3.4.5/arch/arm/mm/mmu.c | 4 |
4 files changed, 33 insertions, 4 deletions
diff --git a/ANDROID_3.4.5/arch/arm/mm/Kconfig b/ANDROID_3.4.5/arch/arm/mm/Kconfig index 7c8a7d84..d160cf7b 100644 --- a/ANDROID_3.4.5/arch/arm/mm/Kconfig +++ b/ANDROID_3.4.5/arch/arm/mm/Kconfig @@ -417,7 +417,8 @@ config CPU_V6K # ARMv7 config CPU_V7 - bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX + bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB || MACH_REALVIEW_PBX || ARCH_WMT + default y if ARCH_WMT select CPU_32v6K select CPU_32v7 select CPU_ABRT_EV7 @@ -918,3 +919,11 @@ config ARCH_HAS_BARRIERS help This option allows the use of custom mandatory barriers included via the mach/barriers.h file. + +config ARCH_WMT_SMP_CACHEPOLICY_WRITEBACK + bool "Set SMP kernel cache policy as write-back" + depends on ARCH_WMT && CPU_V7 && SMP + default y + help + This option set cache policy as write-back to improve memcpy() + speed. diff --git a/ANDROID_3.4.5/arch/arm/mm/dma-mapping.c b/ANDROID_3.4.5/arch/arm/mm/dma-mapping.c index db23ae4a..cb5821be 100644 --- a/ANDROID_3.4.5/arch/arm/mm/dma-mapping.c +++ b/ANDROID_3.4.5/arch/arm/mm/dma-mapping.c @@ -128,7 +128,7 @@ static void __dma_free_buffer(struct page *page, size_t size) */ static pte_t **consistent_pte; -#define DEFAULT_CONSISTENT_DMA_SIZE SZ_2M +#define DEFAULT_CONSISTENT_DMA_SIZE SZ_4M unsigned long consistent_base = CONSISTENT_END - DEFAULT_CONSISTENT_DMA_SIZE; diff --git a/ANDROID_3.4.5/arch/arm/mm/init.c b/ANDROID_3.4.5/arch/arm/mm/init.c index 8f5813bb..b7f9a479 100644 --- a/ANDROID_3.4.5/arch/arm/mm/init.c +++ b/ANDROID_3.4.5/arch/arm/mm/init.c @@ -20,7 +20,7 @@ #include <linux/highmem.h> #include <linux/gfp.h> #include <linux/memblock.h> - +#include <linux/suspend.h> #include <asm/mach-types.h> #include <asm/memblock.h> #include <asm/prom.h> @@ -155,7 +155,8 @@ static void __init arm_bootmem_init(unsigned long start_pfn, unsigned int boot_pages; phys_addr_t bitmap; pg_data_t *pgdat; - + /*u32 uboot_start; + u32 uboot_end; */ /* * Allocate the bootmem bitmap page. This must be in a region * of memory which has already been mapped. @@ -198,6 +199,21 @@ static void __init arm_bootmem_init(unsigned long start_pfn, reserve_bootmem(__pfn_to_phys(start), (end - start) << PAGE_SHIFT, BOOTMEM_DEFAULT); } + + #if 0/*not needed in kernel resume path.*/ + /* + FIXME: This is hard-coded for WM3498 EVB. + Mark u-boot used memory section as nosave. + Thus, there will be no data needs to be restore to this area + so that u-boot code/data will not be overwritten during restoring + hibernation image from u-boot cmd_swsusp.c. + */ + uboot_start = 0x3C00000; //start: 60MB + uboot_end = 0x4100000; //end: 65MB + reserve_bootmem_node(pgdat, uboot_start, uboot_end - uboot_start, + BOOTMEM_DEFAULT);//Lch + register_nosave_region(uboot_start>>PAGE_SHIFT,uboot_end>>PAGE_SHIFT);//Lch + #endif } #ifdef CONFIG_ZONE_DMA diff --git a/ANDROID_3.4.5/arch/arm/mm/mmu.c b/ANDROID_3.4.5/arch/arm/mm/mmu.c index 2d719c39..2dacda29 100644 --- a/ANDROID_3.4.5/arch/arm/mm/mmu.c +++ b/ANDROID_3.4.5/arch/arm/mm/mmu.c @@ -322,7 +322,11 @@ static void __init build_mem_type_table(void) ecc_mask = 0; } if (is_smp()) +#if defined(CONFIG_ARCH_WMT_SMP_CACHEPOLICY_WRITEBACK) + cachepolicy = CPOLICY_WRITEBACK; +#else cachepolicy = CPOLICY_WRITEALLOC; +#endif /* * Strip out features not present on earlier architectures. |