Re: [RFC] ARM DMA mapping TODO, v1

From: Arnd Bergmann
Date: Wed Apr 27 2011 - 16:48:23 EST


On Wednesday 27 April 2011 22:26:03 Russell King - ARM Linux wrote:
> Maybe something in asm/pci.h - but that invites having lots of bus
> specific header files in asm/.
>
> A better solution imho would be to have an architecture callback for
> struct device which gets registered, which can inspect the type of
> the device, and set the flag depending on where it appears in the
> tree.

Ah, I was under the assumption that there was already a callback
for this. We have a dma_set_coherent_mask() implementation in
some pci hosts (ixp4xx and it8152), but that's not a proper
callback that can be override per host and it does not
actually do what we were talking about here. I guess the callback
should live in struct hw_pci in case of ARM, and set a new field
in struct device_dma_parameters.

Maybe we don't even need a new flag if we just set
device->coherent_dma_mask to zero.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/