* [PATCH v2 0/2] USB: dwc3-exynos: Adding device tree support
@ 2012-10-16 8:45 Vivek Gautam
[not found] ` <1350377157-28465-1-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-10-16 8:45 ` [PATCH v2 2/2] USB: DWC3: EXYNOS: Remove platform data for dwc3-exynos Vivek Gautam
0 siblings, 2 replies; 13+ messages in thread
From: Vivek Gautam @ 2012-10-16 8:45 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, balbi-l0cyMroinI0,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
thomas.abraham-QSEj5FYQhm4dnm+yROfE0A, kishon-l0cyMroinI0,
av.tikhomirov-Sze3O3UU22JBDgjK7y7TUQ
Changes from v1:
- Removed setting-up of "dev.coherent_dma_mask", since of/platform.c
itself takes care of it.
Vivek Gautam (2):
USB: dwc3-exynos: Add support for device tree
USB: DWC3: EXYNOS: Remove platform data for dwc3-exynos
drivers/usb/dwc3/dwc3-exynos.c | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
--
1.7.6.5
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
[not found] ` <1350377157-28465-1-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2012-10-16 8:45 ` Vivek Gautam
2012-10-16 9:53 ` Felipe Balbi
2012-10-31 13:38 ` Felipe Balbi
0 siblings, 2 replies; 13+ messages in thread
From: Vivek Gautam @ 2012-10-16 8:45 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: av.tikhomirov-Sze3O3UU22JBDgjK7y7TUQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, kishon-l0cyMroinI0,
balbi-l0cyMroinI0
This patch adds support to parse probe data for
dwc3-exynos driver using device tree.
Signed-off-by: Vivek Gautam <gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
---
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;
+
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),
},
};
--
1.7.6.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH v2 2/2] USB: DWC3: EXYNOS: Remove platform data for dwc3-exynos
2012-10-16 8:45 [PATCH v2 0/2] USB: dwc3-exynos: Adding device tree support Vivek Gautam
[not found] ` <1350377157-28465-1-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2012-10-16 8:45 ` Vivek Gautam
[not found] ` <1350377157-28465-3-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
1 sibling, 1 reply; 13+ messages in thread
From: Vivek Gautam @ 2012-10-16 8:45 UTC (permalink / raw)
To: linux-usb, linux-omap, devicetree-discuss
Cc: gregkh, balbi, rob.herring, thomas.abraham, kishon, av.tikhomirov
We are removing plat data which was used till now to init and
exit phy. We no longer need this since dwc3-core takes care of
initializing and shutting-down the phy using usb_phy_init()
and usb_phy_shutdown().
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---
drivers/usb/dwc3/dwc3-exynos.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index d11ef49..5a2a73f 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -92,7 +92,6 @@ 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;
struct platform_device *dwc3;
struct dwc3_exynos *exynos;
struct clk *clk;
@@ -150,14 +149,6 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev)
clk_enable(exynos->clk);
- /* PHY initialization */
- if (!pdata) {
- dev_dbg(&pdev->dev, "missing platform data\n");
- } else {
- if (pdata->phy_init)
- pdata->phy_init(pdev, pdata->phy_type);
- }
-
ret = platform_device_add_resources(dwc3, pdev->resource,
pdev->num_resources);
if (ret) {
@@ -174,9 +165,6 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev)
return 0;
err4:
- if (pdata && pdata->phy_exit)
- pdata->phy_exit(pdev, pdata->phy_type);
-
clk_disable(clk);
clk_put(clk);
err3:
@@ -192,7 +180,6 @@ err0:
static int __devexit dwc3_exynos_remove(struct platform_device *pdev)
{
struct dwc3_exynos *exynos = platform_get_drvdata(pdev);
- struct dwc3_exynos_data *pdata = pdev->dev.platform_data;
platform_device_unregister(exynos->dwc3);
platform_device_unregister(exynos->usb2_phy);
@@ -200,9 +187,6 @@ static int __devexit dwc3_exynos_remove(struct platform_device *pdev)
dwc3_put_device_id(exynos->dwc3->id);
- if (pdata && pdata->phy_exit)
- pdata->phy_exit(pdev, pdata->phy_type);
-
clk_disable(exynos->clk);
clk_put(exynos->clk);
--
1.7.6.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
2012-10-16 8:45 ` [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree Vivek Gautam
@ 2012-10-16 9:53 ` Felipe Balbi
2012-10-16 10:06 ` kishon
2012-10-31 13:38 ` Felipe Balbi
1 sibling, 1 reply; 13+ messages in thread
From: Felipe Balbi @ 2012-10-16 9:53 UTC (permalink / raw)
To: Vivek Gautam
Cc: linux-usb, linux-omap, devicetree-discuss, gregkh, balbi,
rob.herring, thomas.abraham, kishon, av.tikhomirov
[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]
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
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
2012-10-16 9:53 ` Felipe Balbi
@ 2012-10-16 10:06 ` kishon
[not found] ` <507D31B3.40707-l0cyMroinI0@public.gmane.org>
0 siblings, 1 reply; 13+ messages in thread
From: kishon @ 2012-10-16 10:06 UTC (permalink / raw)
To: balbi
Cc: Vivek Gautam, linux-usb, linux-omap, devicetree-discuss, gregkh,
rob.herring, thomas.abraham, av.tikhomirov
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
[not found] ` <507D31B3.40707-l0cyMroinI0@public.gmane.org>
@ 2012-10-16 10:08 ` Felipe Balbi
2012-10-25 6:07 ` Vivek Gautam
0 siblings, 1 reply; 13+ messages in thread
From: Felipe Balbi @ 2012-10-16 10:08 UTC (permalink / raw)
To: kishon
Cc: balbi-l0cyMroinI0, Vivek Gautam, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
thomas.abraham-QSEj5FYQhm4dnm+yROfE0A,
av.tikhomirov-Sze3O3UU22JBDgjK7y7TUQ
[-- Attachment #1: Type: text/plain, Size: 2343 bytes --]
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-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> >>---
> >> 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 ??
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
2012-10-16 10:08 ` Felipe Balbi
@ 2012-10-25 6:07 ` Vivek Gautam
2012-10-26 8:13 ` Felipe Balbi
0 siblings, 1 reply; 13+ messages in thread
From: Vivek Gautam @ 2012-10-25 6:07 UTC (permalink / raw)
To: balbi, rob.herring
Cc: kishon, av.tikhomirov, gregkh, devicetree-discuss, linux-usb,
Vivek Gautam, linux-omap
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
2012-10-25 6:07 ` Vivek Gautam
@ 2012-10-26 8:13 ` Felipe Balbi
2012-10-26 11:44 ` Benoit Cousson
0 siblings, 1 reply; 13+ messages in thread
From: Felipe Balbi @ 2012-10-26 8:13 UTC (permalink / raw)
To: Vivek Gautam
Cc: balbi, rob.herring, kishon, av.tikhomirov, gregkh,
devicetree-discuss, linux-usb, Vivek Gautam, linux-omap,
Benoit Cousson
[-- Attachment #1: Type: text/plain, Size: 2804 bytes --]
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 ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
2012-10-26 8:13 ` Felipe Balbi
@ 2012-10-26 11:44 ` Benoit Cousson
2012-10-26 12:01 ` Felipe Balbi
0 siblings, 1 reply; 13+ messages in thread
From: Benoit Cousson @ 2012-10-26 11:44 UTC (permalink / raw)
To: balbi
Cc: Vivek Gautam, rob.herring, kishon, av.tikhomirov, gregkh,
devicetree-discuss, linux-usb, Vivek Gautam, linux-omap
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
2012-10-26 11:44 ` Benoit Cousson
@ 2012-10-26 12:01 ` Felipe Balbi
0 siblings, 0 replies; 13+ messages in thread
From: Felipe Balbi @ 2012-10-26 12:01 UTC (permalink / raw)
To: Benoit Cousson
Cc: balbi, Vivek Gautam, rob.herring, kishon, av.tikhomirov, gregkh,
devicetree-discuss, linux-usb, Vivek Gautam, linux-omap
[-- Attachment #1: Type: text/plain, Size: 3275 bytes --]
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.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 2/2] USB: DWC3: EXYNOS: Remove platform data for dwc3-exynos
[not found] ` <1350377157-28465-3-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2012-10-31 12:06 ` Vivek Gautam
0 siblings, 0 replies; 13+ messages in thread
From: Vivek Gautam @ 2012-10-31 12:06 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r, balbi-l0cyMroinI0,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
thomas.abraham-QSEj5FYQhm4dnm+yROfE0A, kishon-l0cyMroinI0,
Vivek Gautam
Hi all,
On Tue, Oct 16, 2012 at 2:15 PM, Vivek Gautam <gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> wrote:
> We are removing plat data which was used till now to init and
> exit phy. We no longer need this since dwc3-core takes care of
> initializing and shutting-down the phy using usb_phy_init()
> and usb_phy_shutdown().
>
> Signed-off-by: Vivek Gautam <gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Any thoughts on this please ?
> ---
> drivers/usb/dwc3/dwc3-exynos.c | 16 ----------------
> 1 files changed, 0 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
> index d11ef49..5a2a73f 100644
> --- a/drivers/usb/dwc3/dwc3-exynos.c
> +++ b/drivers/usb/dwc3/dwc3-exynos.c
> @@ -92,7 +92,6 @@ 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;
> struct platform_device *dwc3;
> struct dwc3_exynos *exynos;
> struct clk *clk;
> @@ -150,14 +149,6 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev)
>
> clk_enable(exynos->clk);
>
> - /* PHY initialization */
> - if (!pdata) {
> - dev_dbg(&pdev->dev, "missing platform data\n");
> - } else {
> - if (pdata->phy_init)
> - pdata->phy_init(pdev, pdata->phy_type);
> - }
> -
> ret = platform_device_add_resources(dwc3, pdev->resource,
> pdev->num_resources);
> if (ret) {
> @@ -174,9 +165,6 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev)
> return 0;
>
> err4:
> - if (pdata && pdata->phy_exit)
> - pdata->phy_exit(pdev, pdata->phy_type);
> -
> clk_disable(clk);
> clk_put(clk);
> err3:
> @@ -192,7 +180,6 @@ err0:
> static int __devexit dwc3_exynos_remove(struct platform_device *pdev)
> {
> struct dwc3_exynos *exynos = platform_get_drvdata(pdev);
> - struct dwc3_exynos_data *pdata = pdev->dev.platform_data;
>
> platform_device_unregister(exynos->dwc3);
> platform_device_unregister(exynos->usb2_phy);
> @@ -200,9 +187,6 @@ static int __devexit dwc3_exynos_remove(struct platform_device *pdev)
>
> dwc3_put_device_id(exynos->dwc3->id);
>
> - if (pdata && pdata->phy_exit)
> - pdata->phy_exit(pdev, pdata->phy_type);
> -
> clk_disable(exynos->clk);
> clk_put(exynos->clk);
>
> --
> 1.7.6.5
>
> --
> 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
--
Thanks & Regards
Vivek
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
2012-10-16 8:45 ` [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree Vivek Gautam
2012-10-16 9:53 ` Felipe Balbi
@ 2012-10-31 13:38 ` Felipe Balbi
[not found] ` <20121031133823.GW10998-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
1 sibling, 1 reply; 13+ messages in thread
From: Felipe Balbi @ 2012-10-31 13:38 UTC (permalink / raw)
To: Vivek Gautam
Cc: linux-usb, linux-omap, devicetree-discuss, gregkh, balbi,
rob.herring, thomas.abraham, kishon, av.tikhomirov
[-- Attachment #1: Type: text/plain, Size: 290 bytes --]
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 ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
[not found] ` <20121031133823.GW10998-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
@ 2012-10-31 14:29 ` Vivek Gautam
0 siblings, 0 replies; 13+ messages in thread
From: Vivek Gautam @ 2012-10-31 14:29 UTC (permalink / raw)
To: balbi-l0cyMroinI0
Cc: Vivek Gautam, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
thomas.abraham-QSEj5FYQhm4dnm+yROfE0A, kishon-l0cyMroinI0,
av.tikhomirov-Sze3O3UU22JBDgjK7y7TUQ
Hi Felipe,
On Wed, Oct 31, 2012 at 7:08 PM, Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org> 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-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>
> does not apply to my dwc3 branch. Care to respin ?
>
Sure, i shall respin on latest tree.
> --
> balbi
--
Thanks & Regards
Vivek
--
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
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-10-31 14:29 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16 8:45 [PATCH v2 0/2] USB: dwc3-exynos: Adding device tree support Vivek Gautam
[not found] ` <1350377157-28465-1-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-10-16 8:45 ` [PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree Vivek Gautam
2012-10-16 9:53 ` Felipe Balbi
2012-10-16 10:06 ` kishon
[not found] ` <507D31B3.40707-l0cyMroinI0@public.gmane.org>
2012-10-16 10:08 ` Felipe Balbi
2012-10-25 6:07 ` Vivek Gautam
2012-10-26 8:13 ` Felipe Balbi
2012-10-26 11:44 ` Benoit Cousson
2012-10-26 12:01 ` Felipe Balbi
2012-10-31 13:38 ` Felipe Balbi
[not found] ` <20121031133823.GW10998-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-10-31 14:29 ` Vivek Gautam
2012-10-16 8:45 ` [PATCH v2 2/2] USB: DWC3: EXYNOS: Remove platform data for dwc3-exynos Vivek Gautam
[not found] ` <1350377157-28465-3-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-10-31 12:06 ` Vivek Gautam
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).