Commit 522f6926 authored by Scott Branden's avatar Scott Branden Committed by Greg Kroah-Hartman
Browse files

misc: bcm-vk: add Broadcom VK driver



Add initial version of Broadcom VK driver to enumerate PCI device IDs
of Valkyrie and Viper device IDs.

VK based cards provide real-time high performance, high throughput,
low latency offload compute engine operations.
They are used for multiple parallel offload tasks as:
audio, video and image processing and crypto operations.

Further commits add additional features to driver beyond probe/remove.

Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarScott Branden <scott.branden@broadcom.com>
Link: https://lore.kernel.org/r/20210120175827.14820-3-scott.branden@broadcom.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 88222762
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -470,6 +470,7 @@ source "drivers/misc/genwqe/Kconfig"
source "drivers/misc/echo/Kconfig"
source "drivers/misc/cxl/Kconfig"
source "drivers/misc/ocxl/Kconfig"
source "drivers/misc/bcm-vk/Kconfig"
source "drivers/misc/cardreader/Kconfig"
source "drivers/misc/habanalabs/Kconfig"
source "drivers/misc/uacce/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_CXL_BASE)		+= cxl/
obj-$(CONFIG_PCI_ENDPOINT_TEST)	+= pci_endpoint_test.o
obj-$(CONFIG_OCXL)		+= ocxl/
obj-$(CONFIG_BCM_VK)		+= bcm-vk/
obj-y				+= cardreader/
obj-$(CONFIG_PVPANIC)   	+= pvpanic.o
obj-$(CONFIG_HABANA_AI)		+= habanalabs/
+17 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
#
# Broadcom VK device
#
config BCM_VK
	tristate "Support for Broadcom VK Accelerators"
	depends on PCI_MSI
	help
	  Select this option to enable support for Broadcom
	  VK Accelerators.  VK is used for performing
	  multiple specific offload processing tasks in parallel.
	  Such offload tasks assist in such operations as video
	  transcoding, compression, and crypto tasks.
	  This driver enables userspace programs to access these
	  accelerators via /dev/bcm-vk.N devices.

	  If unsure, say N.
+8 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for Broadcom VK driver
#

obj-$(CONFIG_BCM_VK) += bcm_vk.o
bcm_vk-objs := \
	bcm_vk_dev.o
+29 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright 2018-2020 Broadcom.
 */

#ifndef BCM_VK_H
#define BCM_VK_H

#include <linux/pci.h>

#define DRV_MODULE_NAME		"bcm-vk"

/* VK device supports a maximum of 3 bars */
#define MAX_BAR	3

enum pci_barno {
	BAR_0 = 0,
	BAR_1,
	BAR_2
};

#define BCM_VK_NUM_TTY 2

struct bcm_vk {
	struct pci_dev *pdev;
	void __iomem *bar[MAX_BAR];
};

#endif
Loading