Skip to content

Commit aa12518

Browse files
jailuthragregkh
authored andcommitted
platform/raspberrypi: Destage VCHIQ interface
Destage the VCHIQ interface driver to drivers/platform/raspberrypi. There is still the remaining TODO item of improving the documentation, which can be handled post destaging. Secondly, multimedia drivers like codec and ISP that rely on this interface need to be upstreamed. And lastly, the drivers that facilitate the shared memory between VideoCore and Linux, like the vc-sm-cma driver and vc_mem char driver also need to be upstreamed. Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com> Link: https://patch.msgid.link/20251029-vchiq-destage-v3-6-da8d6c83c2c5@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b178ad6 commit aa12518

15 files changed

Lines changed: 68 additions & 57 deletions

File tree

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4828,6 +4828,7 @@ S: Maintained
48284828
T: git https://github.com/broadcom/stblinux.git
48294829
F: Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
48304830
F: drivers/pci/controller/pcie-brcmstb.c
4831+
F: drivers/platform/raspberrypi/vchiq-*
48314832
F: drivers/staging/vc04_services
48324833
F: include/linux/raspberrypi/vchiq*
48334834
N: bcm2711

drivers/platform/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ source "drivers/platform/surface/Kconfig"
1818
source "drivers/platform/x86/Kconfig"
1919

2020
source "drivers/platform/arm64/Kconfig"
21+
22+
source "drivers/platform/raspberrypi/Kconfig"

drivers/platform/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ obj-$(CONFIG_CHROME_PLATFORMS) += chrome/
1313
obj-$(CONFIG_CZNIC_PLATFORMS) += cznic/
1414
obj-$(CONFIG_SURFACE_PLATFORMS) += surface/
1515
obj-$(CONFIG_ARM64_PLATFORM_DEVICES) += arm64/
16+
obj-$(CONFIG_BCM2835_VCHIQ) += raspberrypi/
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
menuconfig BCM_VIDEOCORE
4+
tristate "Broadcom VideoCore support"
5+
depends on OF
6+
depends on RASPBERRYPI_FIRMWARE || (COMPILE_TEST && !RASPBERRYPI_FIRMWARE)
7+
default y
8+
help
9+
Support for Broadcom VideoCore services including
10+
the BCM2835 family of products which is used
11+
by the Raspberry PI.
12+
13+
if BCM_VIDEOCORE
14+
15+
config BCM2835_VCHIQ
16+
tristate "BCM2835 VCHIQ"
17+
depends on HAS_DMA
18+
imply VCHIQ_CDEV
19+
help
20+
Broadcom BCM2835 and similar SoCs have a VPU called VideoCore.
21+
This config enables the VCHIQ driver, which implements a
22+
messaging interface between the kernel and the firmware running
23+
on VideoCore. Other drivers use this interface to communicate to
24+
the VPU. More specifically, the VCHIQ driver is used by
25+
audio/video and camera drivers as well as for implementing MMAL
26+
API, which is in turn used by several multimedia services on the
27+
BCM2835 family of SoCs.
28+
29+
Defaults to Y when the Broadcom Videocore services are included
30+
in the build, N otherwise.
31+
32+
if BCM2835_VCHIQ
33+
34+
config VCHIQ_CDEV
35+
bool "VCHIQ Character Driver"
36+
help
37+
Enable the creation of VCHIQ character driver. The cdev exposes
38+
ioctls used by userspace libraries and testing tools to interact
39+
with VideoCore, via the VCHIQ core driver (Check BCM2835_VCHIQ
40+
for more info).
41+
42+
This can be set to 'N' if the VideoCore communication is not
43+
needed by userspace but only by other kernel modules
44+
(like bcm2835-audio).
45+
46+
If not sure, set this to 'Y'.
47+
48+
endif
49+
50+
endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_BCM2835_VCHIQ) += vchiq.o
4+
5+
vchiq-objs := \
6+
vchiq-interface/vchiq_core.o \
7+
vchiq-interface/vchiq_arm.o \
8+
vchiq-interface/vchiq_bus.o \
9+
vchiq-interface/vchiq_debugfs.o \
10+
11+
ifdef CONFIG_VCHIQ_CDEV
12+
vchiq-objs += vchiq-interface/vchiq_dev.o
13+
endif
14+
File renamed without changes.
File renamed without changes.

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c renamed to drivers/platform/raspberrypi/vchiq-interface/vchiq_arm.c

File renamed without changes.

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c renamed to drivers/platform/raspberrypi/vchiq-interface/vchiq_bus.c

File renamed without changes.

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c renamed to drivers/platform/raspberrypi/vchiq-interface/vchiq_core.c

File renamed without changes.

0 commit comments

Comments
 (0)