[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140807141307.GA12137@griffinp-ThinkPad-X1-Carbon-2nd>
Date: Thu, 7 Aug 2014 15:13:07 +0100
From: Peter Griffin <peter.griffin@...aro.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
gregkh@...uxfoundation.org, stern@...land.harvard.edu,
srinivas.kandagatla@...il.com, maxime.coquelin@...com,
patrice.chotard@...com, lee.jones@...aro.org,
devicetree@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH v3 2/6] usb: host: ehci-st: Add EHCI support for ST STB
devices
Hi Arnd,
Thanks for reviewing, see my comments below: -
> > +static int st_ehci_platform_reset(struct usb_hcd *hcd)
> > +{
> > + struct platform_device *pdev = to_platform_device(hcd->self.controller);
> > + struct usb_ehci_pdata *pdata = dev_get_platdata(&pdev->dev);
> > + struct ehci_hcd *ehci = hcd_to_ehci(hcd);
> > + int retval;
> > +
> > + if (pdata->pre_setup) {
> > + retval = pdata->pre_setup(hcd);
> > + if (retval < 0)
> > + return retval;
> > + }
>
> What is the point in going through a platform data function pointer here?
> Can't you just open-code st_ehci_configure_bus() here?
Yes I can, I've done as you suggest in v4.
>
> > + * Use reasonable defaults so platforms don't have to provide these
> > + * with DT probing on ARM.
> > + */
> > + if (!pdata)
> > + pdata = &ehci_platform_defaults;
>
> How would you ever get here with pdata set?
This is left over from using ohci-platform as a starting point. pdata is not
set when booting via DT and gets initialized here.
As this driver depends on OF and will never run without DT I've initialised
pdata where it gets defined in V4.
I've then also removed the check further down in probe that causes some unnecessary
indentation where we get the phys / clocks.
>
> > + err = dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
> > + if (err)
> > + return err;
>
> Remove this here, and rely on the correct mask to be set from the DT scan.
I've removed in V4.
regards,
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