Skip to content

Commit

Permalink
cma: Add vc_cma driver to enable use of CMA
Browse files Browse the repository at this point in the history
Signed-off-by: popcornmix <[email protected]>

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 <[email protected]>
  • Loading branch information
popcornmix committed Jul 25, 2016
1 parent baa18d6 commit 1723266
Show file tree
Hide file tree
Showing 7 changed files with 1,262 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

menu "Character devices"

source "drivers/char/broadcom/Kconfig"

source "drivers/tty/Kconfig"

config DEVMEM
Expand Down
1 change: 1 addition & 0 deletions drivers/char/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ js-rtc-y = rtc.o

obj-$(CONFIG_TILE_SROM) += tile-srom.o
obj-$(CONFIG_XILLYBUS) += xillybus/
obj-$(CONFIG_BRCM_CHAR_DRIVERS) += broadcom/
15 changes: 15 additions & 0 deletions drivers/char/broadcom/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Broadcom char driver config
#

menuconfig BRCM_CHAR_DRIVERS
bool "Broadcom Char Drivers"
help
Broadcom's char drivers

config BCM_VC_CMA
bool "Videocore CMA"
depends on CMA && BRCM_CHAR_DRIVERS && BCM2708_VCHIQ
default n
help
Helper for videocore CMA access.
1 change: 1 addition & 0 deletions drivers/char/broadcom/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj-$(CONFIG_BCM_VC_CMA) += vc_cma/
14 changes: 14 additions & 0 deletions drivers/char/broadcom/vc_cma/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ccflags-y += -Wall -Wstrict-prototypes -Wno-trigraphs
ccflags-y += -Werror
ccflags-y += -Iinclude/linux/broadcom
ccflags-y += -Idrivers/misc/vc04_services
ccflags-y += -Idrivers/misc/vc04_services/interface/vchi
ccflags-y += -Idrivers/misc/vc04_services/interface/vchiq_arm

ccflags-y += -D__KERNEL__
ccflags-y += -D__linux__
ccflags-y += -Werror

obj-$(CONFIG_BCM_VC_CMA) += vc-cma.o

vc-cma-objs := vc_cma.o
Loading

0 comments on commit 1723266

Please sign in to comment.