Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752186Ab2EZIsd (ORCPT ); Sat, 26 May 2012 04:48:33 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:45810 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751921Ab2EZIsb (ORCPT ); Sat, 26 May 2012 04:48:31 -0400 Date: Sat, 26 May 2012 09:48:19 +0100 From: Russell King - ARM Linux To: Alessandro Rubini Cc: linux-kernel@vger.kernel.org, Giancarlo Asnaghi , Alan Cox , x86@kernel.org, Greg Kroah-Hartman , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 6/6] serial: add amba-pl011-pci Message-ID: <20120526084819.GF24149@n2100.arm.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1155 Lines: 28 One other point. On Fri, May 25, 2012 at 05:48:57PM +0200, Alessandro Rubini wrote: > +/* This is a template, copied every time a new pci device appears */ > +static AMBA_APB_DEVICE(pl011_pci_template, "pl011-pci", 0, > + 0 /* base */, {0} /* irqs */, NULL /* data */); APB device. It's a _peripheral_, it only has a _slave_ port which can't initiate DMA, so: > + if (pdev->vendor == PCI_VENDOR_ID_STMICRO) { > + /* Under sta2x11, DMA is there but limited to 512M */ > + adev->dma_mask = SZ_512M - 1; > + adev->dev.coherent_dma_mask = SZ_512M - 1; > + } This is pointless and unnecessary. The PL011 driver itself doesn't use _this_ struct device for anything to do with DMA at all. That's all handled by the DMA engine's struct device. That's true of all APB devices. Only AHB devices with a master port can initiate bus transactions, and hence cause accesses to other parts of the system. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/