From: John Jacques <john.jacq...@intel.com> Even with 'dma-coherent' in the device tree USB node, the XHCI driver creates devices without copying the 'archdata' structure, where the dma_coherent field is defined. To handle this, set the dma_coherent field in all devices that are created by the XHCI driver (match 'xhci-hcd' in the device name).
Signed-off-by: John Jacques <john.jacq...@intel.com> --- drivers/usb/dwc3/dwc3-axxia.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-axxia.c b/drivers/usb/dwc3/dwc3-axxia.c index 59321b8..a0de833 100644 --- a/drivers/usb/dwc3/dwc3-axxia.c +++ b/drivers/usb/dwc3/dwc3-axxia.c @@ -79,6 +79,20 @@ static int axxia_dwc3_remove(struct platform_device *pdev) return 0; } +void +arch_setup_pdev_archdata(struct platform_device *pdev) +{ + + printk("setup_pdev_archdata %s\n", pdev->name); + + if (strncmp(pdev->name, "xhci-hcd", strlen("xhci-hcd")) == 0) { + printk("setting dma_coherent\n"); + pdev->dev.archdata.dma_coherent = 1; + + } + +} + static const struct of_device_id adwc3_of_match[] = { { .compatible = "intel,axxia-dwc3", }, {}, -- 1.9.1 -- _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto