Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4415699pxk; Wed, 30 Sep 2020 02:16:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPANbRhKu7upYzfCnOQ+T7mbpOGqjDLwtFslDgiW+J21W6V9f1nCVse2BN6rl0aPOyU/56 X-Received: by 2002:aa7:dbcb:: with SMTP id v11mr1638104edt.351.1601457418005; Wed, 30 Sep 2020 02:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601457417; cv=none; d=google.com; s=arc-20160816; b=GmLkrzJsDLM7G2Do0cCR6c1CnbNe7s4pk+fs2G+kzm/miqWFe7eJ2NyjYILgElfChf O1+06p01g3fajWVAhmJPyygcQOGO0N/kH3PvpDtE4x/Zgr5vB0sF2JUzMtqpGPvEelrc 572AFfeRgzYV/LheRZz0U+73z10q+qvbQPQLj3O3qfBL8wJzr2YWPj0YfagmjSjYC/H2 5AhFR7ThreMrBu8i1Fv4TRn2F3163JdtYGBa80HOC46OdxhrD5s2exseuKEAToAnsT1X XJaKm+xvl1r+Nri7vhe+aD9DjpzhsF/02Th/vYcrz/JsnVKrjhPxIdhUi9WOpn4YAHS/ Cszg== 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=F1UBBxuJBBt4i9B5EabYSjDpVXsLLY8WCh/WDwvs4ko=; b=nVWyXcIw2i2RzS03jKf/dfgjcnXcz3EsDzwxWdyd0OfmGaQYgT5h97aettdYIVR0/y lXNAmafqcL40ejTPbP85q1+OZvo2ygUqhYTkL2xYQRHHMjNP37mYhtQeot7dme8fgVPu ZNOydzt7n0IRtp2SAZSDs0JVEp9Vtx3/RJ+puyPovuPKUZvx3a3Ya01Wf0q8hVW3SF4g /3jYZ6Fmp39VpY365xBiRipdUXd8YXUc78rYMrbuPdeWyXfhKn/pb5id4vMbTpngYUTI 14K8oHriy0C2hOBfR8zBjXWHilK57S6npyDZsmwbjEgC1z0EQOX/jTp38xhkhnZaGMt8 QRBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=YXaWa3Jf; 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 rh24si746998ejb.283.2020.09.30.02.16.35; Wed, 30 Sep 2020 02:16:57 -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=YXaWa3Jf; 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 S1729102AbgI3JOe (ORCPT + 99 others); Wed, 30 Sep 2020 05:14:34 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:35120 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725872AbgI3JO2 (ORCPT ); Wed, 30 Sep 2020 05:14:28 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 08U9ENoI035023; Wed, 30 Sep 2020 04:14:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1601457263; bh=F1UBBxuJBBt4i9B5EabYSjDpVXsLLY8WCh/WDwvs4ko=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=YXaWa3Jf0MhiprwqLEwVg4A5Jr59PfudNiFSsnKL52m5t8a+SG3ZT/iRpyL3wHQbc 64hQangtImQ41T/BPQuDQ1BxfbQx7mwO4GyFz9gdqTOJTtEzot4b55cd9hfyfYmFbL wO6Be1UVoG0OBfYQ5BE/r/wtcGGiIB8hl0JudUAQ= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 08U9EN6X122184; Wed, 30 Sep 2020 04:14:23 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) 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; Wed, 30 Sep 2020 04:14:22 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE101.ent.ti.com (10.64.6.22) 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; Wed, 30 Sep 2020 04:14:22 -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 08U9DuJf116385; Wed, 30 Sep 2020 04:14:20 -0500 From: Peter Ujfalusi To: , , , , CC: , , , , , , Subject: [PATCH 08/18] dmaengine: ti: k3-udma-glue: Configure the dma_dev for rings Date: Wed, 30 Sep 2020 12:14:02 +0300 Message-ID: <20200930091412.8020-9-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200930091412.8020-1-peter.ujfalusi@ti.com> References: <20200930091412.8020-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 Rings in RING mode should be using the DMA device for DMA API as in this mode the ringacc will not access the ring memory in any ways, but the DMA is. Fix up the ring configuration and set the dma_dev unconditionally and let the ringacc driver to select the correct device to use for DMA API. Signed-off-by: Peter Ujfalusi --- drivers/dma/ti/k3-udma-glue.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c index a53bc4707ae8..f39825ce288a 100644 --- a/drivers/dma/ti/k3-udma-glue.c +++ b/drivers/dma/ti/k3-udma-glue.c @@ -280,6 +280,10 @@ struct k3_udma_glue_tx_channel *k3_udma_glue_request_tx_chn(struct device *dev, goto err; } + /* Set the dma_dev for the rings to be configured */ + cfg->tx_cfg.dma_dev = k3_udma_glue_tx_get_dma_device(tx_chn); + cfg->txcq_cfg.dma_dev = cfg->tx_cfg.dma_dev; + ret = k3_ringacc_ring_cfg(tx_chn->ringtx, &cfg->tx_cfg); if (ret) { dev_err(dev, "Failed to cfg ringtx %d\n", ret); @@ -589,6 +593,10 @@ static int k3_udma_glue_cfg_rx_flow(struct k3_udma_glue_rx_channel *rx_chn, goto err_rflow_put; } + /* Set the dma_dev for the rings to be configured */ + flow_cfg->rx_cfg.dma_dev = k3_udma_glue_rx_get_dma_device(rx_chn); + flow_cfg->rxfdq_cfg.dma_dev = flow_cfg->rx_cfg.dma_dev; + ret = k3_ringacc_ring_cfg(flow->ringrx, &flow_cfg->rx_cfg); if (ret) { dev_err(dev, "Failed to cfg ringrx %d\n", ret); -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki