From: Arnd Bergmann <arnd@arndb.de>
To: Peter Griffin <peter.griffin@linaro.org>
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: Wed, 6 Aug 2014 23:07:18 +0200 [thread overview]
Message-ID: <201408062307.18851.arnd@arndb.de> (raw)
In-Reply-To: <1407344589-24863-3-git-send-email-peter.griffin@linaro.org>
On Wednesday 06 August 2014, Peter Griffin wrote:
> +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?
> +static int st_ehci_platform_probe(struct platform_device *dev)
> +{
> + struct usb_hcd *hcd;
> + struct resource *res_mem;
> + struct usb_ehci_pdata *pdata = dev_get_platdata(&dev->dev);
> + struct st_platform_priv *priv;
> + struct ehci_hcd *ehci;
> + int err, irq, clk = 0;
> +
> + if (usb_disabled())
> + return -ENODEV;
> +
> + /*
> + * 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?
> + 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.
Arnd
next prev parent reply other threads:[~2014-08-06 21:07 UTC|newest]
Thread overview: 14+ 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 ` [PATCH v3 1/6] usb: host: usb-st-common: Add common code required by ohci-st and ehci-st Peter Griffin
2014-08-06 20:59 ` Arnd Bergmann
2014-08-07 14:14 ` 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 21:07 ` Arnd Bergmann [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 ` [PATCH v3 4/6] usb: host: ehci-st: Add ehci-st devicetree bindings documentation 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 ` [PATCH v3 6/6] MAINTAINERS: Add ehci-st.c and ohci-st.c to ARCH/STI architecture Peter Griffin
2014-08-06 21:18 ` [PATCH v3 0/6] Add EHCI and OHCI drivers for STi SoC's Arnd Bergmann
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=201408062307.18851.arnd@arndb.de \
--to=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=peter.griffin@linaro.org \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox