From patchwork Thu Jul 26 05:06:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 10545205 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 B2083139A for ; Thu, 26 Jul 2018 05:07:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F81A2AB00 for ; Thu, 26 Jul 2018 05:07:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91DA92ACCC; Thu, 26 Jul 2018 05:07: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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BEB12AB00 for ; Thu, 26 Jul 2018 05:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728750AbeGZGWV (ORCPT ); Thu, 26 Jul 2018 02:22:21 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34324 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbeGZGWU (ORCPT ); Thu, 26 Jul 2018 02:22:20 -0400 Received: by mail-pg1-f194.google.com with SMTP id y5-v6so375774pgv.1 for ; Wed, 25 Jul 2018 22:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=ceFnTmxQPfvKFlcjJPNf0KRAmeXXOimer6WKQOqkrlU=; b=C8aknY5SanwLy8gCmCVLLiCcUu3Cxsh/nOm/vEz0gG68vzZMiZuEyKU99qN4GAglRG XDUxRjtibmr4GCePjDdD7msZc0gGGwuepLMlH8qRgk2tply7NzUpJ+RZ5WLBT1xS59Ng R31yfa6rJGYmJp7b91+cmz90I+iA4XIWUexqM= 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; bh=ceFnTmxQPfvKFlcjJPNf0KRAmeXXOimer6WKQOqkrlU=; b=iQnKFi5Ie0HexHU91S2MgobTdl8iAnFlCvuIP8+vupFkwQdzgc8QNtA8HUnouCqVgt dsD8XtsqSiJa1svuDd/aPxMgfU+0AxhBGEsKSy2qCWiZp6clx7oonEl2sgp+20Ytsmyg ji2ym5YL36w1D0U8dZ9p3rJYwDUxbXI8jcNDhma1ywwHfFz0HQVwaIKRGlW1zrnTNbxy kCClH5fzJtQYGPkTtcepKTocJTlXVOTUaVuSwroqVTzVpNYRCXKzs1+XXBwpM2tnjsLp 1wx3fFxFn/O0nuyFSfR5ZXdCOvypake6NWj0fm/p8yGng/XsFnIq6H0XZKZzIpQCoLs2 MN+A== X-Gm-Message-State: AOUpUlHz5YANUEH+gdn/ZvSRuA4ZwaubIcvjuiwwd6ldMgl5qHSFAyla g+aTXt7VtzSK7v31iHRYOlhX X-Google-Smtp-Source: AAOMgpeZ+Q8BM0bqCQOlD//oWu5sJ0pbVbLGLXHWW/rfJhp86GtyjbXP220kZ8OI78R7CFXCTVvkFw== X-Received: by 2002:a63:dc53:: with SMTP id f19-v6mr537108pgj.56.1532581639030; Wed, 25 Jul 2018 22:07:19 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:6208:6a6e:a8cb:6394:3bdf:2b97]) by smtp.gmail.com with ESMTPSA id y4-v6sm492540pfm.137.2018.07.25.22.07.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jul 2018 22:07:18 -0700 (PDT) From: Manivannan Sadhasivam To: vkoul@kernel.org, dan.j.williams@intel.com, afaerber@suse.de, robh+dt@kernel.org, dmaengine@vger.kernel.org, liuwei@actions-semi.com, 96boards@ucrobotics.com, devicetree@vger.kernel.org, daniel.thompson@linaro.org, amit.kucheria@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hzhang@ucrobotics.com, bdong@ucrobotics.com, manivannanece23@gmail.com, thomas.liau@actions-semi.com, jeff.chen@actions-semi.com, pn@denx.de, edgar.righi@lsitec.org.br Cc: Manivannan Sadhasivam Subject: [PATCH v3 0/4] Add Actions Semi Owl family S900 DMA Controller support Date: Thu, 26 Jul 2018 10:36:54 +0530 Message-Id: <20180726050658.1399-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patchset adds DMA controller support for Actions Semi Owl family S900 SoC. This driver has been structured in a way such that there will be only one controller driver for the whole Owl family series (S500, S700 and S900 SoCs). There are 12 physical channels and 46 logical channels supported by the DMA controller. The DMA controller also supports 4 software configurable interrupt lines for the priority based DMA usecase. But the DMA driver supports only 1 interrupt for simplification. By default, the driver uses Linked list mode for all transfers. Right now only MEMCPY support has been added and the rest (SLAVE, CYCLIC) will be added in upcoming patches. The driver has been tested using dmatest utility on the Bubblegum-96 board. The DTS patches in this series depends on the pinctrl DTS patches submitted [1], which is yet to be merged by the platform maintainer Andreas. Since the DMA driver goes through DMA tree and the relevant DTS patches goes through ARM-SoC tree, Andreas will pick it up once it has been reviewed. For the reference, I have queued up all reviewed dts patches so far in my repo [2] from which Andreas is picking them for 4.19. Thanks, Mani [1] https://patchwork.kernel.org/patch/10322937/ [2] https://git.linaro.org/people/manivannan.sadhasivam/linux.git/log/?h=s900-for-next Changes in v3: As per Vinod's review: * Removed unused header and API's * Used GENMASK for defines * Removed per member comment for structs * Modified pchan* and dma* API's to use corresponding containers as arguments * Removed error messages regarding the no free channels * Added devm_free_irq in dma_remove * Used dmaengine instead of dma for commit titles Changes in v2: * Fixed up the multi-line alignments according to `checkpatch --strict` Manivannan Sadhasivam (4): dt-bindings: dmaengine: Add binding for Actions Semi Owl SoCs arm64: dts: actions: Add Actions Semi S900 DMA Controller dmaengine: Add Actions Semi Owl family S900 DMA driver MAINTAINERS: Add entry for Actions Semi Owl SoCs DMA driver .../devicetree/bindings/dma/owl-dma.txt | 47 + MAINTAINERS | 2 + arch/arm64/boot/dts/actions/s900.dtsi | 13 + drivers/dma/Kconfig | 8 + drivers/dma/Makefile | 1 + drivers/dma/owl-dma.c | 971 ++++++++++++++++++ 6 files changed, 1042 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/owl-dma.txt create mode 100644 drivers/dma/owl-dma.c