Re: [PATCH v3 4/7] of: configure the platform device dma parameters
From: Santosh Shilimkar
Date: Tue May 06 2014 - 09:33:04 EST
On Tuesday 06 May 2014 05:54 AM, Arnd Bergmann wrote:
> On Tuesday 06 May 2014 13:44:38 Benjamin Herrenschmidt wrote:
>> On Mon, 2014-05-05 at 16:28 -0600, Bjorn Helgaas wrote:
>>> I still wonder whether arm, powerpc, and tile (and I just noticed
>>> microblaze also has a similar dma_direct_map_page()) could all be
>>> handled by attaching devices to a generic trivial IOMMU driver
>>> parameterized with the appropriate constant offset.
>
[..]
> It may be easier to replace set_arch_dma_coherent_ops() with
> a generic function that handles all cases:
>
> int set_arch_dma_ops(struct device *dev, bool coherent,
> phys_addr_t offset, struct device_node *iommu);
>
> and let the architecture handle the cases it needs.
>
>> On powerpc, the offset is not constant, it can be per-device.
>
> I think that's the case on all of them. The code under review here
> is what parses the dma-ranges property in order to put the correct
> value into the per-device structure.
>
Yep. The per-device property need is one of the reason, we added the
information to struct device. The constant need not be same though
on keystone it is same for all devices.
Regards,
Santosh
--
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/