Skip to content

Commit 5f4125c

Browse files
committed
cma: Add vc_cma driver to enable use of CMA
Signed-off-by: popcornmix <popcornmix@gmail.com> vc_cma: Make the vc_cma area the default contiguous DMA area vc_cma: Provide empty functions when module is not built Providing empty functions saves the users from guarding the function call with an #if clause. Move __init markings from prototypes to functions. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
1 parent b1c86a8 commit 5f4125c

7 files changed

Lines changed: 1255 additions & 0 deletions

File tree

‎drivers/char/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
menu "Character devices"
66

7+
source "drivers/char/broadcom/Kconfig"
8+
79
source "drivers/tty/Kconfig"
810

911
config DEVMEM

‎drivers/char/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ js-rtc-y = rtc.o
6060
obj-$(CONFIG_TILE_SROM) += tile-srom.o
6161
obj-$(CONFIG_XILLYBUS) += xillybus/
6262
obj-$(CONFIG_POWERNV_OP_PANEL) += powernv-op-panel.o
63+
obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/

‎drivers/char/broadcom/Kconfig‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# Broadcom char driver config
3+
#
4+
5+
menuconfig BRCM_CHAR_DRIVERS
6+
bool "Broadcom Char Drivers"
7+
help
8+
Broadcom's char drivers
9+
10+
config BCM_VC_CMA
11+
bool "Videocore CMA"
12+
depends on CMA && BRCM_CHAR_DRIVERS && BCM2708_VCHIQ
13+
default n
14+
help
15+
Helper for videocore CMA access.

‎drivers/char/broadcom/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_BCM_VC_CMA) += vc_cma/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ccflags-$(CONFIG_BCM_VC_CMA) += -Wall -Wstrict-prototypes -Wno-trigraphs -Werror
2+
ccflags-$(CONFIG_BCM_VC_CMA) += -Iinclude/linux/broadcom -Idrivers/staging/vc04_services -Idrivers/staging/vc04_services/interface/vchi -Idrivers/staging/vc04_services/interface/vchiq_arm
3+
ccflags-$(CONFIG_BCM_VC_CMA) += -D__KERNEL__ -D__linux__
4+
5+
obj-$(CONFIG_BCM_VC_CMA) += vc-cma.o
6+
7+
vc-cma-objs := vc_cma.o

0 commit comments

Comments
 (0)