From patchwork Sat Nov 10 16:28:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 995933 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="tSWqe/Jb"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42sjBY1Bnnz9s8T for ; Sun, 11 Nov 2018 03:28:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbeKKCOJ (ORCPT ); Sat, 10 Nov 2018 21:14:09 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34330 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726342AbeKKCOJ (ORCPT ); Sat, 10 Nov 2018 21:14:09 -0500 Received: by mail-wr1-f66.google.com with SMTP id j26-v6so4951882wre.1; Sat, 10 Nov 2018 08:28:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vuTwpTy+B1XRv0TRIO/ILpcB3h2f+BOsuVRtEzGD6Qo=; b=tSWqe/JbfWodI0gUgpG4j7U21i1CTmq71/x/uzIRdCITefif/Yoe5Q4hOlV8hWnYqP 26DFfvz71er4sd0qS2yRVJMlGb0wPLTl9OD8/ypCbNx6UQ/IL8JLoaiS82vyNY0Yxmsh pJ+eIEgtKY56AkRiP/2bDfclk27mCcLXU5EU21c6+xKDjWBmRVlTpkAdAr497IHfZ/dq OM2lMwrJQ4MfT7b/KytkEAENCT4YDZ/uQwO4Lh1IzFmCMHvCd2u/aH3OSIxxlPj5jlR3 iG5x/5H6s9WeJhnab6MVqBDrr3u5kxlvnSl9+srepyw9TxFgZqPo7JKWVi2xI4RPf+h5 0Wvw== 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:mime-version :content-transfer-encoding; bh=vuTwpTy+B1XRv0TRIO/ILpcB3h2f+BOsuVRtEzGD6Qo=; b=nJkZ3L5MK68a3RQsFfb0zDmfDMiEw+acwIePKHbky5LmpjXAhfhLP2qH3HoHC+vGBN CvuZzoUlEZQ6raHdYc5q56J2Q+994chki4DuytJiAyDN8rxG8QTdKlqkAUzcVHn0JnFI d3rU+6dOVHZwZCSDxr7tyqaqS/5JTeA7tkZ7SJrV9LAIBNTQOES4Gx341Wezgfm2T+sC /Lky12wiaaRggFHlvCTJvHgNMxJyVrsCfHk9o/Y+bGZZpeXYRMvXhkxRzK9w2cUAm2Xq deeTWtHEN79KH0WjpVPuC+BcMSt5RYNvvPosoLo+FgFQn22FeoKrtjvBEnR5bnnTiCWK L6Bg== X-Gm-Message-State: AGRZ1gIiRtlfKxraXO3A+knio6LTuOmRSmCtRvpZiYgCASnvkqtkbs+1 Ex9Ow+OxRjuQ1DrEWUHtSMwG+633 X-Google-Smtp-Source: AJdET5fTXjpXRz0FObDxx6Y98JyX9sSR4UWL8WFS3nXXgqJi3KUo1g6WqRHFRUYAYh93R9nkYMrc8w== X-Received: by 2002:adf:df82:: with SMTP id z2-v6mr11295905wrl.118.1541867312978; Sat, 10 Nov 2018 08:28:32 -0800 (PST) Received: from debian64.daheim (p5B0D7AC8.dip0.t-ipconnect.de. [91.13.122.200]) by smtp.gmail.com with ESMTPSA id m69-v6sm5602054wmb.8.2018.11.10.08.28.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 10 Nov 2018 08:28:32 -0800 (PST) Received: from chuck by debian64.daheim with local (Exim 4.91) (envelope-from ) id 1gLW7b-0003wx-5u; Sat, 10 Nov 2018 17:28:31 +0100 From: Christian Lamparter To: dmaengine@vger.kernel.org, devicetree@vger.kernel.org Cc: Dan Williams , Vinod Koul , Andy Shevchenko , Viresh Kumar , Rob Herring , Mark Rutland Subject: [PATCH v2 1/2] dt-bindings: dmaengine: dw-dmac: add protection control property Date: Sat, 10 Nov 2018 17:28:30 +0100 Message-Id: X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch for the DesignWare AHB Central Direct Memory Access Controller adds the dma protection control property: "snps,dma-protection-control" as well as the properties specific values defines into a new include file: include/dt-bindings/dma/dw-dmac.h Note: The protection control signals are one-to-one mapped to the AHB HPROT[1:3] signals for this controller. The HPROT0 (Data Access) is always hardwired to 1. Reviewed-by: Andy Shevchenko Signed-off-by: Christian Lamparter Reviewed-by: Rob Herring --- I've included the "Reviewed-by" from the v1 in this patch for now. But if a new issue comes up regarding the updates, please let me know. --- Documentation/devicetree/bindings/dma/snps-dma.txt | 4 ++++ MAINTAINERS | 4 +++- include/dt-bindings/dma/dw-dmac.h | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/dma/dw-dmac.h diff --git a/Documentation/devicetree/bindings/dma/snps-dma.txt b/Documentation/devicetree/bindings/dma/snps-dma.txt index 39e2b26be344..db757df7057d 100644 --- a/Documentation/devicetree/bindings/dma/snps-dma.txt +++ b/Documentation/devicetree/bindings/dma/snps-dma.txt @@ -27,6 +27,10 @@ Optional properties: general purpose DMA channel allocator. False if not passed. - multi-block: Multi block transfers supported by hardware. Array property with one cell per channel. 0: not supported, 1 (default): supported. +- snps,dma-protection-control: AHB HPROT[3:1] protection setting. + The default value is 0 (for non-cacheable, non-buffered, + unprivileged data access). + Refer to include/dt-bindings/dma/dw-dmac.h for possible values. Example: diff --git a/MAINTAINERS b/MAINTAINERS index dacba23b80b4..c35998e20e9d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14107,9 +14107,11 @@ SYNOPSYS DESIGNWARE DMAC DRIVER M: Viresh Kumar R: Andy Shevchenko S: Maintained +F: Documentation/devicetree/bindings/dma/snps-dma.txt +F: drivers/dma/dw/ +F: include/dt-bindings/dma/dw-dmac.h F: include/linux/dma/dw.h F: include/linux/platform_data/dma-dw.h -F: drivers/dma/dw/ SYNOPSYS DESIGNWARE ENTERPRISE ETHERNET DRIVER M: Jose Abreu diff --git a/include/dt-bindings/dma/dw-dmac.h b/include/dt-bindings/dma/dw-dmac.h new file mode 100644 index 000000000000..d1ca705c95b3 --- /dev/null +++ b/include/dt-bindings/dma/dw-dmac.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ + +#ifndef __DT_BINDINGS_DMA_DW_DMAC_H__ +#define __DT_BINDINGS_DMA_DW_DMAC_H__ + +/* + * Protection Control bits provide protection against illegal transactions. + * The protection bits[0:2] are one-to-one mapped to AHB HPROT[3:1] signals. + */ +#define DW_DMAC_HPROT1_PRIVILEGED_MODE (1 << 0) /* Privileged Mode */ +#define DW_DMAC_HPROT2_BUFFERABLE (1 << 1) /* DMA is bufferable */ +#define DW_DMAC_HPROT3_CACHEABLE (1 << 2) /* DMA is cacheable */ + +#endif /* __DT_BINDINGS_DMA_DW_DMAC_H__ */