Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1156424pxu; Thu, 8 Oct 2020 04:59:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysqQNTxXSTk7+VKhjYt6JEfFagsHdB8VrYIZ/XMq1/82zE+0RbtO3m1T1Ask0i8qyliaf7 X-Received: by 2002:a17:906:3c05:: with SMTP id h5mr8307835ejg.70.1602158346224; Thu, 08 Oct 2020 04:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602158346; cv=none; d=google.com; s=arc-20160816; b=VjvYfbdP/lppZVrXIznp5TAfOgkG8CwVLhhlNEx3ksBxSjYcw1ND+xCkmHJ7Rpnmy7 AWH2fwCG6V9MsTL2S0tv1anAfZCXevdV6gGAPEk7rSedhnzJyQSzBP84SgmdaKR7ppEh zEYPd1I4vAoot24e0N/Ehl3imrJpxTbl8aPDheb/Z/Tdvrxv59hdksmiBTogCm37T7rK jLuVwB705uN2g7DuXckVGqNik93s3vr80mgkbqbKia9ZJP6dDjumi9sfR1qUP6JBxG2x lWbVBtTIkkbGeQd1fDEaxKDICntrFlfgr4SYwTt2pYFWK6LMo1pwSzegobKrwq4RRJWl JD8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DgKWSM/jtcxrQPbQE6z3uuSgUn7SP7fKlrH5t9Xqw68=; b=BFrG6Na5wBlylBNI+TfiLT/WrQLJ+DnJDQP5X9YTj/hG3dsVRLzkk1/J0P6hCXi0Mo Yr+9mat90GRNHiMwNWGZICNFvxZHNSVRXh1p4J1Ht441WL5wxVe8iTh3tPQ4wGjsnkcS rSJoqyR5q09FIyuTw7itnWRwoOdDprJE2Umg+zElgAo2TzLNA7t9sGdFlKZtcKZYGmxD k4tncgJX6IYXV6iogBX+diyFfiin0NLH6pIP8H8qSr0YraUo9SucIE+szC7rzJOfnf18 vWdiAoWlKt0Ff2hYAV1jqSeBbJYv0LAG68JycfvwLsc7DNYRs4HZ8Xh9NhaeyEzq3jtS +UCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YuwUcZZG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i7si3525755edf.103.2020.10.08.04.58.42; Thu, 08 Oct 2020 04:59:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@ti.com header.s=ti-com-17Q1 header.b=YuwUcZZG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728821AbgJHLwR (ORCPT + 99 others); Thu, 8 Oct 2020 07:52:17 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:59718 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725871AbgJHLwM (ORCPT ); Thu, 8 Oct 2020 07:52:12 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 098Bq8al025484; Thu, 8 Oct 2020 06:52:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1602157928; bh=DgKWSM/jtcxrQPbQE6z3uuSgUn7SP7fKlrH5t9Xqw68=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=YuwUcZZGTO5JkuAi1QIFPwvem8xSCf8TWAOyFHNM3A+SXd6r1Bjo8u35xkUi7XLsd V5/iRO12XRB/e61mOfJroeCt92WhSmoPaC5mQj8xGcaaF0vv+Ya8IgJydmGOQvfGWy 7qP/PhIOew/EA+pIw7mCoTO/yQS3itbyNXz2ovL4= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 098Bq8ls085424 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 8 Oct 2020 06:52:08 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 8 Oct 2020 06:52:08 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 8 Oct 2020 06:52:08 -0500 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 098Bq3s3083508; Thu, 8 Oct 2020 06:52:06 -0500 From: Peter Ujfalusi To: , , , CC: , , Subject: [PATCH v2 01/11] firmware: ti_sci: rm: Add support for tx_tdtype parameter for tx channel Date: Thu, 8 Oct 2020 14:52:14 +0300 Message-ID: <20201008115224.1591-2-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201008115224.1591-1-peter.ujfalusi@ti.com> References: <20201008115224.1591-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The system controller's resource manager have support for configuring the TDTYPE of TCHAN_CFG register on j721e. With this parameter the teardown completion can be controlled: TDTYPE == 0: Return without waiting for peer to complete the teardown TDTYPE == 1: Wait for peer to complete the teardown Signed-off-by: Peter Ujfalusi Reviewed-by: Tero Kristo Tested-by: Keerthy Reviewed-by: Grygorii Strashko --- drivers/firmware/ti_sci.c | 1 + drivers/firmware/ti_sci.h | 7 +++++++ include/linux/soc/ti/ti_sci_protocol.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c index 896f53ec7857..65a8c2e82093 100644 --- a/drivers/firmware/ti_sci.c +++ b/drivers/firmware/ti_sci.c @@ -2362,6 +2362,7 @@ static int ti_sci_cmd_rm_udmap_tx_ch_cfg(const struct ti_sci_handle *handle, req->fdepth = params->fdepth; req->tx_sched_priority = params->tx_sched_priority; req->tx_burst_size = params->tx_burst_size; + req->tx_tdtype = params->tx_tdtype; ret = ti_sci_do_xfer(info, xfer); if (ret) { diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h index 57cd04062994..dca19ca5fc49 100644 --- a/drivers/firmware/ti_sci.h +++ b/drivers/firmware/ti_sci.h @@ -910,6 +910,7 @@ struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg { * 12 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_credit_count * 13 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::fdepth * 14 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_burst_size + * 15 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_tdtype * * @nav_id: SoC device ID of Navigator Subsystem where tx channel is located * @@ -973,6 +974,11 @@ struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg { * * @tx_burst_size: UDMAP transmit channel burst size configuration to be * programmed into the tx_burst_size field of the TCHAN_TCFG register. + * + * @tx_tdtype: UDMAP transmit channel teardown type configuration to be + * programmed into the tdtype field of the TCHAN_TCFG register: + * 0 - Return immediately + * 1 - Wait for completion message from remote peer */ struct ti_sci_msg_rm_udmap_tx_ch_cfg_req { struct ti_sci_msg_hdr hdr; @@ -994,6 +1000,7 @@ struct ti_sci_msg_rm_udmap_tx_ch_cfg_req { u16 fdepth; u8 tx_sched_priority; u8 tx_burst_size; + u8 tx_tdtype; } __packed; /** diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h index cf27b080e148..d254d99fd45b 100644 --- a/include/linux/soc/ti/ti_sci_protocol.h +++ b/include/linux/soc/ti/ti_sci_protocol.h @@ -345,6 +345,7 @@ struct ti_sci_msg_rm_udmap_tx_ch_cfg { #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_SUPR_TDPKT_VALID BIT(11) #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_CREDIT_COUNT_VALID BIT(12) #define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_FDEPTH_VALID BIT(13) +#define TI_SCI_MSG_VALUE_RM_UDMAP_CH_TX_TDTYPE_VALID BIT(15) u16 nav_id; u16 index; u8 tx_pause_on_err; @@ -362,6 +363,7 @@ struct ti_sci_msg_rm_udmap_tx_ch_cfg { u16 fdepth; u8 tx_sched_priority; u8 tx_burst_size; + u8 tx_tdtype; }; /** -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki