diff options
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/dwc3-exynos.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index 586f1051b059..6471d786b3cf 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/usb/otg.h> | 22 | #include <linux/usb/otg.h> |
23 | #include <linux/usb/nop-usb-xceiv.h> | 23 | #include <linux/usb/nop-usb-xceiv.h> |
24 | #include <linux/of.h> | ||
24 | 25 | ||
25 | #include "core.h" | 26 | #include "core.h" |
26 | 27 | ||
@@ -87,6 +88,8 @@ err1: | |||
87 | return ret; | 88 | return ret; |
88 | } | 89 | } |
89 | 90 | ||
91 | static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); | ||
92 | |||
90 | static int __devinit dwc3_exynos_probe(struct platform_device *pdev) | 93 | static int __devinit dwc3_exynos_probe(struct platform_device *pdev) |
91 | { | 94 | { |
92 | struct dwc3_exynos_data *pdata = pdev->dev.platform_data; | 95 | struct dwc3_exynos_data *pdata = pdev->dev.platform_data; |
@@ -102,6 +105,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) | |||
102 | goto err0; | 105 | goto err0; |
103 | } | 106 | } |
104 | 107 | ||
108 | /* | ||
109 | * Right now device-tree probed devices don't get dma_mask set. | ||
110 | * Since shared usb code relies on it, set it here for now. | ||
111 | * Once we move to full device tree support this will vanish off. | ||
112 | */ | ||
113 | if (!pdev->dev.dma_mask) | ||
114 | pdev->dev.dma_mask = &dwc3_exynos_dma_mask; | ||
115 | |||
105 | platform_set_drvdata(pdev, exynos); | 116 | platform_set_drvdata(pdev, exynos); |
106 | 117 | ||
107 | ret = dwc3_exynos_register_phys(exynos); | 118 | ret = dwc3_exynos_register_phys(exynos); |
@@ -191,11 +202,20 @@ static int __devexit dwc3_exynos_remove(struct platform_device *pdev) | |||
191 | return 0; | 202 | return 0; |
192 | } | 203 | } |
193 | 204 | ||
205 | #ifdef CONFIG_OF | ||
206 | static const struct of_device_id exynos_dwc3_match[] = { | ||
207 | { .compatible = "samsung,exynos-dwc3" }, | ||
208 | {}, | ||
209 | }; | ||
210 | MODULE_DEVICE_TABLE(of, exynos_dwc3_match); | ||
211 | #endif | ||
212 | |||
194 | static struct platform_driver dwc3_exynos_driver = { | 213 | static struct platform_driver dwc3_exynos_driver = { |
195 | .probe = dwc3_exynos_probe, | 214 | .probe = dwc3_exynos_probe, |
196 | .remove = __devexit_p(dwc3_exynos_remove), | 215 | .remove = __devexit_p(dwc3_exynos_remove), |
197 | .driver = { | 216 | .driver = { |
198 | .name = "exynos-dwc3", | 217 | .name = "exynos-dwc3", |
218 | .of_match_table = of_match_ptr(exynos_dwc3_match), | ||
199 | }, | 219 | }, |
200 | }; | 220 | }; |
201 | 221 | ||