public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: Sanjay R Mehta <Sanju.Mehta@amd.com>
To: vkoul@kernel.org, gregkh@linuxfoundation.org,
	dan.j.williams@intel.com, Thomas.Lendacky@amd.com,
	Shyam-sundar.S-k@amd.com, Nehal-bakulchandra.Shah@amd.com
Cc: robh@kernel.org, mchehab+samsung@kernel.org, davem@davemloft.net,
	Jonathan.Cameron@huawei.com, linux-kernel@vger.kernel.org,
	dmaengine@vger.kernel.org, Sanjay R Mehta <sanju.mehta@amd.com>
Subject: [PATCH v3 0/3] Add AMD PassThru DMA Engine driver
Date: Tue, 21 Jan 2020 03:04:51 -0600	[thread overview]
Message-ID: <1579597494-60348-1-git-send-email-Sanju.Mehta@amd.com> (raw)

From: Sanjay R Mehta <sanju.mehta@amd.com>

This patch series adds support for AMD PassThru DMA Engine which
performs high bandwidth memory-to-memory and IO copy operation and
performs DMA transfer through queue based descriptor management.

AMD Processor has multiple ptdma device instances and each engine has
single queue. The driver also adds support for for multiple PTDMA
instances, each device will get an unique identifier and uniquely
named resources.

v3:
	- Fixed the sparse warnings.

v2:
	- Added controller description in cover letter
	- Removed "default m" from Kconfig
	- Replaced low_address() and high_address() functions with kernel
	  API's lower_32_bits & upper_32_bits().
	- Removed the BH handler function pt_core_irq_bh() and instead
	  handling transaction in irq handler itself.
	- Moved presetting of command queue registers into new function
	  "init_cmdq_regs()"
	- Removed the kernel thread dependency to submit transaction.
	- Increased the hardware command queue size to 32 and adding it
	  as a module parameter.
	- Removed backlog command queue handling mechanism.
	- Removed software command queue handling and instead submitting
	  transaction command directly to
	  hardware command queue.
	- Added tasklet structure variable in "struct pt_device".
	  This is used to invoke pt_do_cmd_complete() upon receiving interrupt
	  for command completion.
	- pt_core_perform_passthru() function parameters are modified and it is
	  now used to submit command directly to hardware from dmaengine framework.
	- Removed below structures, enums, macros and functions, as these values are
	  constants. Making command submission simple,
	   - Removed "union pt_function"  and several macros like PT_VERSION,
	     PT_BYTESWAP, PT_CMD_* etc..
	   - enum pt_passthru_bitwise, enum pt_passthru_byteswap, enum pt_memtype
	     struct pt_dma_info, struct pt_data, struct pt_mem, struct pt_passthru_op,
	     struct pt_op,
	   - Removed functions -> pt_cmd_queue_thread() pt_run_passthru_cmd(),
	     pt_run_cmd(), pt_dev_init(), pt_dequeue_cmd(), pt_do_cmd_backlog(),
	     pt_enqueue_cmd(),
	- Below functions, stuctures and variables moved from ptdma-ops.c
	   - Moved function pt_alloc_struct() to ptdma-pci.c as its used only there.
	   - Moved "struct pt_tasklet_data" structure to ptdma.h
	   - Moved functions pt_do_cmd_complete(), pt_present(), pt_get_device(),
	     pt_add_device(), pt_del_device(), pt_log_error() and its dependent
	     static variables pt_unit_lock, pt_units, pt_rr_lock, pt_rr, pt_error_codes,
	     pt_ordinal  to ptdma-dev.c as they are used only in that file.

Links of the review comments for v2:
1. https://lkml.org/lkml/2019/12/27/630
2. https://lkml.org/lkml/2020/1/3/23
3. https://lkml.org/lkml/2020/1/3/314
4. https://lkml.org/lkml/2020/1/10/100


Links of the review comments for v1:

1. https://lkml.org/lkml/2019/9/24/490
2. https://lkml.org/lkml/2019/9/24/399
3. https://lkml.org/lkml/2019/9/24/862
4. https://lkml.org/lkml/2019/9/24/122

Sanjay R Mehta (3):
  dmaengine: ptdma: Initial driver for the AMD PassThru DMA engine
  dmaengine: ptdma: Register pass-through engine as a DMA resource
  dmaengine: ptdma: Add debugfs entries for PTDMA information

 MAINTAINERS                         |   6 +
 drivers/dma/Kconfig                 |   2 +
 drivers/dma/Makefile                |   1 +
 drivers/dma/ptdma/Kconfig           |   7 +
 drivers/dma/ptdma/Makefile          |  12 +
 drivers/dma/ptdma/ptdma-debugfs.c   | 237 ++++++++++++
 drivers/dma/ptdma/ptdma-dev.c       | 448 +++++++++++++++++++++++
 drivers/dma/ptdma/ptdma-dmaengine.c | 704 ++++++++++++++++++++++++++++++++++++
 drivers/dma/ptdma/ptdma-pci.c       | 269 ++++++++++++++
 drivers/dma/ptdma/ptdma.h           | 378 +++++++++++++++++++
 10 files changed, 2064 insertions(+)
 create mode 100644 drivers/dma/ptdma/Kconfig
 create mode 100644 drivers/dma/ptdma/Makefile
 create mode 100644 drivers/dma/ptdma/ptdma-debugfs.c
 create mode 100644 drivers/dma/ptdma/ptdma-dev.c
 create mode 100644 drivers/dma/ptdma/ptdma-dmaengine.c
 create mode 100644 drivers/dma/ptdma/ptdma-pci.c
 create mode 100644 drivers/dma/ptdma/ptdma.h

-- 
2.7.4


             reply	other threads:[~2020-01-21  9:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-21  9:04 Sanjay R Mehta [this message]
2020-01-21  9:04 ` [PATCH v3 1/3] dmaengine: ptdma: Initial driver for the AMD PassThru DMA engine Sanjay R Mehta
2020-01-24  6:00   ` Vinod Koul
2020-01-21  9:04 ` [PATCH v3 2/3] dmaengine: ptdma: Register pass-through engine as a DMA resource Sanjay R Mehta
2020-01-24  6:05   ` Vinod Koul
2020-01-21  9:04 ` [PATCH v3 3/3] dmaengine: ptdma: Add debugfs entries for PTDMA information Sanjay R Mehta
2020-03-26 16:05 ` [PATCH v3 0/3] Add AMD PassThru DMA Engine driver Vitaly Mayatskih

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1579597494-60348-1-git-send-email-Sanju.Mehta@amd.com \
    --to=sanju.mehta@amd.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Nehal-bakulchandra.Shah@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=dan.j.williams@intel.com \
    --cc=davem@davemloft.net \
    --cc=dmaengine@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox