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: 9521155 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 BF6F56043D for ; Tue, 17 Jan 2017 14:20:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B03392856B for ; Tue, 17 Jan 2017 14:20:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4F1A28575; Tue, 17 Jan 2017 14:20:31 +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 5002F28571 for ; Tue, 17 Jan 2017 14:20:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751186AbdAQOU2 (ORCPT ); Tue, 17 Jan 2017 09:20:28 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:37702 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228AbdAQOU0 (ORCPT ); Tue, 17 Jan 2017 09:20:26 -0500 Received: by mail-wm0-f53.google.com with SMTP id c206so225038039wme.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=ZagmIjw+8bdwrc598aSZalKIC8JWsTXTkTOmbwk/LextBWlcvDrQkkdtMvxhM9zPG3 m2Gii8wddWmJETGAAOUf98AecKrvV+Wck4G17eETh9Y0EcfKtz6HyZ2IwpRgJemP6+LJ FoEwIjLhqBTIzXdt8q6rNP6uKbMN4Ju0K94BlOhoO7ycebbhrbS7UHCFSWNbLgJh5M9k moQXDLXASq5CgQz+/I9SB7RcrwD6JGx/qWf4IWrFGpBIYr1ru/NHqr86UH9B4asqAn7s b2ih1xj8OpIQmrEh7OFTPOVvlh99SNRA/6kozZLbpOTYq8VnP5Yf6H2JmvQ7xl0Z6wOJ QL0A== X-Gm-Message-State: AIkVDXKs/g4VK5C3XX0HLPIUsDg1UNfpOhdp/dvEnAr/iJJWwH6GQ/yQt/Sb4hPcivg2jftu 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: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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);