From patchwork Tue Jan 17 14:20:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 9521151 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B505C6020A for ; Tue, 17 Jan 2017 14:20:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A623B2856B for ; Tue, 17 Jan 2017 14:20:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AB2428571; Tue, 17 Jan 2017 14:20:29 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 7092A2856B for ; Tue, 17 Jan 2017 14:20:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751183AbdAQOU1 (ORCPT ); Tue, 17 Jan 2017 09:20:27 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35285 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbdAQOU0 (ORCPT ); Tue, 17 Jan 2017 09:20:26 -0500 Received: by mail-wm0-f45.google.com with SMTP id r126so202727640wmr.0 for ; Tue, 17 Jan 2017 06:20:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qNJKRmaVZQvfA/apZHsHwVWAs2lZPLblEY2H9P03Bo4=; b=LkCbhZOztsntAPwF0pNmV3+2y7X4UlS4b3vgkiBoX6tzmFDr7Vj/Jlp9T2GC6aecPJ zhNlto+2suha8JMQvleqt6zpg2BqSBIpAxwrIlGa9dOKP64UR1XoaIXomhcn/WkSs9/O Nk+tt7qw12gOSd/rwb2/bOUbcmZcU3K2FoIniKJ1DVw4j1C1k8t2l7nP4whiGMeH0Dza nDZMQylmTN7L29DhEbrGXr14C9pDKo2u23q++ClyRUcFwxbFThHDM/jArsGoO/pQBjyE ofdlzVGsHExvhXCqol1eU4RtcbwuqVR/HOxKdLiCiFyyDyxKE6N4tGZrkePJSGR4c1G5 vPMw== 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:in-reply-to :references; bh=qNJKRmaVZQvfA/apZHsHwVWAs2lZPLblEY2H9P03Bo4=; b=kAmQOps4O9zO8igN2vC68zvEv60qEH5eGhlz5QNFZomBdJAzC0EDb3pHYzTaPneMhq 8PShrqv0jULfNl9KrLolnSsuiORwFq/loIFFPa4KxYPkj6FXUsKxa+cH3R9uWadqZi2O yxc16aGeLyXm3qU+xkrF+16EL/o84J3amNiZJ8vGWbdutRvTkpIyVF1jXwnrglsFWkYn TYQ455L5It3cQ0Hniwh+Mwgvpw/UymcAmtdZ35hKpPIXqH70+MKVXpyp+X0JQRREfuWe 3V3ca7Mgrkth9ukMyPPVFHf+KbmKWGCNbDj+iT+qA+s5sRs9bZyNsp9knsiVN963g14Y 0x8w== X-Gm-Message-State: AIkVDXIikTIQAJ4Hi+xSqVGxzZIM8GdQlcFFPdzMRAfPaK4XsBCP+Ia/cyBd7/gwXo7VG8NV X-Received: by 10.28.15.138 with SMTP id 132mr15377031wmp.41.1484662824912; Tue, 17 Jan 2017 06:20:24 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id o132sm37203079wmo.17.2017.01.17.06.20.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Jan 2017 06:20:24 -0800 (PST) From: Alexandre Bailon To: vinod.koul@intel.com, robh+dt@kernel.org Cc: dmaengine@vger.kernel.org, nsekhar@ti.com, khilman@baylibre.com, ptitiano@baylibre.com, tony@atomide.com, linux-omap@vger.kernel.org, b-liu@ti.com, sergei.shtylyov@cogentembedded.com, devicetree@vger.kernel.org, Alexandre Bailon Subject: [PATCH v2 2/3] dmaengine: cppi41: Implement the glue for DA8xx Date: Tue, 17 Jan 2017 15:20:15 +0100 Message-Id: <20170117142016.11163-3-abailon@baylibre.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170117142016.11163-1-abailon@baylibre.com> References: <20170117142016.11163-1-abailon@baylibre.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The DA8xx has a CPPI 4.1 DMA controller. This is add the glue layer required to make it work on DA8xx. Signed-off-by: Alexandre Bailon --- drivers/dma/cppi41.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index 0bc4f1a..aab1e5a 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -221,6 +221,20 @@ static const struct chan_queues am335x_usb_queues_rx[] = { [29] = { .submit = 30, .complete = 155}, }; +static const struct chan_queues da8xx_usb_queues_tx[] = { + [0] = { .submit = 16, .complete = 24}, + [1] = { .submit = 18, .complete = 24}, + [2] = { .submit = 20, .complete = 24}, + [3] = { .submit = 22, .complete = 24}, +}; + +static const struct chan_queues da8xx_usb_queues_rx[] = { + [0] = { .submit = 1, .complete = 26}, + [1] = { .submit = 3, .complete = 26}, + [2] = { .submit = 5, .complete = 26}, + [3] = { .submit = 7, .complete = 26}, +}; + struct cppi_glue_infos { irqreturn_t (*isr)(int irq, void *data); const struct chan_queues *queues_rx; @@ -962,8 +976,18 @@ static const struct cppi_glue_infos am335x_usb_infos = { .qmgr_num_pend = 5, }; +static const struct cppi_glue_infos da8xx_usb_infos = { + .isr = cppi41_irq, + .queues_rx = da8xx_usb_queues_rx, + .queues_tx = da8xx_usb_queues_tx, + .td_queue = { .submit = 31, .complete = 0 }, + .first_completion_queue = 24, + .qmgr_num_pend = 2, +}; + static const struct of_device_id cppi41_dma_ids[] = { { .compatible = "ti,am3359-cppi41", .data = &am335x_usb_infos}, + { .compatible = "ti,da8xx-cppi41", .data = &da8xx_usb_infos}, {}, }; MODULE_DEVICE_TABLE(of, cppi41_dma_ids);