1 From bf571a571b090c16cd49458126e996243d8a2626 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/174] 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 --- a/arch/arm/mach-bcm2708/bcm2708.c
11 +++ b/arch/arm/mach-bcm2708/bcm2708.c
16 +#ifdef CONFIG_BCM_VC_CMA
17 +#include <linux/broadcom/vc_cma.h>
21 /* Effectively we have an IOMMU (ARM<->VideoCore map) that is set up to
22 * give us IO access only to 64Mbytes of physical memory (26 bits). We could
23 * represent this window by setting our dmamasks to 26 bits but, in fact
24 @@ -693,6 +698,9 @@ void __init bcm2708_init(void)
28 +#if defined(CONFIG_BCM_VC_CMA)
29 + vc_cma_early_init();
31 printk("bcm2708.uart_clock = %d\n", uart_clock);
32 pm_power_off = bcm2708_power_off;
34 @@ -889,6 +897,13 @@ void __init bcm2708_init_early(void)
35 init_dma_coherent_pool_size(SZ_4M);
38 +static void __init board_reserve(void)
40 +#if defined(CONFIG_BCM_VC_CMA)
45 MACHINE_START(BCM2708, "BCM2708")
46 /* Maintainer: Broadcom Europe Ltd. */
47 .map_io = bcm2708_map_io,
48 @@ -897,6 +912,7 @@ MACHINE_START(BCM2708, "BCM2708")
49 .init_machine = bcm2708_init,
50 .init_early = bcm2708_init_early,
51 .restart = bcm2708_restart,
52 + .reserve = board_reserve,
55 module_param(boardrev, uint, 0644);