From: Peter Griffin <peter.griffin@linaro.org> To: Arnd Bergmann <arnd@arndb.de> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, stern@rowland.harvard.edu, srinivas.kandagatla@gmail.com, maxime.coquelin@st.com, patrice.chotard@st.com, lee.jones@linaro.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v3 2/6] usb: host: ehci-st: Add EHCI support for ST STB devices Date: Thu, 7 Aug 2014 15:13:07 +0100 [thread overview] Message-ID: <20140807141307.GA12137@griffinp-ThinkPad-X1-Carbon-2nd> (raw) In-Reply-To: <201408062307.18851.arnd@arndb.de> 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.
WARNING: multiple messages have this Message-ID (diff)
From: peter.griffin@linaro.org (Peter Griffin) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/6] usb: host: ehci-st: Add EHCI support for ST STB devices Date: Thu, 7 Aug 2014 15:13:07 +0100 [thread overview] Message-ID: <20140807141307.GA12137@griffinp-ThinkPad-X1-Carbon-2nd> (raw) In-Reply-To: <201408062307.18851.arnd@arndb.de> 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.
next prev parent reply other threads:[~2014-08-07 14:13 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-06 17:03 [PATCH v3 0/6] Add EHCI and OHCI drivers for STi SoC's Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 17:03 ` [PATCH v3 1/6] usb: host: usb-st-common: Add common code required by ohci-st and ehci-st Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 20:59 ` Arnd Bergmann 2014-08-06 20:59 ` Arnd Bergmann 2014-08-06 20:59 ` Arnd Bergmann 2014-08-07 14:14 ` Peter Griffin 2014-08-07 14:14 ` Peter Griffin 2014-08-07 14:16 ` Peter Griffin 2014-08-07 14:16 ` Peter Griffin 2014-08-07 14:16 ` Peter Griffin 2014-08-06 17:03 ` [PATCH v3 2/6] usb: host: ehci-st: Add EHCI support for ST STB devices Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 21:07 ` Arnd Bergmann 2014-08-06 21:07 ` Arnd Bergmann 2014-08-06 21:07 ` Arnd Bergmann 2014-08-07 14:13 ` Peter Griffin [this message] 2014-08-07 14:13 ` Peter Griffin 2014-08-06 17:03 ` [PATCH v3 3/6] usb: host: ohci-st: Add OHCI driver " Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 17:03 ` [PATCH v3 4/6] usb: host: ehci-st: Add ehci-st devicetree bindings documentation Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 17:03 ` [PATCH v3 5/6] usb: host: ohci-st: Add ohci-st " Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 17:03 ` [PATCH v3 6/6] MAINTAINERS: Add ehci-st.c and ohci-st.c to ARCH/STI architecture Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 17:03 ` Peter Griffin 2014-08-06 21:18 ` [PATCH v3 0/6] Add EHCI and OHCI drivers for STi SoC's Arnd Bergmann 2014-08-06 21:18 ` Arnd Bergmann 2014-08-06 21:18 ` Arnd Bergmann 2014-08-07 14:47 ` Peter Griffin 2014-08-07 14:47 ` Peter Griffin 2014-08-07 14:47 ` Peter Griffin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20140807141307.GA12137@griffinp-ThinkPad-X1-Carbon-2nd \ --to=peter.griffin@linaro.org \ --cc=arnd@arndb.de \ --cc=devicetree@vger.kernel.org \ --cc=gregkh@linuxfoundation.org \ --cc=lee.jones@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=maxime.coquelin@st.com \ --cc=patrice.chotard@st.com \ --cc=srinivas.kandagatla@gmail.com \ --cc=stern@rowland.harvard.edu \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.