[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3366285.QN2R3CQNzG@wuerfel>
Date: Tue, 30 Sep 2014 12:03:42 +0200
From: Arnd Bergmann <arnd@...db.de>
To: linux-arm-kernel@...ts.infradead.org
Cc: Peter Chen <peter.chen@...escale.com>,
Antoine Tenart <antoine.tenart@...e-electrons.com>,
thomas.petazzoni@...e-electrons.com, zmxu@...vell.com,
devicetree@...r.kernel.org, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, balbi@...com,
alexandre.belloni@...e-electrons.com, p.zabel@...gutronix.de,
jszhang@...vell.com, sebastian.hesselbarth@...il.com
Subject: Re: [PATCH v6 07/12] usb: chipidea: add a usb2 driver for ci13xxx
On Tuesday 30 September 2014 08:12:07 Peter Chen wrote:
> > +
> > + if (dev->of_node) {
> > + ret = ci_hdrc_usb2_dt_probe(dev, ci_pdata);
> > + if (ret)
> > + goto clk_err;
> > + } else {
> > + ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> > + if (ret)
> > + goto clk_err;
> > + }
>
> My suggestion:
>
> - call dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32)) for both
> dt and non-dt
No, as I explained before, hardcoding the dma mask is always wrong, don't
do that. Call dma_set_mask_and_coherent and check the return value.
It's not wrong to do that for both DT and ATAGS.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists