From patchwork Mon Jan 23 17:24:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 92258 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1328703qgi; Mon, 23 Jan 2017 09:25:12 -0800 (PST) X-Received: by 10.84.197.1 with SMTP id m1mr45433903pld.123.1485192312448; Mon, 23 Jan 2017 09:25:12 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20si16248948plj.268.2017.01.23.09.25.12; Mon, 23 Jan 2017 09:25:12 -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 S1751398AbdAWRZK (ORCPT + 4 others); Mon, 23 Jan 2017 12:25:10 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38444 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbdAWRZI (ORCPT ); Mon, 23 Jan 2017 12:25:08 -0500 Received: by mail-wm0-f53.google.com with SMTP id r144so166710744wme.1 for ; Mon, 23 Jan 2017 09:25:03 -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=ezswBeuWKFLNlmYYPSTuH4xMtF7vXTE/bzo6OLkZvhw=; b=oHMg7wTukpR0X33A35j97ygpk5xcoWdYWiQhqqQTPKrMCW14Q0aUnpF6jjwlU7k2rE 1li4j9hVmG+woGkmv9FMu5RMGQ6enDw/MTSKdh4tgkBKOVDbP73ZVDVgBPTbFe7VV++U biROYFG5Mf65u49GQx1wJeePaxuhFAKO5Bm7ZumNUPN55NXE8wno8t5RC2s4pRjc2J4l zMASFq3NSaWQMpbEoCPfXZZ6aA+SCGY0IH6nmq96t71cR0ESQDffBvsYLINIXyeGZVAD sV1CgPzrmfQkV04lbHc63bW2/fMHIRsAVUmSt25MHWmllSy8GUwAp1f8u6am011Zdzpo xmKg== 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=ezswBeuWKFLNlmYYPSTuH4xMtF7vXTE/bzo6OLkZvhw=; b=ejMQwZlTQzz8h3Ip5ee3W38tlEfnwt7eed8MFNETijc86aeJjUDVhoxO0C7Lds60MM IUjSJoIfAt4KgdcDtoU8VTUlJN0sDCMIPo03fsGTp7Q9G3ZmVmldN/qWmQrAf3rZuSSt hIz9sisHgTThBvL5B4YJ+7O3NZUkoSYdcrcIqsLnOB3VaxLZv8kgUfD9XtfM9NJWZMQ/ 07vfXYQvR2ibdvv4rGU1vk19tb/ZRg8urhaZPSEzO2Mb1OQX58M19S4LvNQ0p+XokWBA ummVszxbS5dGXqBRBZC7LChTV4snJbGdo+EzCnv7F6oiEGIgyxbT6DTl8xMHhpE8haN2 s90g== X-Gm-Message-State: AIkVDXJ8+Z1CQosOj/OtNMVdv11JbZXR0Il/Xt6ZfpPMR8UqIyuWcI0MWt2LWvwWRYcYDtR6 X-Received: by 10.28.94.8 with SMTP id s8mr14021925wmb.117.1485192302298; Mon, 23 Jan 2017 09:25:02 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id g71sm11328119wmc.9.2017.01.23.09.25.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Jan 2017 09:25:01 -0800 (PST) From: Alexandre Bailon To: vinod.koul@intel.com 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, Alexandre Bailon Subject: [PATCH v4 1/5] dmaengine: cppi41: Remove usbss_mem Date: Mon, 23 Jan 2017 18:24:48 +0100 Message-Id: <20170123172453.30224-2-abailon@baylibre.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170123172453.30224-1-abailon@baylibre.com> References: <20170123172453.30224-1-abailon@baylibre.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org In order to make CPPI 4.1 DMA driver more generic, accesses to USBSS have been removed. So it is not required anymore to map the "glue" register's. Remove usbss_mem. Signed-off-by: Alexandre Bailon --- drivers/dma/cppi41.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) -- 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 4999e7d..1743d3d 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c @@ -131,7 +131,6 @@ struct cppi41_dd { u32 first_td_desc; struct cppi41_channel *chan_busy[ALLOC_DECS_NUM]; - void __iomem *usbss_mem; void __iomem *ctrl_mem; void __iomem *sched_mem; void __iomem *qmgr_mem; @@ -973,6 +972,7 @@ static int cppi41_dma_probe(struct platform_device *pdev) struct cppi41_dd *cdd; struct device *dev = &pdev->dev; const struct cppi_glue_infos *glue_info; + int index; int irq; int ret; @@ -999,16 +999,20 @@ static int cppi41_dma_probe(struct platform_device *pdev) INIT_LIST_HEAD(&cdd->ddev.channels); cpp41_dma_info.dma_cap = cdd->ddev.cap_mask; - cdd->usbss_mem = of_iomap(dev->of_node, 0); - cdd->ctrl_mem = of_iomap(dev->of_node, 1); - cdd->sched_mem = of_iomap(dev->of_node, 2); - cdd->qmgr_mem = of_iomap(dev->of_node, 3); + index = of_property_match_string(dev->of_node, + "reg-names", "controller"); + if (index < 0) + return index; + + cdd->ctrl_mem = of_iomap(dev->of_node, index); + cdd->sched_mem = of_iomap(dev->of_node, index + 1); + cdd->qmgr_mem = of_iomap(dev->of_node, index + 2); spin_lock_init(&cdd->lock); INIT_LIST_HEAD(&cdd->pending); platform_set_drvdata(pdev, cdd); - if (!cdd->usbss_mem || !cdd->ctrl_mem || !cdd->sched_mem || + if (!cdd->ctrl_mem || !cdd->sched_mem || !cdd->qmgr_mem) return -ENXIO; @@ -1068,7 +1072,6 @@ static int cppi41_dma_probe(struct platform_device *pdev) err_get_sync: pm_runtime_put_sync(dev); pm_runtime_disable(dev); - iounmap(cdd->usbss_mem); iounmap(cdd->ctrl_mem); iounmap(cdd->sched_mem); iounmap(cdd->qmgr_mem); @@ -1090,7 +1093,6 @@ static int cppi41_dma_remove(struct platform_device *pdev) devm_free_irq(&pdev->dev, cdd->irq, cdd); cleanup_chans(cdd); deinit_cppi41(&pdev->dev, cdd); - iounmap(cdd->usbss_mem); iounmap(cdd->ctrl_mem); iounmap(cdd->sched_mem); iounmap(cdd->qmgr_mem);