From patchwork Sat Nov 17 14:10:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 999314 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="Y68CTH9G"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42xxpH3WPQz9s9m for ; Sun, 18 Nov 2018 01:10:47 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726160AbeKRA1d (ORCPT ); Sat, 17 Nov 2018 19:27:33 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:53514 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726096AbeKRA1d (ORCPT ); Sat, 17 Nov 2018 19:27:33 -0500 Received: by mail-wm1-f66.google.com with SMTP id g131so798052wmg.3; Sat, 17 Nov 2018 06:10:44 -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=Y4w0Zd3sbw4+l16Z7Ggd9Ui1RcZ4WcW5kvxuX2g0o3I=; b=Y68CTH9GRBRZNjqG88DT+D33o7oCxejHezeJibSVGwnD/C/oldSiPPq4f0r89YzaLL MZigQXwnAolYYfXONncxZtojeTyuuB3p5t5Gi6gIZWeCHAHXD5bHTyklJZ2BJeLwa4lO fbm11k8i/6pF0dRGkqO1Br9Qkd3UlAC1+nRYwJoKSoeH7ijdxISyU3+tM9dPWvl4ZZ7l OGxW1Cs/wbQSbq2AvXNlN7UQAuV+vxeAbPDAvxD0awV0fnW47b3ohB+XZl6JL5tLOdDG GAG2LeYAXWGmjxI+utnLAbNj42guLjA3hsjC1FpOjqyN34/hcpQu0GQdho4oiGhGpJSF Pjig== 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=Y4w0Zd3sbw4+l16Z7Ggd9Ui1RcZ4WcW5kvxuX2g0o3I=; b=UNL44sN1ylW7SvCQeNjXhidZSSaSbBZFMCOeZvPVaQ6rybQ6fWmdD1EOIM72HmPaT+ 0EB0qt50FJJ8GYU07iwl9iKVIq4GXpKvS9eBnkCnl2e+lwrHwmDSy2hymg706nH/aVxK reqzLRrOXw9aL57cg5T/Cd68/R80pRjnVWqKXtqdrO8sze30UFnqpgNWBQ832kit69yE n2DWhOjc8bwvcjwdO2+HjhfA5rQ+fDBXai0sWPJpgeJhHSdxyDLJTqodk4rghkST93i4 Mu80D9y8ZOEMHvx4UKaw2h9Mz78vfEIoqAxHLjo5vQUx21Iyyk9p7KgRzfq1VdNOlDpM 3oWQ== X-Gm-Message-State: AA+aEWYdz3PBVApYkyQPB47xQJ1tGHp9RyxpbJGub552kv8J2uZ7hCqY eSxnbEoo3X4KRihpQvbB2RfJCIvM X-Google-Smtp-Source: AJdET5cqbYxyLwToaK2NCwtW+fNC8aVi968acXz6a/UBxhkTYXavVanDLEETDYspzEKfdnvd+/SCqQ== X-Received: by 2002:a1c:60c2:: with SMTP id u185-v6mr1832769wmb.80.1542463843034; Sat, 17 Nov 2018 06:10:43 -0800 (PST) Received: from debian64.daheim (p5B0D72AE.dip0.t-ipconnect.de. [91.13.114.174]) by smtp.gmail.com with ESMTPSA id q9sm10099267wrp.0.2018.11.17.06.10.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Nov 2018 06:10:41 -0800 (PST) Received: from chuck by debian64.daheim with local (Exim 4.91) (envelope-from ) id 1gO1J2-0002Cy-WC; Sat, 17 Nov 2018 15:10:41 +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 v3 1/2] dt-bindings: dmaengine: dw-dmac: add protection control property Date: Sat, 17 Nov 2018 15:10:39 +0100 Message-Id: <3472502295a0b638de7167e48f4b826050196e55.1542463411.git.chunkeey@gmail.com> 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 --- --- 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 3bd775ba51ce..68327503fa94 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14379,9 +14379,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__ */