From 64268f118fed27f82c013c4c7ffc88a61892075e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Mon, 7 Nov 2011 18:29:25 +0800 Subject: [PATCH] rk29: memory.h: use ARM_DMA_ZONE_SIZE to adjust the zone sizes --- arch/arm/mach-rk29/include/mach/memory.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rk29/include/mach/memory.h b/arch/arm/mach-rk29/include/mach/memory.h index bdbbf17a6862..4c95ac16bae9 100644 --- a/arch/arm/mach-rk29/include/mach/memory.h +++ b/arch/arm/mach-rk29/include/mach/memory.h @@ -27,10 +27,16 @@ #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA) +/* + * Restrict DMA-able region to workaround silicon bug. The bug + * restricts memory available for GPU hardware to be below 512M. + */ +#define ARM_DMA_ZONE_SIZE SZ_512M + static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsigned long *zhole_size) { - unsigned long dma_size = SZ_512M >> PAGE_SHIFT; + unsigned long dma_size = ARM_DMA_ZONE_SIZE >> PAGE_SHIFT; if (node || (zone_size[0] <= dma_size)) return; -- 2.34.1