From patchwork Thu Sep 19 21:47:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King X-Patchwork-Id: 2916701 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D0BE39F1BF for ; Fri, 20 Sep 2013 11:21:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4E6920254 for ; Fri, 20 Sep 2013 11:21:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BB8D201BF for ; Fri, 20 Sep 2013 11:21:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754352Ab3ITLVS (ORCPT ); Fri, 20 Sep 2013 07:21:18 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:39279 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754480Ab3ITLVR (ORCPT ); Fri, 20 Sep 2013 07:21:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Date:Sender:Message-Id:Subject:Cc:To:From:References:In-Reply-To; bh=HwKZV6nuyfJcQBfJ8wsX5M6QWJo/txKa0SEfIAmIqR4=; b=kgfcB5zOfCsgj/+EsnLjKt9H/c+5FVTi7/2AEznTa4It9VIDUqW+PEXftj36171pWv0kFPeHCVulVOxfDNSebkta7Ir0VEmrKtvUJBHL++v/UNsugMfDBK2XWecd+xXVG2WHUk5z8sSEfO1/c2FjUO1IlTKBzwixzSO+Rq7Bwio=; Received: from e0022681537dd.dyn.arm.linux.org.uk ([2002:4e20:1eda:1:222:68ff:fe15:37dd]:59179 helo=rmk-PC.arm.linux.org.uk) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1VMnNL-0000qu-Vm; Fri, 20 Sep 2013 00:11:08 +0100 Received: from rmk by rmk-PC.arm.linux.org.uk with local (Exim 4.76) (envelope-from ) id 1VMm3x-0007hp-Lv; Thu, 19 Sep 2013 22:47:01 +0100 In-Reply-To: <20130919212235.GD12758@n2100.arm.linux.org.uk> References: <20130919212235.GD12758@n2100.arm.linux.org.uk> From: Russell King To: alsa-devel@alsa-project.org, b43-dev@lists.infradead.org, devel@driverdev.osuosl.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, e1000-devel@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-ide@vger.kernel.org, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, linux-nvme@lists.infradead.org, linux-omap@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Solarflare linux maintainers , uclinux-dist-devel@blackfin.uclinux.org Cc: Grant Likely , Rob Herring Subject: [PATCH 22/51] DMA-API: amba: get rid of separate dma_mask Message-Id: Date: Thu, 19 Sep 2013 22:47:01 +0100 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, KHOP_BIG_TO_CC,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP AMBA Primecell devices always treat streaming and coherent DMA exactly the same, so there's no point in having the masks separated. Signed-off-by: Russell King Acked-by: Grant Likely --- drivers/amba/bus.c | 6 +----- drivers/of/platform.c | 3 --- include/linux/amba/bus.h | 2 -- 3 files changed, 1 insertions(+), 10 deletions(-) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index c670727..c4876ac 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -552,7 +552,6 @@ amba_aphb_device_add(struct device *parent, const char *name, if (!dev) return ERR_PTR(-ENOMEM); - dev->dma_mask = dma_mask; dev->dev.coherent_dma_mask = dma_mask; dev->irq[0] = irq1; dev->irq[1] = irq2; @@ -619,7 +618,7 @@ static void amba_device_initialize(struct amba_device *dev, const char *name) dev_set_name(&dev->dev, "%s", name); dev->dev.release = amba_device_release; dev->dev.bus = &amba_bustype; - dev->dev.dma_mask = &dev->dma_mask; + dev->dev.dma_mask = &dev->dev.coherent_dma_mask; dev->res.name = dev_name(&dev->dev); } @@ -663,9 +662,6 @@ int amba_device_register(struct amba_device *dev, struct resource *parent) amba_device_initialize(dev, dev->dev.init_name); dev->dev.init_name = NULL; - if (!dev->dev.coherent_dma_mask && dev->dma_mask) - dev_warn(&dev->dev, "coherent dma mask is unset\n"); - return amba_device_add(dev, parent); } diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 9b439ac..54382ba 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -284,9 +284,6 @@ static struct amba_device *of_amba_device_create(struct device_node *node, else of_device_make_bus_id(&dev->dev); - /* setup amba-specific device info */ - dev->dma_mask = ~0; - /* Allow the HW Peripheral ID to be overridden */ prop = of_get_property(node, "arm,primecell-periphid", NULL); if (prop) diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 43ec7e2..682df0e 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h @@ -30,7 +30,6 @@ struct amba_device { struct device dev; struct resource res; struct clk *pclk; - u64 dma_mask; unsigned int periphid; unsigned int irq[AMBA_NR_IRQS]; }; @@ -131,7 +130,6 @@ struct amba_device name##_device = { \ struct amba_device name##_device = { \ .dev = __AMBA_DEV(busid, data, ~0ULL), \ .res = DEFINE_RES_MEM(base, SZ_4K), \ - .dma_mask = ~0ULL, \ .irq = irqs, \ .periphid = id, \ }