devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Ulli Kroll <ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Hans Ulli Kroll
	<ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
Subject: [PATCH 1/3] usb: host: fotg2: add devicetree probing
Date: Wed,  8 Feb 2017 21:00:08 +0100	[thread overview]
Message-ID: <20170208200010.21522-2-ulli.kroll@googlemail.com> (raw)
In-Reply-To: <20170208200010.21522-1-ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>

Signed-off-by: Hans Ulli Kroll <ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
 drivers/usb/host/fotg210-hcd.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 9d0b0518290a..2acc51b0be5a 100644
--- a/drivers/usb/host/fotg210-hcd.c
+++ b/drivers/usb/host/fotg210-hcd.c
@@ -23,6 +23,7 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/device.h>
 #include <linux/dmapool.h>
 #include <linux/kernel.h>
@@ -5600,6 +5601,15 @@ static int fotg210_hcd_probe(struct platform_device *pdev)
 	if (usb_disabled())
 		return -ENODEV;
 
+	/* Right now device-tree probed devices don't get dma_mask set.
+	 * Since shared usb code relies on it, set it here for now.
+	 * Once we have dma capability bindings this can go away.
+	 */
+
+	retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	if (retval)
+		goto fail_create_hcd;
+
 	pdev->dev.power.power_state = PMSG_ON;
 
 	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
@@ -5676,9 +5686,18 @@ static int fotg210_hcd_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id fotg210_ehci_match[] = {
+	{ .compatible = "faraday,fotg210-hcd" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, exynos_ehci_match);
+#endif
+
 static struct platform_driver fotg210_hcd_driver = {
 	.driver = {
 		.name   = "fotg210-hcd",
+		.of_match_table = of_match_ptr(fotg210_ehci_match),
 	},
 	.probe  = fotg210_hcd_probe,
 	.remove = fotg210_hcd_remove,
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-02-08 20:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 20:00 [PATCH 0/3] usb: add device tree support for fotg2-hcd driver Hans Ulli Kroll
     [not found] ` <20170208200010.21522-1-ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-02-08 20:00   ` Hans Ulli Kroll [this message]
     [not found]     ` <20170208200010.21522-2-ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-02-08 23:51       ` [PATCH 1/3] usb: host: fotg2: add devicetree probing kbuild test robot
2017-02-09  4:27       ` kbuild test robot
2017-02-09 14:20     ` [PATCH 1/3 v2] usb: host: fotg2: add device tree probing Hans Ulli Kroll
2017-02-10 13:12       ` Linus Walleij
2017-02-10 20:26         ` Arnd Bergmann
2017-02-17 11:02         ` Hans Ulli Kroll
2017-02-10 13:34       ` Greg Kroah-Hartman
2017-02-17 11:06       ` [PATCH 1/3 v3] " Hans Ulli Kroll
2017-02-08 20:00   ` [PATCH 2/3] usb: add DT bindings for farady fotg2 host controller Hans Ulli Kroll
2017-02-10 13:14     ` Linus Walleij
2017-02-15 23:00     ` Rob Herring
2017-02-17 10:07       ` Hans Ulli Kroll
2017-02-21 14:43         ` Rob Herring
2017-03-29 23:16           ` Linus Walleij
2017-03-30 18:31             ` Hans Ulli Kroll
2017-04-22  0:22               ` Linus Walleij
2017-02-10 13:24   ` [PATCH 0/3] usb: add device tree support for fotg2-hcd driver Linus Walleij
2017-02-08 20:00 ` [PATCH 3/3] DT: add Faraday Tec. as vendor Hans Ulli Kroll
     [not found]   ` <20170208200010.21522-4-ulli.kroll-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2017-02-10 13:16     ` Linus Walleij
     [not found]       ` <CACRpkdaYAZAdxTfG90K8UBE1X9Ts7Mh4f+zNcD2JKEMYBmEZCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-11  3:04         ` Joel Stanley
2017-02-12 20:37   ` Linus Walleij
2017-02-15 23:02     ` Rob Herring

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=20170208200010.21522-2-ulli.kroll@googlemail.com \
    --to=ulli.kroll-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).