Message ID | 1350377157-28465-2-git-send-email-gautam.vivek@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: > This patch adds support to parse probe data for > dwc3-exynos driver using device tree. > > Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> > --- > 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 ca65978..d11ef49 100644 > --- a/drivers/usb/dwc3/dwc3-exynos.c > +++ b/drivers/usb/dwc3/dwc3-exynos.c > @@ -21,6 +21,7 @@ > #include <linux/clk.h> > #include <linux/usb/otg.h> > #include <linux/usb/nop-usb-xceiv.h> > +#include <linux/of.h> > > #include "core.h" > > @@ -87,6 +88,8 @@ err1: > return ret; > } > > +static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); > + > static int __devinit dwc3_exynos_probe(struct platform_device *pdev) > { > struct dwc3_exynos_data *pdata = pdev->dev.platform_data; > @@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) > goto err0; > } > > + /* > + * 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 move to full device tree support this will vanish off. > + */ > + if (!pdev->dev.dma_mask) > + pdev->dev.dma_mask = &dwc3_exynos_dma_mask; says who ? $ git grep -e dma_mask drivers/of/ drivers/of/platform.c: dev->dev.dma_mask = &dev->archdata.dma_mask; drivers/of/platform.c: dev->archdata.dma_mask = 0xffffffffUL; drivers/of/platform.c: dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); drivers/of/platform.c: dev->dev.coherent_dma_mask = ~0; drivers/of/platform.c: dev->dma_mask = ~0; -ECONFUSED
Hi, On Tuesday 16 October 2012 03:23 PM, Felipe Balbi wrote: > On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: >> This patch adds support to parse probe data for >> dwc3-exynos driver using device tree. >> >> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> >> --- >> 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 ca65978..d11ef49 100644 >> --- a/drivers/usb/dwc3/dwc3-exynos.c >> +++ b/drivers/usb/dwc3/dwc3-exynos.c >> @@ -21,6 +21,7 @@ >> #include <linux/clk.h> >> #include <linux/usb/otg.h> >> #include <linux/usb/nop-usb-xceiv.h> >> +#include <linux/of.h> >> >> #include "core.h" >> >> @@ -87,6 +88,8 @@ err1: >> return ret; >> } >> >> +static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); >> + >> static int __devinit dwc3_exynos_probe(struct platform_device *pdev) >> { >> struct dwc3_exynos_data *pdata = pdev->dev.platform_data; >> @@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) >> goto err0; >> } >> >> + /* >> + * 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 move to full device tree support this will vanish off. >> + */ >> + if (!pdev->dev.dma_mask) >> + pdev->dev.dma_mask = &dwc3_exynos_dma_mask; > > says who ? > > $ git grep -e dma_mask drivers/of/ > drivers/of/platform.c: dev->dev.dma_mask = &dev->archdata.dma_mask; > drivers/of/platform.c: dev->archdata.dma_mask = 0xffffffffUL; > drivers/of/platform.c: dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > drivers/of/platform.c: dev->dev.coherent_dma_mask = ~0; > drivers/of/platform.c: dev->dma_mask = ~0; > > -ECONFUSED dma_mask is set under some ifdef except for "dev->dma_mask = ~0;". However I agree with you for coherent_dma_mask case. Thanks Kishon -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, On Tue, Oct 16, 2012 at 03:36:43PM +0530, kishon wrote: > Hi, > > On Tuesday 16 October 2012 03:23 PM, Felipe Balbi wrote: > >On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: > >>This patch adds support to parse probe data for > >>dwc3-exynos driver using device tree. > >> > >>Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> > >>--- > >> 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 ca65978..d11ef49 100644 > >>--- a/drivers/usb/dwc3/dwc3-exynos.c > >>+++ b/drivers/usb/dwc3/dwc3-exynos.c > >>@@ -21,6 +21,7 @@ > >> #include <linux/clk.h> > >> #include <linux/usb/otg.h> > >> #include <linux/usb/nop-usb-xceiv.h> > >>+#include <linux/of.h> > >> > >> #include "core.h" > >> > >>@@ -87,6 +88,8 @@ err1: > >> return ret; > >> } > >> > >>+static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); > >>+ > >> static int __devinit dwc3_exynos_probe(struct platform_device *pdev) > >> { > >> struct dwc3_exynos_data *pdata = pdev->dev.platform_data; > >>@@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) > >> goto err0; > >> } > >> > >>+ /* > >>+ * 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 move to full device tree support this will vanish off. > >>+ */ > >>+ if (!pdev->dev.dma_mask) > >>+ pdev->dev.dma_mask = &dwc3_exynos_dma_mask; > > > >says who ? > > > >$ git grep -e dma_mask drivers/of/ > >drivers/of/platform.c: dev->dev.dma_mask = &dev->archdata.dma_mask; > >drivers/of/platform.c: dev->archdata.dma_mask = 0xffffffffUL; > >drivers/of/platform.c: dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > >drivers/of/platform.c: dev->dev.coherent_dma_mask = ~0; > >drivers/of/platform.c: dev->dma_mask = ~0; > > > >-ECONFUSED > > dma_mask is set under some ifdef except for "dev->dma_mask = ~0;". > However I agree with you for coherent_dma_mask case. indeed. Should we try to patch that instead ? Rob, should we set dma_mask at the driver or do you have a nicer way to handle it ??
Hi, On Tue, Oct 16, 2012 at 3:38 PM, Felipe Balbi <balbi@ti.com> wrote: > Hi, > > On Tue, Oct 16, 2012 at 03:36:43PM +0530, kishon wrote: >> Hi, >> >> On Tuesday 16 October 2012 03:23 PM, Felipe Balbi wrote: >> >On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: >> >>This patch adds support to parse probe data for >> >>dwc3-exynos driver using device tree. >> >> >> >>Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> >> >>--- >> >> 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 ca65978..d11ef49 100644 >> >>--- a/drivers/usb/dwc3/dwc3-exynos.c >> >>+++ b/drivers/usb/dwc3/dwc3-exynos.c >> >>@@ -21,6 +21,7 @@ >> >> #include <linux/clk.h> >> >> #include <linux/usb/otg.h> >> >> #include <linux/usb/nop-usb-xceiv.h> >> >>+#include <linux/of.h> >> >> >> >> #include "core.h" >> >> >> >>@@ -87,6 +88,8 @@ err1: >> >> return ret; >> >> } >> >> >> >>+static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); >> >>+ >> >> static int __devinit dwc3_exynos_probe(struct platform_device *pdev) >> >> { >> >> struct dwc3_exynos_data *pdata = pdev->dev.platform_data; >> >>@@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) >> >> goto err0; >> >> } >> >> >> >>+ /* >> >>+ * 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 move to full device tree support this will vanish off. >> >>+ */ >> >>+ if (!pdev->dev.dma_mask) >> >>+ pdev->dev.dma_mask = &dwc3_exynos_dma_mask; >> > >> >says who ? >> > >> >$ git grep -e dma_mask drivers/of/ >> >drivers/of/platform.c: dev->dev.dma_mask = &dev->archdata.dma_mask; >> >drivers/of/platform.c: dev->archdata.dma_mask = 0xffffffffUL; >> >drivers/of/platform.c: dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); >> >drivers/of/platform.c: dev->dev.coherent_dma_mask = ~0; >> >drivers/of/platform.c: dev->dma_mask = ~0; >> > >> >-ECONFUSED >> >> dma_mask is set under some ifdef except for "dev->dma_mask = ~0;". >> However I agree with you for coherent_dma_mask case. > > indeed. Should we try to patch that instead ? > > Rob, should we set dma_mask at the driver or do you have a nicer way to > handle it ?? > Can i have suggestions here please ? :) > -- > balbi > > _______________________________________________ > devicetree-discuss mailing list > devicetree-discuss@lists.ozlabs.org > https://lists.ozlabs.org/listinfo/devicetree-discuss > Thanks & Regards Vivek -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi, On Thu, Oct 25, 2012 at 11:37:33AM +0530, Vivek Gautam wrote: > Hi, > > On Tue, Oct 16, 2012 at 3:38 PM, Felipe Balbi <balbi@ti.com> wrote: > > Hi, > > > > On Tue, Oct 16, 2012 at 03:36:43PM +0530, kishon wrote: > >> Hi, > >> > >> On Tuesday 16 October 2012 03:23 PM, Felipe Balbi wrote: > >> >On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: > >> >>This patch adds support to parse probe data for > >> >>dwc3-exynos driver using device tree. > >> >> > >> >>Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> > >> >>--- > >> >> 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 ca65978..d11ef49 100644 > >> >>--- a/drivers/usb/dwc3/dwc3-exynos.c > >> >>+++ b/drivers/usb/dwc3/dwc3-exynos.c > >> >>@@ -21,6 +21,7 @@ > >> >> #include <linux/clk.h> > >> >> #include <linux/usb/otg.h> > >> >> #include <linux/usb/nop-usb-xceiv.h> > >> >>+#include <linux/of.h> > >> >> > >> >> #include "core.h" > >> >> > >> >>@@ -87,6 +88,8 @@ err1: > >> >> return ret; > >> >> } > >> >> > >> >>+static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); > >> >>+ > >> >> static int __devinit dwc3_exynos_probe(struct platform_device *pdev) > >> >> { > >> >> struct dwc3_exynos_data *pdata = pdev->dev.platform_data; > >> >>@@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) > >> >> goto err0; > >> >> } > >> >> > >> >>+ /* > >> >>+ * 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 move to full device tree support this will vanish off. > >> >>+ */ > >> >>+ if (!pdev->dev.dma_mask) > >> >>+ pdev->dev.dma_mask = &dwc3_exynos_dma_mask; > >> > > >> >says who ? > >> > > >> >$ git grep -e dma_mask drivers/of/ > >> >drivers/of/platform.c: dev->dev.dma_mask = &dev->archdata.dma_mask; > >> >drivers/of/platform.c: dev->archdata.dma_mask = 0xffffffffUL; > >> >drivers/of/platform.c: dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > >> >drivers/of/platform.c: dev->dev.coherent_dma_mask = ~0; > >> >drivers/of/platform.c: dev->dma_mask = ~0; > >> > > >> >-ECONFUSED > >> > >> dma_mask is set under some ifdef except for "dev->dma_mask = ~0;". > >> However I agree with you for coherent_dma_mask case. > > > > indeed. Should we try to patch that instead ? > > > > Rob, should we set dma_mask at the driver or do you have a nicer way to > > handle it ?? > > > Can i have suggestions here please ? :) Benoit, can you answer here since nobody else does ?
Hi Felipe, On 10/26/2012 10:13 AM, Felipe Balbi wrote: > Hi, > > On Thu, Oct 25, 2012 at 11:37:33AM +0530, Vivek Gautam wrote: >> Hi, >> >> On Tue, Oct 16, 2012 at 3:38 PM, Felipe Balbi <balbi@ti.com> wrote: >>> Hi, >>> >>> On Tue, Oct 16, 2012 at 03:36:43PM +0530, kishon wrote: >>>> Hi, >>>> >>>> On Tuesday 16 October 2012 03:23 PM, Felipe Balbi wrote: >>>>> On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: >>>>>> This patch adds support to parse probe data for >>>>>> dwc3-exynos driver using device tree. >>>>>> >>>>>> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> >>>>>> --- >>>>>> 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 ca65978..d11ef49 100644 >>>>>> --- a/drivers/usb/dwc3/dwc3-exynos.c >>>>>> +++ b/drivers/usb/dwc3/dwc3-exynos.c >>>>>> @@ -21,6 +21,7 @@ >>>>>> #include <linux/clk.h> >>>>>> #include <linux/usb/otg.h> >>>>>> #include <linux/usb/nop-usb-xceiv.h> >>>>>> +#include <linux/of.h> >>>>>> >>>>>> #include "core.h" >>>>>> >>>>>> @@ -87,6 +88,8 @@ err1: >>>>>> return ret; >>>>>> } >>>>>> >>>>>> +static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); >>>>>> + >>>>>> static int __devinit dwc3_exynos_probe(struct platform_device *pdev) >>>>>> { >>>>>> struct dwc3_exynos_data *pdata = pdev->dev.platform_data; >>>>>> @@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) >>>>>> goto err0; >>>>>> } >>>>>> >>>>>> + /* >>>>>> + * 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 move to full device tree support this will vanish off. >>>>>> + */ >>>>>> + if (!pdev->dev.dma_mask) >>>>>> + pdev->dev.dma_mask = &dwc3_exynos_dma_mask; >>>>> >>>>> says who ? >>>>> >>>>> $ git grep -e dma_mask drivers/of/ >>>>> drivers/of/platform.c: dev->dev.dma_mask = &dev->archdata.dma_mask; >>>>> drivers/of/platform.c: dev->archdata.dma_mask = 0xffffffffUL; >>>>> drivers/of/platform.c: dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); >>>>> drivers/of/platform.c: dev->dev.coherent_dma_mask = ~0; >>>>> drivers/of/platform.c: dev->dma_mask = ~0; >>>>> >>>>> -ECONFUSED >>>> >>>> dma_mask is set under some ifdef except for "dev->dma_mask = ~0;". >>>> However I agree with you for coherent_dma_mask case. >>> >>> indeed. Should we try to patch that instead ? >>> >>> Rob, should we set dma_mask at the driver or do you have a nicer way to >>> handle it ?? >>> >> Can i have suggestions here please ? :) > > Benoit, can you answer here since nobody else does ? Well, I wish I could, but honestly I don't have a clue :-( Benoit -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Oct 26, 2012 at 01:44:38PM +0200, Benoit Cousson wrote: > Hi Felipe, > > On 10/26/2012 10:13 AM, Felipe Balbi wrote: > > Hi, > > > > On Thu, Oct 25, 2012 at 11:37:33AM +0530, Vivek Gautam wrote: > >> Hi, > >> > >> On Tue, Oct 16, 2012 at 3:38 PM, Felipe Balbi <balbi@ti.com> wrote: > >>> Hi, > >>> > >>> On Tue, Oct 16, 2012 at 03:36:43PM +0530, kishon wrote: > >>>> Hi, > >>>> > >>>> On Tuesday 16 October 2012 03:23 PM, Felipe Balbi wrote: > >>>>> On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: > >>>>>> This patch adds support to parse probe data for > >>>>>> dwc3-exynos driver using device tree. > >>>>>> > >>>>>> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> > >>>>>> --- > >>>>>> 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 ca65978..d11ef49 100644 > >>>>>> --- a/drivers/usb/dwc3/dwc3-exynos.c > >>>>>> +++ b/drivers/usb/dwc3/dwc3-exynos.c > >>>>>> @@ -21,6 +21,7 @@ > >>>>>> #include <linux/clk.h> > >>>>>> #include <linux/usb/otg.h> > >>>>>> #include <linux/usb/nop-usb-xceiv.h> > >>>>>> +#include <linux/of.h> > >>>>>> > >>>>>> #include "core.h" > >>>>>> > >>>>>> @@ -87,6 +88,8 @@ err1: > >>>>>> return ret; > >>>>>> } > >>>>>> > >>>>>> +static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); > >>>>>> + > >>>>>> static int __devinit dwc3_exynos_probe(struct platform_device *pdev) > >>>>>> { > >>>>>> struct dwc3_exynos_data *pdata = pdev->dev.platform_data; > >>>>>> @@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) > >>>>>> goto err0; > >>>>>> } > >>>>>> > >>>>>> + /* > >>>>>> + * 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 move to full device tree support this will vanish off. > >>>>>> + */ > >>>>>> + if (!pdev->dev.dma_mask) > >>>>>> + pdev->dev.dma_mask = &dwc3_exynos_dma_mask; > >>>>> > >>>>> says who ? > >>>>> > >>>>> $ git grep -e dma_mask drivers/of/ > >>>>> drivers/of/platform.c: dev->dev.dma_mask = &dev->archdata.dma_mask; > >>>>> drivers/of/platform.c: dev->archdata.dma_mask = 0xffffffffUL; > >>>>> drivers/of/platform.c: dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); > >>>>> drivers/of/platform.c: dev->dev.coherent_dma_mask = ~0; > >>>>> drivers/of/platform.c: dev->dma_mask = ~0; > >>>>> > >>>>> -ECONFUSED > >>>> > >>>> dma_mask is set under some ifdef except for "dev->dma_mask = ~0;". > >>>> However I agree with you for coherent_dma_mask case. > >>> > >>> indeed. Should we try to patch that instead ? > >>> > >>> Rob, should we set dma_mask at the driver or do you have a nicer way to > >>> handle it ?? > >>> > >> Can i have suggestions here please ? :) > > > > Benoit, can you answer here since nobody else does ? > > Well, I wish I could, but honestly I don't have a clue :-( fair enough, then we will go with Vivek's approach, I'll wait until next friday before looking into these patches again though.
Hi, On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: > This patch adds support to parse probe data for > dwc3-exynos driver using device tree. > > Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> does not apply to my dwc3 branch. Care to respin ?
Hi Felipe, On Wed, Oct 31, 2012 at 7:08 PM, Felipe Balbi <balbi@ti.com> wrote: > Hi, > On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote: >> This patch adds support to parse probe data for >> dwc3-exynos driver using device tree. >> >> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> > > does not apply to my dwc3 branch. Care to respin ? > Sure, i shall respin on latest tree. > -- > balbi
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index ca65978..d11ef49 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c @@ -21,6 +21,7 @@ #include <linux/clk.h> #include <linux/usb/otg.h> #include <linux/usb/nop-usb-xceiv.h> +#include <linux/of.h> #include "core.h" @@ -87,6 +88,8 @@ err1: return ret; } +static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32); + static int __devinit dwc3_exynos_probe(struct platform_device *pdev) { struct dwc3_exynos_data *pdata = pdev->dev.platform_data; @@ -103,6 +106,14 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev) goto err0; } + /* + * 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 move to full device tree support this will vanish off. + */ + if (!pdev->dev.dma_mask) + pdev->dev.dma_mask = &dwc3_exynos_dma_mask; + platform_set_drvdata(pdev, exynos); devid = dwc3_get_device_id(); @@ -200,11 +211,20 @@ static int __devexit dwc3_exynos_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id exynos_dwc3_match[] = { + { .compatible = "samsung,exynos-dwc3" }, + {}, +}; +MODULE_DEVICE_TABLE(of, exynos_dwc3_match); +#endif + static struct platform_driver dwc3_exynos_driver = { .probe = dwc3_exynos_probe, .remove = __devexit_p(dwc3_exynos_remove), .driver = { .name = "exynos-dwc3", + .of_match_table = of_match_ptr(exynos_dwc3_match), }, };
This patch adds support to parse probe data for dwc3-exynos driver using device tree. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> --- drivers/usb/dwc3/dwc3-exynos.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)