public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: mhi@lists.linux.dev
Cc: quic_hemantk@quicinc.com, quic_bbhatt@quicinc.com,
	quic_jhugo@quicinc.com, vinod.koul@linaro.org,
	bjorn.andersson@linaro.org, dmitry.baryshkov@linaro.org,
	quic_vbadigan@quicinc.com, quic_cang@quicinc.com,
	quic_skananth@quicinc.com, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, elder@linaro.org
Subject: Re: [PATCH v4 00/27] Add initial support for MHI endpoint stack
Date: Tue, 1 Mar 2022 14:20:01 +0530	[thread overview]
Message-ID: <20220301085001.GE12451@workstation> (raw)
In-Reply-To: <20220228124344.77359-1-manivannan.sadhasivam@linaro.org>

On Mon, Feb 28, 2022 at 06:13:17PM +0530, Manivannan Sadhasivam wrote:
> Hello,
> 
> This series adds initial support for the Qualcomm specific Modem Host Interface
> (MHI) bus in endpoint devices like SDX55 modems. The MHI bus in endpoint devices
> communicates with the MHI bus in host machines like x86 over any physical bus
> like PCIe. The MHI host support is already in mainline [1] and been used by PCIe
> based modems and WLAN devices running vendor code (downstream).
> 

Series applied to mhi-next with Alex's Reviewed-by tag. Also incorporated few
suggestions by Alex.

Thanks,
Mani

> Overview
> ========
> 
> This series aims at adding the MHI support in the endpoint devices with the goal
> of getting data connectivity using the mainline kernel running on the modems.
> Modems here refer to the combination of an APPS processor (Cortex A grade) and
> a baseband processor (DSP). The MHI bus is located in the APPS processor and it
> transfers data packets from the baseband processor to the host machine.
> 
> The MHI Endpoint (MHI EP) stack proposed here is inspired by the downstream
> code written by Qualcomm. But the complete stack is mostly re-written to adapt
> to the "bus" framework and made it modular so that it can work with the upstream
> subsystems like "PCI Endpoint". The code structure of the MHI endpoint stack
> follows the MHI host stack to maintain uniformity.
> 
> With this initial MHI EP stack (along with few other drivers), we can establish
> the network interface between host and endpoint over the MHI software channels
> (IP_SW0) and can do things like IP forwarding, SSH, etc...
> 
> Stack Organization
> ==================
> 
> The MHI EP stack has the concept of controller and device drivers as like the
> MHI host stack. The MHI EP controller driver can be a PCI Endpoint Function
> driver and the MHI device driver can be a MHI EP Networking driver or QRTR
> driver. The MHI EP controller driver is tied to the PCI Endpoint subsystem and
> handles all bus related activities like mapping the host memory, raising IRQ,
> passing link specific events etc... The MHI EP networking driver is tied to the
> Networking stack and handles all networking related activities like
> sending/receiving the SKBs from netdev, statistics collection etc...
> 
> This series only contains the MHI EP code, whereas the PCIe EPF driver and MHI
> EP Networking drivers are not yet submitted and can be found here [2]. Though
> the MHI EP stack doesn't have the build time dependency, it cannot function
> without them.
> 
> Test setup
> ==========
> 
> This series has been tested on Telit FN980 TLB board powered by Qualcomm SDX55
> (a.k.a X55 modem) and Qualcomm SM8450 based dev board.
> 
> For testing the stability and performance, networking tools such as iperf, ssh
> and ping are used.
> 
> Limitations
> ===========
> 
> We are not _yet_ there to get the data packets from the modem as that involves
> the Qualcomm IP Accelerator (IPA) integration with MHI endpoint stack. But we
> are planning to add support for it in the coming days.
> 
> References
> ==========
> 
> MHI bus: https://www.kernel.org/doc/html/latest/mhi/mhi.html
> Linaro connect presentation around this topic: https://connect.linaro.org/resources/lvc21f/lvc21f-222/
> 
> Thanks,
> Mani
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/bus/mhi
> [2] https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=tracking-qcomlt-sdx55-drivers
> 
> Changes in v4:
> 
> * Collected reviews from Hemant and Alex.
> * Removed the A7 suffix from register names and functions.
> * Added a couple of cleanup patches.
> * Reworked the mhi_ep_queue_skb() API.
> * Switched to separate workers for command and transfer rings.
> * Used a common workqueue for state and ring management.
> * Reworked the channel ring management.
> * Other misc changes as per review from Alex.
> 
> Changes in v3:
> 
> * Splitted the patch 20/23 into two.
> * Fixed the error handling in patch 21/23.
> * Removed spurious change in patch 01/23.
> * Added check for xfer callbacks in client driver probe.
> 
> Changes in v2:
> 
> v2 mostly addresses the issues seen while testing the stack on SM8450 that is a
> SMP platform and also incorporates the review comments from Alex.
> 
> Major changes are:
> 
> * Added a cleanup patch for getting rid of SHIFT macros and used the bitfield
>   operations.
> * Added the endianess patches that were submitted to MHI list and used the
>   endianess conversion in EP patches also.
> * Added support for multiple event rings.
> * Fixed the MSI generation based on the event ring index.
> * Fixed the doorbell list handling by making use of list splice and not locking
>   the entire list manipulation.
> * Added new APIs for wrapping the reading and writing to host memory (Dmitry).
> * Optimized the read_channel and queue_skb function logics.
> * Added Hemant's R-o-b tag.
> 
> Manivannan Sadhasivam (25):
>   bus: mhi: Move host MHI code to "host" directory
>   bus: mhi: Use bitfield operations for register read and write
>   bus: mhi: Use bitfield operations for handling DWORDs of ring elements
>   bus: mhi: Cleanup the register definitions used in headers
>   bus: mhi: host: Rename "struct mhi_tre" to "struct mhi_ring_element"
>   bus: mhi: Move common MHI definitions out of host directory
>   bus: mhi: Make mhi_state_str[] array static inline and move to
>     common.h
>   bus: mhi: ep: Add support for registering MHI endpoint controllers
>   bus: mhi: ep: Add support for registering MHI endpoint client drivers
>   bus: mhi: ep: Add support for creating and destroying MHI EP devices
>   bus: mhi: ep: Add support for managing MMIO registers
>   bus: mhi: ep: Add support for ring management
>   bus: mhi: ep: Add support for sending events to the host
>   bus: mhi: ep: Add support for managing MHI state machine
>   bus: mhi: ep: Add support for processing MHI endpoint interrupts
>   bus: mhi: ep: Add support for powering up the MHI endpoint stack
>   bus: mhi: ep: Add support for powering down the MHI endpoint stack
>   bus: mhi: ep: Add support for handling MHI_RESET
>   bus: mhi: ep: Add support for handling SYS_ERR condition
>   bus: mhi: ep: Add support for processing command rings
>   bus: mhi: ep: Add support for reading from the host
>   bus: mhi: ep: Add support for processing channel rings
>   bus: mhi: ep: Add support for queueing SKBs to the host
>   bus: mhi: ep: Add support for suspending and resuming channels
>   bus: mhi: ep: Add uevent support for module autoloading
> 
> Paul Davey (2):
>   bus: mhi: Fix pm_state conversion to string
>   bus: mhi: Fix MHI DMA structure endianness
> 
>  drivers/bus/Makefile                     |    2 +-
>  drivers/bus/mhi/Kconfig                  |   28 +-
>  drivers/bus/mhi/Makefile                 |    9 +-
>  drivers/bus/mhi/common.h                 |  326 +++++
>  drivers/bus/mhi/core/internal.h          |  722 ----------
>  drivers/bus/mhi/ep/Kconfig               |   10 +
>  drivers/bus/mhi/ep/Makefile              |    2 +
>  drivers/bus/mhi/ep/internal.h            |  222 +++
>  drivers/bus/mhi/ep/main.c                | 1623 ++++++++++++++++++++++
>  drivers/bus/mhi/ep/mmio.c                |  272 ++++
>  drivers/bus/mhi/ep/ring.c                |  197 +++
>  drivers/bus/mhi/ep/sm.c                  |  148 ++
>  drivers/bus/mhi/host/Kconfig             |   31 +
>  drivers/bus/mhi/{core => host}/Makefile  |    4 +-
>  drivers/bus/mhi/{core => host}/boot.c    |   17 +-
>  drivers/bus/mhi/{core => host}/debugfs.c |   40 +-
>  drivers/bus/mhi/{core => host}/init.c    |  131 +-
>  drivers/bus/mhi/host/internal.h          |  382 +++++
>  drivers/bus/mhi/{core => host}/main.c    |   66 +-
>  drivers/bus/mhi/{ => host}/pci_generic.c |    0
>  drivers/bus/mhi/{core => host}/pm.c      |   36 +-
>  include/linux/mhi_ep.h                   |  284 ++++
>  include/linux/mod_devicetable.h          |    2 +
>  scripts/mod/file2alias.c                 |   10 +
>  24 files changed, 3649 insertions(+), 915 deletions(-)
>  create mode 100644 drivers/bus/mhi/common.h
>  delete mode 100644 drivers/bus/mhi/core/internal.h
>  create mode 100644 drivers/bus/mhi/ep/Kconfig
>  create mode 100644 drivers/bus/mhi/ep/Makefile
>  create mode 100644 drivers/bus/mhi/ep/internal.h
>  create mode 100644 drivers/bus/mhi/ep/main.c
>  create mode 100644 drivers/bus/mhi/ep/mmio.c
>  create mode 100644 drivers/bus/mhi/ep/ring.c
>  create mode 100644 drivers/bus/mhi/ep/sm.c
>  create mode 100644 drivers/bus/mhi/host/Kconfig
>  rename drivers/bus/mhi/{core => host}/Makefile (54%)
>  rename drivers/bus/mhi/{core => host}/boot.c (96%)
>  rename drivers/bus/mhi/{core => host}/debugfs.c (90%)
>  rename drivers/bus/mhi/{core => host}/init.c (92%)
>  create mode 100644 drivers/bus/mhi/host/internal.h
>  rename drivers/bus/mhi/{core => host}/main.c (97%)
>  rename drivers/bus/mhi/{ => host}/pci_generic.c (100%)
>  rename drivers/bus/mhi/{core => host}/pm.c (97%)
>  create mode 100644 include/linux/mhi_ep.h
> 
> -- 
> 2.25.1
> 

      parent reply	other threads:[~2022-03-01  8:50 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 12:43 [PATCH v4 00/27] Add initial support for MHI endpoint stack Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 01/27] bus: mhi: Fix pm_state conversion to string Manivannan Sadhasivam
2022-02-28 15:30   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 02/27] bus: mhi: Fix MHI DMA structure endianness Manivannan Sadhasivam
2022-02-28 15:40   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 03/27] bus: mhi: Move host MHI code to "host" directory Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 04/27] bus: mhi: Use bitfield operations for register read and write Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 05/27] bus: mhi: Use bitfield operations for handling DWORDs of ring elements Manivannan Sadhasivam
2022-02-28 14:00   ` David Laight
2022-02-28 14:43     ` 'Manivannan Sadhasivam'
2022-02-28 15:11       ` Alex Elder
2022-02-28 15:40       ` David Laight
2022-02-28 15:51         ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 06/27] bus: mhi: Cleanup the register definitions used in headers Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 07/27] bus: mhi: host: Rename "struct mhi_tre" to "struct mhi_ring_element" Manivannan Sadhasivam
2022-02-28 15:52   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 08/27] bus: mhi: Move common MHI definitions out of host directory Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 09/27] bus: mhi: Make mhi_state_str[] array static inline and move to common.h Manivannan Sadhasivam
2022-02-28 15:56   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 10/27] bus: mhi: ep: Add support for registering MHI endpoint controllers Manivannan Sadhasivam
2022-02-28 16:06   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 11/27] bus: mhi: ep: Add support for registering MHI endpoint client drivers Manivannan Sadhasivam
2022-02-28 16:09   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 12/27] bus: mhi: ep: Add support for creating and destroying MHI EP devices Manivannan Sadhasivam
2022-02-28 16:10   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 13/27] bus: mhi: ep: Add support for managing MMIO registers Manivannan Sadhasivam
2022-02-28 16:23   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 14/27] bus: mhi: ep: Add support for ring management Manivannan Sadhasivam
2022-02-28 16:27   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 15/27] bus: mhi: ep: Add support for sending events to the host Manivannan Sadhasivam
2022-02-28 16:37   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 16/27] bus: mhi: ep: Add support for managing MHI state machine Manivannan Sadhasivam
2022-02-28 16:41   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 17/27] bus: mhi: ep: Add support for processing MHI endpoint interrupts Manivannan Sadhasivam
2022-02-28 16:45   ` Alex Elder
2022-03-01  6:41     ` Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 18/27] bus: mhi: ep: Add support for powering up the MHI endpoint stack Manivannan Sadhasivam
2022-02-28 16:47   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 19/27] bus: mhi: ep: Add support for powering down " Manivannan Sadhasivam
2022-02-28 16:49   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 20/27] bus: mhi: ep: Add support for handling MHI_RESET Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 21/27] bus: mhi: ep: Add support for handling SYS_ERR condition Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 22/27] bus: mhi: ep: Add support for processing command rings Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 23/27] bus: mhi: ep: Add support for reading from the host Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 24/27] bus: mhi: ep: Add support for processing channel rings Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 25/27] bus: mhi: ep: Add support for queueing SKBs to the host Manivannan Sadhasivam
2022-02-28 16:51   ` Alex Elder
2022-02-28 12:43 ` [PATCH v4 26/27] bus: mhi: ep: Add support for suspending and resuming channels Manivannan Sadhasivam
2022-02-28 12:43 ` [PATCH v4 27/27] bus: mhi: ep: Add uevent support for module autoloading Manivannan Sadhasivam
2022-02-28 16:57 ` [PATCH v4 00/27] Add initial support for MHI endpoint stack Alex Elder
2022-03-01  6:15   ` Manivannan Sadhasivam
2022-03-01  8:50 ` Manivannan Sadhasivam [this message]

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=20220301085001.GE12451@workstation \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=elder@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhi@lists.linux.dev \
    --cc=quic_bbhatt@quicinc.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_hemantk@quicinc.com \
    --cc=quic_jhugo@quicinc.com \
    --cc=quic_skananth@quicinc.com \
    --cc=quic_vbadigan@quicinc.com \
    --cc=vinod.koul@linaro.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