forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver
Adds a misc driver for Marvell CN10K DPI(DMA Engine) device's physical function which initializes DPI DMA hardware's global configuration and enables hardware mailbox channels between physical function (PF) and it's virtual functions (VF). VF device drivers (User space drivers) use this hw mailbox to communicate any required device configuration on it's respective VF device. Accordingly, this DPI PF driver provisions the VF device resources. At the hardware level, the DPI physical function (PF) acts as a management interface to setup the VF device resources, VF devices are only provisioned to handle or control the actual DMA Engine's data transfer capabilities. Signed-off-by: Vamsi Attunuru <[email protected]> Reviewed-by: Srujana Challa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information
Showing
9 changed files
with
796 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.. SPDX-License-Identifier: GPL-2.0 | ||
=============================================== | ||
Marvell CN10K DMA packet interface (DPI) driver | ||
=============================================== | ||
|
||
Overview | ||
======== | ||
|
||
DPI is a DMA packet interface hardware block in Marvell's CN10K silicon. | ||
DPI hardware comprises a physical function (PF), its virtual functions, | ||
mailbox logic, and a set of DMA engines & DMA command queues. | ||
|
||
DPI PF function is an administrative function which services the mailbox | ||
requests from its VF functions and provisions DMA engine resources to | ||
it's VF functions. | ||
|
||
mrvl_cn10k_dpi.ko misc driver loads on DPI PF device and services the | ||
mailbox commands submitted by the VF devices and accordingly initializes | ||
the DMA engines and VF device's DMA command queues. Also, driver creates | ||
/dev/mrvl-cn10k-dpi node to set DMA engine and PEM (PCIe interface) port | ||
attributes like fifo length, molr, mps & mrrs. | ||
|
||
DPI PF driver is just an administrative driver to setup its VF device's | ||
queues and provisions the hardware resources, it cannot initiate any | ||
DMA operations. Only VF devices are provisioned with DMA capabilities. | ||
|
||
Driver location | ||
=============== | ||
|
||
drivers/misc/mrvl_cn10k_dpi.c | ||
|
||
Driver IOCTLs | ||
============= | ||
|
||
:c:macro::`DPI_MPS_MRRS_CFG` | ||
ioctl that sets max payload size & max read request size parameters of | ||
a pem port to which DMA engines are wired. | ||
|
||
|
||
:c:macro::`DPI_ENGINE_CFG` | ||
ioctl that sets DMA engine's fifo sizes & max outstanding load request | ||
thresholds. | ||
|
||
User space code example | ||
======================= | ||
|
||
DPI VF devices are probed and accessed from user space applications using | ||
vfio-pci driver. Below is a sample dpi dma application to demonstrate on | ||
how applications use mailbox and ioctl services from DPI PF kernel driver. | ||
|
||
https://github.com/MarvellEmbeddedProcessors/dpi-sample-app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -362,6 +362,7 @@ Code Seq# Include File Comments | |
0xB6 all linux/fpga-dfl.h | ||
0xB7 all uapi/linux/remoteproc_cdev.h <mailto:[email protected]> | ||
0xB7 all uapi/linux/nsfs.h <mailto:Andrei Vagin <[email protected]>> | ||
0xB8 01-02 uapi/misc/mrvl_cn10k_dpi.h Marvell CN10K DPI driver | ||
0xC0 00-0F linux/usb/iowarrior.h | ||
0xCA 00-0F uapi/misc/cxl.h | ||
0xCA 10-2F uapi/misc/ocxl.h | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13477,6 +13477,11 @@ S: Supported | |
F: Documentation/devicetree/bindings/mmc/marvell,xenon-sdhci.yaml | ||
F: drivers/mmc/host/sdhci-xenon* | ||
|
||
MARVELL OCTEON CN10K DPI DRIVER | ||
M: Vamsi Attunuru <[email protected]> | ||
S: Supported | ||
F: drivers/misc/mrvl_cn10k_dpi.c | ||
|
||
MATROX FRAMEBUFFER DRIVER | ||
L: [email protected] | ||
S: Orphan | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- drivers/misc/Makefile | ||
+++ drivers/misc/Makefile | ||
@@ -69,3 +69,4 @@ obj-$(CONFIG_TMR_INJECT) += xilinx_tmr_inject.o | ||
obj-$(CONFIG_TPS6594_ESM) += tps6594-esm.o | ||
obj-$(CONFIG_TPS6594_PFSM) += tps6594-pfsm.o | ||
obj-$(CONFIG_NSM) += nsm.o | ||
+obj-$(CONFIG_MARVELL_CN10K_DPI) += mrvl_cn10k_dpi.o |
Oops, something went wrong.