From patchwork Thu Sep 21 15:29:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Yves MORDRET X-Patchwork-Id: 816964 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=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xygYS6tdKz9t4B for ; Fri, 22 Sep 2017 01:30:52 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751872AbdIUPau (ORCPT ); Thu, 21 Sep 2017 11:30:50 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:12070 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751785AbdIUPaq (ORCPT ); Thu, 21 Sep 2017 11:30:46 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8LFSmDp014952; Thu, 21 Sep 2017 17:29:48 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2d0sqtabqd-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 21 Sep 2017 17:29:48 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 85FD934; Thu, 21 Sep 2017 15:29:47 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node2.st.com [10.75.127.14]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4EBA729C1; Thu, 21 Sep 2017 15:29:47 +0000 (GMT) Received: from localhost (10.75.127.44) by SFHDAG5NODE2.st.com (10.75.127.14) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Thu, 21 Sep 2017 17:29:46 +0200 From: Pierre-Yves MORDRET To: Vinod Koul , Rob Herring , Mark Rutland , Maxime Coquelin , Alexandre Torgue , Russell King , Dan Williams , "M'boumba Cedric Madianga" , Fabrice GASNIER , Herbert Xu , Fabien DESSENNE , Amelie Delaunay , Pierre-Yves MORDRET , , , , Subject: [PATCH v5 0/4] Add STM32 DMAMUX support Date: Thu, 21 Sep 2017 17:29:17 +0200 Message-ID: <1506007761-11621-1-git-send-email-pierre-yves.mordret@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.75.127.44] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG5NODE2.st.com (10.75.127.14) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-21_02:, , signatures=0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patchset adds support for the STM32 DMA multiplexer. It allows to map any peripheral DMA request to any channel of the product DMAs. This IP has been introduced with STM32H7 SoC. --- Version history: v5: * Set selected channel ID within a lock to avoid race condition. Release if any error occurs v4: * Add multi-master ability for STM32 DMAMUX * Get rid of st,dmamux property and custom API between STM32 DMAMUX and DMA. Bindings has changed. DMAMUX will read DMA masters from Device Tree from now on. Merely one DMAMUX node is needed now. * Only STM32 DMA are allowed to be connected onto DMAMUX * channelID is computed locally within the driver and crafted in dma_psec to be passed toward DMA master. DMAMUX router sorts out which DMA master will serve the request automatically. * This version forbids the use of DMA in standalone and DMAMUX at the same time : all clients need to be connected either on DMA or DMAMUX ; no mix up v3: * change compatible to st,stm32h7-dmamux to be mode Soc specific * add verbosity in dma-cells --- Pierre-Yves MORDRET (4): dt-bindings: Document the STM32 DMAMUX bindings dmaengine: Add STM32 DMAMUX driver dt-bindings: stm32-dma: add a property to handle STM32 DMAMUX ARM: configs: stm32: Add DMAMUX support in STM32 defconfig .../devicetree/bindings/dma/stm32-dma.txt | 4 +- .../devicetree/bindings/dma/stm32-dmamux.txt | 84 ++++++ arch/arm/configs/stm32_defconfig | 1 + drivers/dma/Kconfig | 9 + drivers/dma/Makefile | 1 + drivers/dma/stm32-dmamux.c | 327 +++++++++++++++++++++ 6 files changed, 425 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/dma/stm32-dmamux.txt create mode 100644 drivers/dma/stm32-dmamux.c