[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <055ba866a1ac4d9385360bf51ab73f80@BN1PR0301MB0772.namprd03.prod.outlook.com>
Date: Fri, 25 Jul 2014 08:22:40 +0000
From: Peter Chen <Peter.Chen@...escale.com>
To: Antoine Ténart
<antoine.tenart@...e-electrons.com>
CC: "sebastian.hesselbarth@...il.com" <sebastian.hesselbarth@...il.com>,
"balbi@...com" <balbi@...com>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
"alexandre.belloni@...e-electrons.com"
<alexandre.belloni@...e-electrons.com>,
"thomas.petazzoni@...e-electrons.com"
<thomas.petazzoni@...e-electrons.com>,
"zmxu@...vell.com" <zmxu@...vell.com>,
"jszhang@...vell.com" <jszhang@...vell.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v3 07/12] usb: chipidea: add a usb2 driver for ci13xxx
>
> On Fri, Jul 25, 2014 at 10:18:54AM +0800, Peter Chen wrote:
> > On Wed, Jul 16, 2014 at 10:26:01AM +0200, Antoine Ténart wrote:
> > > Add a USB2 ChipIdea driver for ci13xxx, with optional PHY, clock and
> > > DMA mask, to support USB2 ChipIdea controllers that don't need
> > > specific functions.
> >
> > You may need to indicate it is a generic usb2 glue layer driver at
> > both subject and context.
>
> "USB2 ChipIdea driver for ci13xxx" seemed quite generic to me.
>
ok
> > >
> > > Needed for the Marvell Berlin SoCs USB controllers.
> >
> > You can say it is tested at Marvell Berlin SoCs USB controllers.
>
> Ok, I'll explicitly say it.
>
> > > +
> > > +static int ci_hdrc_usb2_dt_probe(struct device *dev,
> > > + struct ci_hdrc_platform_data *ci_pdata,
> > > + struct ci_hdrc_usb2_priv *priv) {
> > > + u32 mask;
> > > + int ret;
> > > +
> > > + priv->clk = devm_clk_get(dev, NULL);
> > > + if (!IS_ERR(priv->clk)) {
> > > + ret = clk_prepare_enable(priv->clk);
> > > + if (ret) {
> > > + dev_err(dev, "failed to enable the clock: %d\n", ret);
> > > + return ret;
> > > + }
> > > + }
> >
> > The clk API may be needed for both DT and non-DT cases.
>
> Yes sure, I'll move this to the ci_hdrc_usb2_probe().
>
> > > +
> > > + if (of_property_read_u32(dev->of_node, "dma-mask", &mask))
> > > + priv->dma_mask = mask;
> > > +
> > According to discussion, you may not need dma_mask in driver any more,
> > and use below API for both DT and non-DT case.
> >
> > err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> > if (err)
> > handle error;
>
> This would only be needed in non-dt cases, as the DMA mask is configured
> in drivers/of/platform.c otherwise.
>
Get it, thanks.
Peter
--
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