Skip to content

Commit d38f800

Browse files
committed
Add vc_cma driver to enable use of CMA
1 parent a2386d3 commit d38f800

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

arch/arm/mach-bcm2708/bcm2708.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
#include "armctrl.h"
6161
#include "clock.h"
6262

63+
#ifdef CONFIG_BCM_VC_CMA
64+
#include <linux/broadcom/vc_cma.h>
65+
#endif
66+
67+
6368
/* Effectively we have an IOMMU (ARM<->VideoCore map) that is set up to
6469
* give us IO access only to 64Mbytes of physical memory (26 bits). We could
6570
* represent this window by setting our dmamasks to 26 bits but, in fact
@@ -673,6 +678,9 @@ void __init bcm2708_init(void)
673678
{
674679
int i;
675680

681+
#if defined(CONFIG_BCM_VC_CMA)
682+
vc_cma_early_init();
683+
#endif
676684
printk("bcm2708.uart_clock = %d\n", uart_clock);
677685
pm_power_off = bcm2708_power_off;
678686

@@ -900,7 +908,16 @@ void __init bcm2708_init_early(void)
900908
* context. Increase size of atomic coherent pool to make sure such
901909
* the allocations won't fail.
902910
*/
911+
#if !defined(CONFIG_BCM_VC_CMA)
903912
init_dma_coherent_pool_size(SZ_2M);
913+
#endif
914+
}
915+
916+
static void __init board_reserve(void)
917+
{
918+
#if defined(CONFIG_BCM_VC_CMA)
919+
vc_cma_reserve();
920+
#endif
904921
}
905922

906923
MACHINE_START(BCM2708, "BCM2708")
@@ -910,6 +927,7 @@ MACHINE_START(BCM2708, "BCM2708")
910927
.timer =&bcm2708_timer,
911928
.init_machine = bcm2708_init,
912929
.init_early = bcm2708_init_early,
930+
.reserve = board_reserve,
913931
MACHINE_END
914932

915933
module_param(boardrev, uint, 0644);

drivers/char/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,8 @@ config DEVPORT
585585

586586
source "drivers/s390/char/Kconfig"
587587

588+
source "drivers/char/broadcom/Kconfig"
589+
588590
config MSM_SMD_PKT
589591
bool "Enable device interface for some SMD packet ports"
590592
default n

drivers/char/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,6 @@ obj-$(CONFIG_JS_RTC) += js-rtc.o
6363
js-rtc-y = rtc.o
6464

6565
obj-$(CONFIG_TILE_SROM) += tile-srom.o
66+
67+
obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/
68+

drivers/misc/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,4 @@ obj-y += carma/
5050
obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o
5151
obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/
5252
obj-$(CONFIG_INTEL_MEI) += mei/
53-
obj-y += vc04_services/
54-
53+
obj-$(CONFIG_BCM2708_VCHIQ) += vc04_services/

0 commit comments

Comments
 (0)