From patchwork Thu Jan 19 10:37:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 91849 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp210411qgi; Thu, 19 Jan 2017 02:37:53 -0800 (PST) X-Received: by 10.98.81.199 with SMTP id f190mr9072632pfb.180.1484822273674; Thu, 19 Jan 2017 02:37:53 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si3151340pgc.160.2017.01.19.02.37.53; Thu, 19 Jan 2017 02:37:53 -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 S1751571AbdASKhu (ORCPT + 4 others); Thu, 19 Jan 2017 05:37:50 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35605 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbdASKhs (ORCPT ); Thu, 19 Jan 2017 05:37:48 -0500 Received: by mail-wm0-f52.google.com with SMTP id r126so283673619wmr.0 for ; Thu, 19 Jan 2017 02:37:11 -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=hYYcBglVTanXtqe5rvy40m+3BqRNR1SYNTG0EEQ2kYefFXHyheGcRja8mt+VMGyZ5F OYWrnAPCi5Wz1w+F7LdUI1XRoedKxe3221b+ngyr5gO+UhxI3FFxJz3hogi4fL9L+LsU OVrPOIvx4JyMyIMzBrAUs4pnONgGQdAaA9v64RMmgPZVDBghW8jFnDMwHEBBrw90iFMo OrIpkdR3w9WWiPJJPs8el4WjFUpRhn5F58LG3waA01Efjbz5C2URcPTJHy6ATDo9l83l UHMjQc2maZzU1glH2UTCIHwh1nFLkirx1eSbN9K4JXImkHHdGPd9HNgM41uvCSGWggO0 TEHQ== 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=U+G1q/9M3SZ9UHV+2XwaXEA0vI/PL4eqnVlViSNJADKlqONhnGlSnN14vWRbJMeUxq 1Roq/NcqOWuuhYzuQTgkaxPf9Oo+NvW/a84/Xxmbz1lcBY2VygTb0Wr/g7204Xq/F7lk 21Ws3fzCG7HWRxFFeDrbNLiw1OeApe+eZmpheYdZucWgRbXstaRtfHpMmuEevB86wAFN +DxHoN7CFKkD1LJRWsYV/rEcRIt8vZ8WUjg/tdCDoSCPNgIdP8Q2lSlFnF23I/1G2bi1 H7MZqCJbs/aZaMUcLcQuhXjvCaYod7knKw6qYAisHWYm55Vy2pdEe+5fYh5lDF4anAUC /oTA== X-Gm-Message-State: AIkVDXIHJWyeU9hjHKRK6Dnvt99vbLVl+atoub2Pn5ADVg5KFPonnUROW6gdMPy6FOokBD1Y X-Received: by 10.223.178.87 with SMTP id y23mr6520129wra.91.1484822230504; Thu, 19 Jan 2017 02:37:10 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id c81sm11850470wmf.22.2017.01.19.02.37.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 02:37:10 -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, grygorii.strashko@ti.com, linux-usb@vger.kernel.org, Alexandre Bailon Subject: [PATCH v3 1/4] dmaengine: cppi41: Remove usbss_mem Date: Thu, 19 Jan 2017 11:37:02 +0100 Message-Id: <20170119103705.13532-2-abailon@baylibre.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170119103705.13532-1-abailon@baylibre.com> References: <20170119103705.13532-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);