From patchwork Mon Dec 14 14:25:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 343534 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3037320jai; Mon, 14 Dec 2020 06:21:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSbzh/iebl47feBebl0Ikguvbjpt9gjgFMsDN1WUf6nMxqsMvF95jyUdz0KEUv4PaPaIZ5 X-Received: by 2002:a17:906:1758:: with SMTP id d24mr23629031eje.287.1607955686902; Mon, 14 Dec 2020 06:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607955686; cv=none; d=google.com; s=arc-20160816; b=z+wi/bBqlAoRnDN+Q37dCK3KIOuxdh7fI1actSBU+MfzqhXJIMZP1p9u7IBICcpMC8 kd/A3k39/nw/sqm8n7nAR7igi0VSW6F82vRI3DaqghFIc5W+2qULozwb5tQX37B6onR7 V+4el4HS5c0/yHCPzPgo1v8wAMWoZS/LV3zcSNlfb5WjUACviN5MNjvLmosZ9d+cpgU/ hv+32b1W5C5Hv02U2TIr5fBQ1Vf2z8Ix1rEZGw8rOFT/rElixmbHEQAj8UKEXLmwQjnj JD+H0Cqiyty6ZG279SNmUBgJJTl5+qOcXyf08trzGDAQJEEReQ4VlYt6fluLJPfyUXVF DXTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=bY1msGoBjemRs4hKNt3WYSHnFeZbrWNtczzN7TWoXGM=; b=LYZ5Mm06DXwv4OVzSSysbaDk1iE8Y+PnhOoUPuR1afloOt45EFdL5WiFzKRLLf5T3d Up1bK6NoEWD4lRrzdlVHJgg/xAmIfzgx/h3HLPIWdgT2kz191m4JpABEoGLGKkizo6LH XBwL/LhGfz4n1X3ykDNbDVy61HomN67ELK/KYlzdUSLS6z57gpHrLxVa1dHJhqPwb6w3 HSBFGqJYrrTSfIdI8tu6Jrx0u70iMHLv8pquFIeszrnaT+XZRtlCE+5fyubf5+iCZMP3 r+D5CO3a0F9roklaAJuTgzX/4rk0WBV6vqMgiYCyBNY8O1ovvg+XL41g4IcuF66j7Vrw xinQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dq8H++dr; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 1si10753532edv.426.2020.12.14.06.21.25; Mon, 14 Dec 2020 06:21:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dq8H++dr; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440047AbgLNOUC (ORCPT + 15 others); Mon, 14 Dec 2020 09:20:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440041AbgLNOUC (ORCPT ); Mon, 14 Dec 2020 09:20:02 -0500 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 156DFC061282 for ; Mon, 14 Dec 2020 06:18:40 -0800 (PST) Received: by mail-wr1-x443.google.com with SMTP id r3so16607575wrt.2 for ; Mon, 14 Dec 2020 06:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bY1msGoBjemRs4hKNt3WYSHnFeZbrWNtczzN7TWoXGM=; b=dq8H++drKY8U9QCDle1q2vKZZ7TzhkpS8eNvBWbs+4WqseVFZvPKhMNV0rhiZLPpf2 HPmdqH1Z0pvQXNTYWA+vzTHCKOiiXD2aUCHSw8daZJecyvRcqhLI6WvJrflGFhtAq3x5 IfKaXDer0gxRX5LktrLiRCEAgeZFm52z3dskT1yPxFhJcrqNOOmyIiPfRNMo3HBTuesP WhDXxav+iDlCMTuIY4mSYHVCg2rtsfv72dSEzfIsl67E8yObLGb0SKMIDFrjQcWqwlqk j2O14hXe7sDiqq6ZOQQS8mQbkFpmL/RfAfltfrWm1ZgzRpNgTVq5qzjO47Ga42Xx5MIH Uo0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bY1msGoBjemRs4hKNt3WYSHnFeZbrWNtczzN7TWoXGM=; b=CocTn/A6yZ57uWxlLc9AYiJdXOS2lqMXyMCI1bM3mg5QXVBI7c0hjOz7KHyQw4GXaA KVseb/NCgvjrZVLUXNP18r+cqHqUO9kidZfuPCVBWLR9Is1R+01JUntgb3zSzqN7odJ3 JXtedVI10vZV29siWe5ItdZHaZHEynK2IKVHRRhh1pV1ar4JV/yVV9aCaUR39U5zMohJ EQiujYzqNxWHYHf8hzGZljFekvsSRRK2UVdHpB/qgWRwPKiyja0pQPpmHrO5wFomUN+n 2Dz8DpfHGH87flgc5tehmT/J7a90jidgEGFmVhx7eBJWboh5EfrLiu5WbqM4yfatuziC 0d7w== X-Gm-Message-State: AOAM5335eDdVZxL4VfsMhV6zIRWOgcgYJpdFyANsKTZ6dzhpolQq04OY 2WB8W/FC/TODtlxt8Vxb04yzjg== X-Received: by 2002:adf:ee90:: with SMTP id b16mr3363358wro.221.1607955518828; Mon, 14 Dec 2020 06:18:38 -0800 (PST) Received: from localhost.localdomain ([2a01:e0a:490:8730:f2e4:25b3:2b53:52cd]) by smtp.gmail.com with ESMTPSA id h5sm34126285wrp.56.2020.12.14.06.18.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2020 06:18:38 -0800 (PST) From: Loic Poulain To: manivannan.sadhasivam@linaro.org, hemantk@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, bbhatt@codeaurora.org, Loic Poulain Subject: [PATCH v5 10/10] mhi: pci_generic: Add diag channels Date: Mon, 14 Dec 2020 15:25:37 +0100 Message-Id: <1607955937-26951-11-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1607955937-26951-1-git-send-email-loic.poulain@linaro.org> References: <1607955937-26951-1-git-send-email-loic.poulain@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.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 Reviewed-by Hemant Kumar --- drivers/bus/mhi/pci_generic.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c index 156b5fe6..9567b75 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 = {