[PATCH 6/6] serial: add amba-pl011-pci
Russell King - ARM Linux
linux at arm.linux.org.uk
Sat May 26 04:48:19 EDT 2012
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.
More information about the linux-arm-kernel
mailing list