Message ID | 1609231431-10048-11-git-send-email-loic.poulain@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | mhi: pci_generic: Misc improvements | expand |
On Tue, Dec 29, 2020 at 09:43:51AM +0100, Loic Poulain wrote: > 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> Thanks, Mani > --- > 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 d4ad9c5..0947596 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 >
diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c index d4ad9c5..0947596 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 = {
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> --- drivers/bus/mhi/pci_generic.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.7.4