]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commit
usb: dwc3: Correct dwc3 host init code for making SMMU work in HOST Mode
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Tue, 20 Jun 2017 10:55:17 +0000 (16:25 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 27 Jun 2017 10:04:27 +0000 (12:04 +0200)
commit066c105fc067d0b5d62ab5e2830575a18ea9dde7
tree85ee342ac56fce7dbf66c2842dcc85a72320070e
parentfc21b827e6441728d232ee2ee88d785d3953d889
usb: dwc3: Correct dwc3 host init code for making SMMU work in HOST Mode

DWC3 driver initializes the xhci host platform device structure.
As a part of initialization it configures xhci dev DMA attributes,
but fails to set correct smmu dma ops (if iommus node is added in
dts file). But SMMU driver intializes correct context block based
on the SMMU Stream ID given by USB dts node. Due to the improper
initalization of dma ops(SWIO instead of SMMU) no proper page table
entries are updated in SMMU Contect Block, thus generating an abort
when USB DMA tries to write an event in the event ring.

This patch fixes the above issue by calling of_dma_configure() during
xhci dev initialization. This of_dma_configure() checks for valid
iommus node and assigns proper SMMU dma ops instead of SWIO dma ops.

Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/dwc3/host.c