1 From 4998fad71d9539a6f6e28c7ad54142950c85cbe5 Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Thu, 28 Mar 2013 00:10:32 +0000
4 Subject: [PATCH 039/196] bcm2708: Add vc_cma driver to enable use of CMA
7 arch/arm/mach-bcm2708/bcm2708.c | 16 ++++++++++++++++
8 1 file changed, 16 insertions(+)
10 diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
11 index 5a7437b..13b91de 100644
12 --- a/arch/arm/mach-bcm2708/bcm2708.c
13 +++ b/arch/arm/mach-bcm2708/bcm2708.c
18 +#ifdef CONFIG_BCM_VC_CMA
19 +#include <linux/broadcom/vc_cma.h>
23 /* Effectively we have an IOMMU (ARM<->VideoCore map) that is set up to
24 * give us IO access only to 64Mbytes of physical memory (26 bits). We could
25 * represent this window by setting our dmamasks to 26 bits but, in fact
26 @@ -693,6 +698,9 @@ void __init bcm2708_init(void)
30 +#if defined(CONFIG_BCM_VC_CMA)
31 + vc_cma_early_init();
33 printk("bcm2708.uart_clock = %d\n", uart_clock);
34 pm_power_off = bcm2708_power_off;
36 @@ -889,6 +897,13 @@ void __init bcm2708_init_early(void)
37 init_dma_coherent_pool_size(SZ_4M);
40 +static void __init board_reserve(void)
42 +#if defined(CONFIG_BCM_VC_CMA)
47 MACHINE_START(BCM2708, "BCM2708")
48 /* Maintainer: Broadcom Europe Ltd. */
49 .map_io = bcm2708_map_io,
50 @@ -897,6 +912,7 @@ MACHINE_START(BCM2708, "BCM2708")
51 .init_machine = bcm2708_init,
52 .init_early = bcm2708_init_early,
53 .restart = bcm2708_restart,
54 + .reserve = board_reserve,
57 module_param(boardrev, uint, 0644);