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: 9533203 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 536706020B for ; Mon, 23 Jan 2017 17:25:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4677A28498 for ; Mon, 23 Jan 2017 17:25:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B6112849A; Mon, 23 Jan 2017 17:25:11 +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 CE90C28498 for ; Mon, 23 Jan 2017 17:25:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751394AbdAWRZJ (ORCPT ); Mon, 23 Jan 2017 12:25:09 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:35104 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbdAWRZI (ORCPT ); Mon, 23 Jan 2017 12:25:08 -0500 Received: by mail-wm0-f50.google.com with SMTP id r126so143785157wmr.0 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=dGzezoLxQZV88rrKJW4Hyy2Ra4B9Z2T6uIDH+oltZEq3KUNjQ9PnNvkmClu6QLGXOh 2m9CcDZxwGkzQ6Ox0O8BkMNmV/nc1gCsM48eas7FSlGJonsNxkAjN0y6Jnsg6h+AeIOo RLBtTXKyQAxbcN3itLV3P8F33jB80EO9GX7MMz87PKAtXIE8nZREEMuz9EQq+CVUm9nu oNM6KoFgzX53Xh0F9V0N1gy710GR5OgH9dheTxYTS9vXJSGE2WLLxy2sszQ1WVNabyGF d54Cn6WVvI7foVOSKGhWp+viQJMM8JwLDw1PmYTdQi8WEFhiLo/o2ysN6AkuDUQzSDTI 6Bzw== X-Gm-Message-State: AIkVDXJWF8MidXV6NYWXC3HgorSWulCkPFGySmDSMhoAvXzz+m2+e8msm0vzav7LX2aYTND4 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: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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);