ARM: mach-shmobile: r8a7740: reserve DMA memory for the frame buffer
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 24 Apr 2012 09:10:05 +0000 (02:10 -0700)
committerRafael J. Wysocki <rjw@sisk.pl>
Sat, 12 May 2012 20:33:06 +0000 (22:33 +0200)
The default 2MB size of DMA coherent memory isn't enough for allocate
frame buffer memory.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
arch/arm/mach-shmobile/setup-r8a7740.c

index 34a1548dbda6ca201159d8041b61bb8ec854ef16..ec4eb49c16938a28b438282353e5194bc2592688 100644 (file)
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 #include <linux/delay.h>
+#include <linux/dma-mapping.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
@@ -60,6 +61,12 @@ static struct map_desc r8a7740_io_desc[] __initdata = {
 void __init r8a7740_map_io(void)
 {
        iotable_init(r8a7740_io_desc, ARRAY_SIZE(r8a7740_io_desc));
+
+       /*
+        * DMA memory at 0xff200000 - 0xffdfffff. The default 2MB size isn't
+        * enough to allocate the frame buffer memory.
+        */
+       init_consistent_dma_size(12 << 20);
 }
 
 /* SCIFA0 */