1 From 5662c553e89ac4179ec2a7a94a342ba3e5d78cf7 Mon Sep 17 00:00:00 2001
2 From: Hans Ulli Kroll <ulli.kroll@googlemail.com>
3 Date: Thu, 9 Feb 2017 15:20:49 +0100
4 Subject: [PATCH 28/31] usb: host: fotg2: add device tree probing
6 Add device tree probing to the fotg2 driver.
8 Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
9 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 - Change compatible to "faraday,fotg210" simply.
14 drivers/usb/host/fotg210-hcd.c | 19 +++++++++++++++++++
15 1 file changed, 19 insertions(+)
17 --- a/drivers/usb/host/fotg210-hcd.c
18 +++ b/drivers/usb/host/fotg210-hcd.c
20 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <linux/module.h>
23 +#include <linux/of.h>
24 #include <linux/device.h>
25 #include <linux/dmapool.h>
26 #include <linux/kernel.h>
27 @@ -5604,6 +5605,15 @@ static int fotg210_hcd_probe(struct plat
31 + /* Right now device-tree probed devices don't get dma_mask set.
32 + * Since shared usb code relies on it, set it here for now.
33 + * Once we have dma capability bindings this can go away.
36 + retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
38 + goto fail_create_hcd;
40 pdev->dev.power.power_state = PMSG_ON;
42 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
43 @@ -5680,9 +5690,18 @@ static int fotg210_hcd_remove(struct pla
48 +static const struct of_device_id fotg210_of_match[] = {
49 + { .compatible = "faraday,fotg210" },
52 +MODULE_DEVICE_TABLE(of, fotg210_of_match);
55 static struct platform_driver fotg210_hcd_driver = {
57 .name = "fotg210-hcd",
58 + .of_match_table = of_match_ptr(fotg210_of_match),
60 .probe = fotg210_hcd_probe,
61 .remove = fotg210_hcd_remove,