Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1144789pxb; Wed, 6 Apr 2022 09:45:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyCryto9ZALIm7RHyI9J92fsgcEFPycYSZYVHTD0KuqA5SRso4VCzDpqHQuCgYXgvu07Kp X-Received: by 2002:a05:6a00:1a10:b0:4fa:ed5a:6697 with SMTP id g16-20020a056a001a1000b004faed5a6697mr9713513pfv.81.1649263548446; Wed, 06 Apr 2022 09:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649263548; cv=none; d=google.com; s=arc-20160816; b=Txwqm5XhX7jeAeyZyK72+a/oF+S7qoAAhV5XFHQPXM0gOY4YbRqCDiBrJzkCNnv9cl IwLPwc2jEyS0d3ZaSsO0AeSl9Ap4wWq4p0baBF8gqkOtIxb7AoD1bbIghCKnPQl8AzlN /TeR0DlchR3IPx16RfH5P6FFCeQsAIyyA7vCESkSppqlweuGwj4mmch9zj4977jhnS6O Aa2JWnYi1Bta+0xcLl8ryl/eYJaEclZhNV29SNvbIc7rNXmmP5IWFvnazJZd1HOS0QKk +UgjPWOuAZr61L/9qwVmzVrBo5w2Cl/4tGJoa0GID9KfGVzSfFyxWKRaG3A2I7GhwnhG cWUw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=sfkCqkDOoJ42Isx9XUHpbkWn0bP80xXD3dTpA8ZrF7I=; b=f3xuARwV0QObVaJ1odtoOW9vhjdCP+FNN/HFm3Jz68Rl9GfAtXPVKsWs8C4HlT3oTF YR3U3dSiz7y3g534m8xI2danbpdxOjs2lvaCM16yMVD0r+dywVIkbR88fUhzXnkhtzFM K6rS//5KtNjF954/ryUKneSZMX+wkmJPx2j7X56dkc7EzNmSddpJdsgQFXG8PWTpbK3Z LkpLkJbIw8x+H4k68vyei2/r0xUm7g1ZuQva8975vzTtNGQiDkkG9CLDxigDTPnSuiXw qRaDAku3VCuWNbLhkeeYWJ51Q5kNUhk6fq1NL5QQyxxjfGT16AVji024b1tg+fLC1qYN 6njQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TwpYw6Fg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id e16-20020a63db10000000b003816043ee60si15446332pgg.85.2022.04.06.09.45.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:45:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TwpYw6Fg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0A94E3D022D; Wed, 6 Apr 2022 08:57:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236889AbiDFP6u (ORCPT + 99 others); Wed, 6 Apr 2022 11:58:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237533AbiDFP6O (ORCPT ); Wed, 6 Apr 2022 11:58:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2D102AA18D; Wed, 6 Apr 2022 06:25:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5F50B60BBC; Wed, 6 Apr 2022 13:25:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 185FAC385A1; Wed, 6 Apr 2022 13:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649251523; bh=QGkEFEefYTEXkBMQJmoYFoH64Owk00x5HUyX9UzaMs8=; h=From:To:Cc:Subject:Date:From; b=TwpYw6Fg0t6V8g3Y7nVZRVWV8NiF+3mdJQYWFirzVZ4t+NhlaKECJ3JtqEhRg8ktS Gq60nyUvTUKVGCu8Fr5ISHt5ArbWDbdaTXwyrTRLUeiZ+TBf1YrDCSf4vYUyiYpy25 9KfXhv2PzqvtCB/Xiv1Gus4I82LFALzoLrwETJmc6eqB4ZJlFi7YtDHb/WvlIDVfqA dlMYd43CgZOk/+1b7zjWOgPizhaLY587A2LsD45zBzb1HbHsPe0ASSRZpjWJ82Z35Y D8WiAPxLT4iwfiatsghZPzA+MzynRuupSb8cHIleMmFvveK8tlC9q4aoUMWiBGbxd4 Nh+3Ypkh8Up1w== From: Vinod Koul To: Vinod Koul Cc: linux-arm-msm@vger.kernel.org, Bjorn Andersson , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dmaengine: qcom: gpi: set chain and link flag for duplex Date: Wed, 6 Apr 2022 18:55:06 +0530 Message-Id: <20220406132508.1029348-1-vkoul@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Newer platforms seem to have strict requirement for TRE flags which causes transaction to timeout. This was resolved to missing chain and link flag for duplex spi transaction. So add these two flags. Signed-off-by: Vinod Koul --- drivers/dma/qcom/gpi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c index 94f3648f7483..3429ceccd13b 100644 --- a/drivers/dma/qcom/gpi.c +++ b/drivers/dma/qcom/gpi.c @@ -1754,10 +1754,14 @@ static int gpi_create_spi_tre(struct gchan *chan, struct gpi_desc *desc, tre->dword[2] = u32_encode_bits(spi->rx_len, TRE_RX_LEN); tre->dword[3] = u32_encode_bits(TRE_TYPE_GO, TRE_FLAGS_TYPE); - if (spi->cmd == SPI_RX) + if (spi->cmd == SPI_RX) { tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOB); - else + } else if (spi->cmd == SPI_TX) { + tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_CHAIN); + } else { /* SPI_DUPLEX */ tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_CHAIN); + tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_LINK); + } } /* create the dma tre */ -- 2.34.1