From patchwork Wed Feb 15 13:56:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Bailon X-Patchwork-Id: 9574113 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 C62C260586 for ; Wed, 15 Feb 2017 13:56:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEE39284C2 for ; Wed, 15 Feb 2017 13:56:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3A92284CC; Wed, 15 Feb 2017 13:56:50 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 3898E284C2 for ; Wed, 15 Feb 2017 13:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751296AbdBON4r (ORCPT ); Wed, 15 Feb 2017 08:56:47 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36141 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbdBON4n (ORCPT ); Wed, 15 Feb 2017 08:56:43 -0500 Received: by mail-wm0-f53.google.com with SMTP id c85so42508091wmi.1 for ; Wed, 15 Feb 2017 05:56:42 -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=vvmbWZtyK5F9vca0ZYf78zfifWv+ONET6DvAPHPDHhs=; b=eKNm+UHNv/ofREyKpwxrZOoJWeGKZw7lw+zZGV8sYAdK3nXWl3jn8XpwK6uGGQeGdY GrVGlEz5almolboU5x3vv3AzNbE7B5X93aAaBZdfCteUaXVURCTySlz523BvvygIIC3i ywQHOvVk8hFEivOZgTZKyhldl/4YObbLoEeeyZmiLSmA0TNbKS+G4impfOizHhAHAIUX iW/RjQ8SRVv5baOmIlu5Wj9a54gG6iIB4B6Mj4xrWTjaby4J8Th1ny7bYtQ/36EuErfs pEBQrPnQKF5vM9q79+k6/MVLz7t7wOLk0kHs+ieBXGJdvwXwYXaJkRddSGtmj2FmPkRT l+hw== 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=vvmbWZtyK5F9vca0ZYf78zfifWv+ONET6DvAPHPDHhs=; b=GFXO7WsnQRce6HAtM33vEiYOEOC54wDxA0/KJWz8Y3xX+x4+1sIF+JujKvhxJz6nn7 I33ntLfTUVqMARN9iGt0G0rZqmrT6LYt8nrHYBhlUREUw6QEwDCDKDvvUzTeeaQ4LTyI n0uCcWFHzQPx7On1W45571+T5Fm63tbAUNz1E/pFGDVWeCKg2SVv4FL9g/ZoxC7Z8RDm SkAe8GTOHsRH5fvj56SNe6dY/IrtZpv8wi8QTEwhd7hCB3shu2sYIae+lH10LgKBRHNH a5HIhWFHAI6UCUbjduir4/TlZ6mxw9UINi5Nvq+E2hFfYaW0gVWF4wT2DMQli5jl9VS+ guqA== X-Gm-Message-State: AMke39lpHKxredniCGU7PmVYY3+KwaqmcEFRDPUsZVV1cTTUgRnyuYe9o8dBRArFrURSs4EC X-Received: by 10.28.182.6 with SMTP id g6mr7863357wmf.11.1487167001673; Wed, 15 Feb 2017 05:56:41 -0800 (PST) Received: from localhost.localdomain ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id a35sm5023174wra.21.2017.02.15.05.56.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Feb 2017 05:56:41 -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, linux-usb@vger.kernel.org, Alexandre Bailon Subject: [PATCH v5 1/5] dmaengine: cppi41: Remove usbss_mem Date: Wed, 15 Feb 2017 14:56:32 +0100 Message-Id: <20170215135636.31427-2-abailon@baylibre.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170215135636.31427-1-abailon@baylibre.com> References: <20170215135636.31427-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 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 d74cee0..34a8156 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; @@ -995,6 +994,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; @@ -1021,16 +1021,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; @@ -1090,7 +1094,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); @@ -1112,7 +1115,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);