rk29: memory.h: use ARM_DMA_ZONE_SIZE to adjust the zone sizes
author黄涛 <huangtao@rock-chips.com>
Mon, 7 Nov 2011 10:29:25 +0000 (18:29 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 7 Nov 2011 10:29:25 +0000 (18:29 +0800)
arch/arm/mach-rk29/include/mach/memory.h

index bdbbf17a6862e6a89f182ba29b3f67ccbc2a2163..4c95ac16bae9c1b4482d2b33c3954875acbce1d5 100644 (file)
 
 #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;