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: 91661 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp511837qgi; Tue, 17 Jan 2017 06:20:31 -0800 (PST) X-Received: by 10.84.208.102 with SMTP id f35mr58974572plh.137.1484662831464; Tue, 17 Jan 2017 06:20:31 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33si25077113plb.300.2017.01.17.06.20.31; Tue, 17 Jan 2017 06:20:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@baylibre-com.20150623.gappssmtp.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751186AbdAQOU2 (ORCPT + 4 others); 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 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(+) -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);