Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5921783ybv; Tue, 18 Feb 2020 06:31:50 -0800 (PST) X-Google-Smtp-Source: APXvYqxruu/moU52Hak75SlD+c+co0Mjei8U+1owS7R5S1jObYDXrD0oOeg2bAki/ZV/GCpbTRRe X-Received: by 2002:a9d:6f11:: with SMTP id n17mr15771395otq.126.1582036309962; Tue, 18 Feb 2020 06:31:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582036309; cv=none; d=google.com; s=arc-20160816; b=MiNb94xylApjw/tR3PmBEX7Nr4zlBt7sNGfk22D+3c21k9coLqyuw5HDaldJZRJDX8 ihmiCiJVIZoAHhtaKsFELYjVfl3MUvbCK7A56uvMJsUGw5I2c2zS9+0UxQ6cy34ztFqy 4hI6WdgIeUv2k2EsvqTjABO2i1Ef7pHSWuVdpPClZCKxd+qfsegKv//0bSAo9rRYrRtF pryd5Z51qu3W7xDhtVr8FqV7qBnWs+YTe1GMCc3Zx6+4A0Ql1C7Pua0xLAxg3fmPAoKY TUHxoB4lLFlPO/RHk5+TAgGov9MmM/Van7JF/IbsL8fbeyKHsvgvawP2Bm2dWSpdBr4z xlkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=82b+GU41j6/ZUJlCKcQWhnK8ypPA4+6ZqSrNcaCLVjI=; b=PwPR05knJt9AM2O9s6PLyfJmXtCIA6N0qPC4ESXkUln6CSFwQ1T1m9mXnF7AGSJOUq zUenUnf35CRcDIqzIF3CTI1Utq/MlnRB6WjJfujy5cxD6g9m8iLk9UUQeV5/TGHKQi+7 1RT575SqgzWNjDqCamts4pXyydrWtZNi+fzLU030euHg8wFeak8iFllrMXzfHoj2a/9f siPcY7blq9rChUu5GiTLVKhetbNSGvWwYC3RGgv63dtitOe8EcxIp2o3o5+cu8haSFkF 2omXNqNr3gT5LLwk1hAbnwg3wJ6ewhGDcyRrjyzmLxnh1rEUltCtV0HWeMGZqXlWEBzK 4oHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b2pdloQ7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id q189si7857996oic.235.2020.02.18.06.31.37; Tue, 18 Feb 2020 06:31:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=b2pdloQ7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726703AbgBROb1 (ORCPT + 99 others); Tue, 18 Feb 2020 09:31:27 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:50142 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726116AbgBROb1 (ORCPT ); Tue, 18 Feb 2020 09:31:27 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 01IEVL7d078364; Tue, 18 Feb 2020 08:31:21 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1582036281; bh=82b+GU41j6/ZUJlCKcQWhnK8ypPA4+6ZqSrNcaCLVjI=; h=From:To:CC:Subject:Date; b=b2pdloQ7Oy5dzKqhKxVB+Ai2KlO0KfgQ246uuv69Q5YSJlX9WnIzYZZAiH5xhuwij SQfNOWG1PR0DOYU6qh/V70wxru0id4y2KrtyJNDn48Kw78dpc86Spag7zxtSyMnGmK V18i8z3+4aVWoM6oK1L+PNsu/RREl9I4lSeJL36M= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 01IEVK1R108705 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 18 Feb 2020 08:31:21 -0600 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 18 Feb 2020 08:31:20 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 18 Feb 2020 08:31:20 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 01IEVHXJ098737; Tue, 18 Feb 2020 08:31:18 -0600 From: Peter Ujfalusi To: , , CC: , , , , Subject: [PATCH 0/2] dmaengine: ti: k3-udma: Support for per channel atype Date: Tue, 18 Feb 2020 16:31:24 +0200 Message-ID: <20200218143126.11361-1-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, The series is on top of the 5.6 update patches: https://lore.kernel.org/lkml/20200214091441.27535-1-peter.ujfalusi@ti.com/ UDMA channels have ATYPE property which tells UDMA on how to treat the pointers within descriptors (and TRs). The ATYPE defined for j721e are: 0: pointers are physical addresses (no translation) 1: pointers are intermediate addresses (PVU) 2: pointers are virtual addresses (SMMU) When Linux is booting within a virtualized environment channels must have the ATYPE configured correctly to be able to access memory (ATYPE == 0 is not allowed). The ATYPE can be different for channels and their ATYPE depends on which endpoint they are servicing, but it is not hardwired. In order to be able to tell the driver the ATYPE for the channel we need to extend the dma-cells in case the device is going to be used in virtualized setup. Non virtualized setups can still use dma-cells == 1. If dma-cells == 2, then the UDMA node must have ti,udma-atype property which is used for non slave channels (where no DT binding is exist for a channel). Regards, Peter --- Peter Ujfalusi (2): dt-bindings: dma: ti: k3-udma: Update for atype support (virtualization) dmaengine: ti: k3-udma: Implement support for atype (for virtualization) .../devicetree/bindings/dma/ti/k3-udma.yaml | 19 ++++++- drivers/dma/ti/k3-udma-glue.c | 18 ++++++- drivers/dma/ti/k3-udma.c | 50 ++++++++++++++++--- 3 files changed, 76 insertions(+), 11 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki