From 333872c371cdbe37c3fdd0862716fdfe77cf9d6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Tue, 3 Jul 2012 10:20:19 +0800 Subject: [PATCH] rk: plat: add memory.h --- arch/arm/mach-rk30/include/mach/memory.h | 12 +----------- arch/arm/plat-rk/include/plat/memory.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 arch/arm/plat-rk/include/plat/memory.h diff --git a/arch/arm/mach-rk30/include/mach/memory.h b/arch/arm/mach-rk30/include/mach/memory.h index ab0b7fc032b2..01d8387e106a 100644 --- a/arch/arm/mach-rk30/include/mach/memory.h +++ b/arch/arm/mach-rk30/include/mach/memory.h @@ -1,14 +1,9 @@ #ifndef __MACH_MEMORY_H #define __MACH_MEMORY_H -#include +#include #include -/* - * Physical DRAM offset. - */ -#define PLAT_PHYS_OFFSET UL(0x60000000) - /* * SRAM memory whereabouts */ @@ -17,9 +12,4 @@ #define SRAM_DATA_OFFSET (RK30_IMEM_BASE + 0x3000) #define SRAM_DATA_END (RK30_IMEM_BASE + 0x3FFF) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)) -#define dmac_clean_range(start, end) dmac_map_area(start, end - start, DMA_TO_DEVICE) -#define dmac_inv_range(start, end) dmac_unmap_area(start, end - start, DMA_FROM_DEVICE) -#endif - #endif diff --git a/arch/arm/plat-rk/include/plat/memory.h b/arch/arm/plat-rk/include/plat/memory.h new file mode 100644 index 000000000000..be59d3bdf400 --- /dev/null +++ b/arch/arm/plat-rk/include/plat/memory.h @@ -0,0 +1,16 @@ +#ifndef __PLAT_MEMORY_H +#define __PLAT_MEMORY_H + +#include + +/* + * Physical DRAM offset. + */ +#define PLAT_PHYS_OFFSET UL(0x60000000) + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)) +#define dmac_clean_range(start, end) dmac_map_area(start, end - start, DMA_TO_DEVICE) +#define dmac_inv_range(start, end) dmac_unmap_area(start, end - start, DMA_FROM_DEVICE) +#endif + +#endif -- 2.34.1