From patchwork Thu Mar 14 20:25:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10853517 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A64181515 for ; Thu, 14 Mar 2019 20:26:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90816289D3 for ; Thu, 14 Mar 2019 20:26:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84AB02A759; Thu, 14 Mar 2019 20:26:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 117BE289D3 for ; Thu, 14 Mar 2019 20:26:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=r5fIhVzQrMzxJzy2wHBUBBl97kCoXprTBmNo0nlccYU=; b=sXlmD9jmioO0w0 XnpjH9lx1FOjhBzakba1WMiTlzrTcJz1OyeTY9EKqVmjxoWw03fHBhjHFxEnavwYzjuwzW2V7h9yE B5fRtaztd6zzCYFa1GuQAgRdskCj+RCBM98VwZJsyfeqIn+7qMbynt/+6Ls5ckLjvRqA2olU8WhIl skxXebNDO3xI3WUFYJEEaGAR8m8IvkRF4JcYCgzg2MeSGChi9UrDfi/DYuXTSGCqJUku7UWFMrOEw WAjZhfrigU9nKEuOHY/Fs3jydnMJUqVavdasoQmeBWd2ZyPC5nHG9V3coJBkEovkuaS/cNFqBJ08v g8d9Ck085o+MFlJyGmzw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4Wvf-0002CD-1k; Thu, 14 Mar 2019 20:26:15 +0000 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4Wvb-0002Ba-DI for linux-arm-kernel@lists.infradead.org; Thu, 14 Mar 2019 20:26:13 +0000 X-Originating-IP: 90.89.68.76 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (Authenticated sender: maxime.ripard@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 3B809FF807; Thu, 14 Mar 2019 20:26:07 +0000 (UTC) From: Maxime Ripard To: Mark Rutland , Rob Herring , Frank Rowand , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v4 0/7] sunxi: Add DT representation for the MBUS controller Date: Thu, 14 Mar 2019 21:25:59 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190314_132611_595933_001FD26F X-CRM114-Status: GOOD ( 13.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Thomas Petazzoni , Arnd Bergmann , dri-devel@lists.freedesktop.org, Georgi Djakov , Paul Kocialkowski , Yong Deng , Robin Murphy , Dave Martin , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, We've had for quite some time to hack around in our drivers to take into account the fact that our DMA accesses are not done through the parent node, but through another bus with a different mapping than the CPU for the RAM (0 instead of 0x40000000 for most SoCs). After some discussion after the submission of a camera device suffering of the same hacks, I've decided to put together a serie that introduce a special interconnect name called "dma" that that allows to express the DMA relationship between a master and its bus, even if they are not direct parents in the DT. Let me know what you think, Maxime Changes from v3: - Rebased on top of current next - Use a function pointer instead of the parent device node to fix the recursive cases - Fix the usage of the device_node index in __of_get_dma_parent - Refer to the DT Specification for dma-ranges in the MBUS binding - Used dma-mem as the property instead of dma Changes from v2: - Rewrite commit logs still mentionning dma-parent - Removed dma-parent-cells left over in the binding example - Removed dma-parent still being mentionned in comments Changes from v1: - Change to use the now merged interconnect bindings - Move the DMA parent retrieval logic to its own function - Rebase on top of 5.0 Maxime Ripard (7): dt-bindings: interconnect: Add a dma interconnect name dt-bindings: bus: Add binding for the Allwinner MBUS controller of: address: Add parent pointer to the __of_translate_address args of: address: Add support for the parent DMA bus drm/sun4i: Rely on dma interconnect for our RAM offset clk: sunxi-ng: sun5i: Export the MBUS clock ARM: dts: sun5i: Add the MBUS controller Documentation/devicetree/bindings/arm/sunxi/sunxi-mbus.txt | 36 ++++++- Documentation/devicetree/bindings/interconnect/interconnect.txt | 4 +- arch/arm/boot/dts/sun5i.dtsi | 13 ++- drivers/clk/sunxi-ng/ccu-sun5i.h | 4 +- drivers/gpu/drm/sun4i/sun4i_backend.c | 28 +++-- drivers/of/address.c | 42 +++++-- include/dt-bindings/clock/sun5i-ccu.h | 2 +- 7 files changed, 110 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/sunxi/sunxi-mbus.txt base-commit: cf08baa29613dd899954089e7cc7dba1d478b365