Re: [PATCH 1/3 v2] usb: host: fotg2: add device tree probing

From: Arnd Bergmann
Date: Fri Feb 10 2017 - 15:27:28 EST


On Friday, February 10, 2017 2:12:36 PM CET Linus Walleij wrote:
>
> > + /* Right now device-tree probed devices don't get dma_mask set.
> > + * Since shared usb code relies on it, set it here for now.
> > + * Once we have dma capability bindings this can go away.
> > + */
> > +
> > + retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> > + if (retval)
> > + goto fail_create_hcd;
>
> Were you able to test this part? I saw the gemini has some DMA engine
> but I never saw a driver for it. It looks like a reasonable thing to do to
> my untrained DMA eye.

We should never use dma_coerce_mask_and_coherent() for new code, it's
only needed for broken platforms without DT.

A 32-bit mask is set by default.

Arnd