All of lore.kernel.org
 help / color / mirror / Atom feed
From: Loic Poulain <loic.poulain@linaro.org>
To: manivannan.sadhasivam@linaro.org
Cc: linux-arm-msm@vger.kernel.org, bbhatt@codeaurora.org,
	hemantk@codeaurora.org, Loic Poulain <loic.poulain@linaro.org>
Subject: [PATCH v7 09/10] mhi: pci_generic: Add diag channels
Date: Mon,  4 Jan 2021 14:49:38 +0100	[thread overview]
Message-ID: <1609768179-10132-10-git-send-email-loic.poulain@linaro.org> (raw)
In-Reply-To: <1609768179-10132-1-git-send-email-loic.poulain@linaro.org>

Add support for Diag over MHI. Qualcomm Diag is the qualcomm
diagnostics interface that can be used to collect modem logs,
events, traces, etc. It can be used by tools such QPST or QXDM.

This patch adds the DIAG channels and a dedicated event ring.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by Hemant Kumar <hemantk@codeaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 drivers/bus/mhi/pci_generic.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c
index 5188ca2..a4b6221 100644
--- a/drivers/bus/mhi/pci_generic.c
+++ b/drivers/bus/mhi/pci_generic.c
@@ -142,22 +142,26 @@ struct mhi_pci_dev_info {
 	}
 
 static const struct mhi_channel_config modem_qcom_v1_mhi_channels[] = {
+	MHI_CHANNEL_CONFIG_UL(4, "DIAG", 16, 1),
+	MHI_CHANNEL_CONFIG_DL(5, "DIAG", 16, 1),
 	MHI_CHANNEL_CONFIG_UL(12, "MBIM", 4, 0),
 	MHI_CHANNEL_CONFIG_DL(13, "MBIM", 4, 0),
 	MHI_CHANNEL_CONFIG_UL(14, "QMI", 4, 0),
 	MHI_CHANNEL_CONFIG_DL(15, "QMI", 4, 0),
 	MHI_CHANNEL_CONFIG_UL(20, "IPCR", 8, 0),
 	MHI_CHANNEL_CONFIG_DL(21, "IPCR", 8, 0),
-	MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0", 128, 1),
-	MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0", 128, 2),
+	MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0", 128, 2),
+	MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0", 128, 3),
 };
 
 static const struct mhi_event_config modem_qcom_v1_mhi_events[] = {
 	/* first ring is control+data ring */
 	MHI_EVENT_CONFIG_CTRL(0),
+	/* DIAG dedicated event ring */
+	MHI_EVENT_CONFIG_DATA(1),
 	/* Hardware channels request dedicated hardware event rings */
-	MHI_EVENT_CONFIG_HW_DATA(1, 100),
-	MHI_EVENT_CONFIG_HW_DATA(2, 101)
+	MHI_EVENT_CONFIG_HW_DATA(2, 100),
+	MHI_EVENT_CONFIG_HW_DATA(3, 101)
 };
 
 static const struct mhi_controller_config modem_qcom_v1_mhiv_config = {
-- 
2.7.4


  parent reply	other threads:[~2021-01-04 13:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 13:49 [PATCH v7 00/10] mhi: pci_generic: Misc improvements Loic Poulain
2021-01-04 13:49 ` [PATCH v7 01/10] bus: mhi: core: Add device hardware reset support Loic Poulain
2021-01-04 15:16   ` Manivannan Sadhasivam
2021-01-04 13:49 ` [PATCH v7 02/10] mhi: pci-generic: Increase number of hardware events Loic Poulain
2021-01-04 13:49 ` [PATCH v7 03/10] mhi: pci_generic: Enable burst mode for hardware channels Loic Poulain
2021-01-04 13:49 ` [PATCH v7 04/10] mhi: pci_generic: Add support for reset Loic Poulain
2021-01-04 15:21   ` Manivannan Sadhasivam
2021-01-04 13:49 ` [PATCH v7 05/10] mhi: pci_generic: Add suspend/resume/recovery procedure Loic Poulain
2021-01-04 13:49 ` [PATCH v7 06/10] mhi: pci_generic: Add PCI error handlers Loic Poulain
2021-01-04 15:26   ` Manivannan Sadhasivam
2021-01-04 13:49 ` [PATCH v7 07/10] mhi: pci_generic: Add health-check Loic Poulain
2021-01-04 13:49 ` [PATCH v7 08/10] mhi: pci_generic: Increase controller timeout value Loic Poulain
2021-01-04 13:49 ` Loic Poulain [this message]
2021-01-04 13:49 ` [PATCH v7 10/10] mhi: pci_generic: Set irq moderation value to 1ms for hw channels Loic Poulain
2021-01-04 15:27   ` Manivannan Sadhasivam

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=1609768179-10132-10-git-send-email-loic.poulain@linaro.org \
    --to=loic.poulain@linaro.org \
    --cc=bbhatt@codeaurora.org \
    --cc=hemantk@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=manivannan.sadhasivam@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.