linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: keystone: drop dma_mask configuration
@ 2016-04-04 11:33 Grygorii Strashko
  2016-04-04 11:45 ` Felipe Balbi
  0 siblings, 1 reply; 4+ messages in thread
From: Grygorii Strashko @ 2016-04-04 11:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Felipe Balbi, linux-usb
  Cc: Roger Quadros, linux-kernel, linux-arm-kernel, nsekhar,
	Grygorii Strashko, Murali Karicheri

The Keystone 2 supports DT-boot only, as result dma_mask will be
always configured properly from DT -
of_platform_device_create_pdata()->of_dma_configure(). More over,
dwc3-keystone.c can be built as module and in this case it's unsafe to
assign local variable as dma_mask.

Hence, remove dma_mask configuration code.

Cc: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/usb/dwc3/dwc3-keystone.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-keystone.c b/drivers/usb/dwc3/dwc3-keystone.c
index 2be268d..7266470 100644
--- a/drivers/usb/dwc3/dwc3-keystone.c
+++ b/drivers/usb/dwc3/dwc3-keystone.c
@@ -39,8 +39,6 @@
 #define USBSS_IRQ_COREIRQ_EN	BIT(0)
 #define USBSS_IRQ_COREIRQ_CLR	BIT(0)
 
-static u64 kdwc3_dma_mask;
-
 struct dwc3_keystone {
 	struct device			*dev;
 	struct clk			*clk;
@@ -108,9 +106,6 @@ static int kdwc3_probe(struct platform_device *pdev)
 	if (IS_ERR(kdwc->usbss))
 		return PTR_ERR(kdwc->usbss);
 
-	kdwc3_dma_mask = dma_get_mask(dev);
-	dev->dma_mask = &kdwc3_dma_mask;
-
 	kdwc->clk = devm_clk_get(kdwc->dev, "usb");
 
 	error = clk_prepare_enable(kdwc->clk);
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc3: keystone: drop dma_mask configuration
  2016-04-04 11:33 [PATCH] usb: dwc3: keystone: drop dma_mask configuration Grygorii Strashko
@ 2016-04-04 11:45 ` Felipe Balbi
  2016-04-04 13:41   ` Grygorii Strashko
  0 siblings, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2016-04-04 11:45 UTC (permalink / raw)
  To: Grygorii Strashko, Greg Kroah-Hartman, linux-usb
  Cc: Roger Quadros, linux-kernel, linux-arm-kernel, nsekhar,
	Grygorii Strashko, Murali Karicheri

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]


Hi,

Grygorii Strashko <grygorii.strashko@ti.com> writes:
> The Keystone 2 supports DT-boot only, as result dma_mask will be
> always configured properly from DT -
> of_platform_device_create_pdata()->of_dma_configure(). More over,
> dwc3-keystone.c can be built as module and in this case it's unsafe to
> assign local variable as dma_mask.
>
> Hence, remove dma_mask configuration code.
>
> Cc: Murali Karicheri <m-karicheri2@ti.com>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

with these two patches from you, does USB Peripheral work on k2 devices ?

I'll drop my k2 changes from my series which I sent on saturday.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc3: keystone: drop dma_mask configuration
  2016-04-04 11:45 ` Felipe Balbi
@ 2016-04-04 13:41   ` Grygorii Strashko
  2016-04-05  5:19     ` Felipe Balbi
  0 siblings, 1 reply; 4+ messages in thread
From: Grygorii Strashko @ 2016-04-04 13:41 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, linux-usb
  Cc: Roger Quadros, linux-kernel, linux-arm-kernel, nsekhar, Murali Karicheri

On 04/04/2016 02:45 PM, Felipe Balbi wrote:
>
> Hi,
>
> Grygorii Strashko <grygorii.strashko@ti.com> writes:
>> The Keystone 2 supports DT-boot only, as result dma_mask will be
>> always configured properly from DT -
>> of_platform_device_create_pdata()->of_dma_configure(). More over,
>> dwc3-keystone.c can be built as module and in this case it's unsafe to
>> assign local variable as dma_mask.
>>
>> Hence, remove dma_mask configuration code.
>>
>> Cc: Murali Karicheri <m-karicheri2@ti.com>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>
> with these two patches from you, does USB Peripheral work on k2 devices ?

I've tried CONFIG_USB_DWC3_GADGET=y + g_zero and k2e was detected
as gzero dev from Host PC

>
> I'll drop my k2 changes from my series which I sent on saturday.
>

Yes, please.

-- 
regards,
-grygorii

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc3: keystone: drop dma_mask configuration
  2016-04-04 13:41   ` Grygorii Strashko
@ 2016-04-05  5:19     ` Felipe Balbi
  0 siblings, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2016-04-05  5:19 UTC (permalink / raw)
  To: Grygorii Strashko, Greg Kroah-Hartman, linux-usb
  Cc: Roger Quadros, linux-kernel, linux-arm-kernel, nsekhar, Murali Karicheri

[-- Attachment #1: Type: text/plain, Size: 1004 bytes --]


Hi,

Grygorii Strashko <grygorii.strashko@ti.com> writes:
> On 04/04/2016 02:45 PM, Felipe Balbi wrote:
>>
>> Hi,
>>
>> Grygorii Strashko <grygorii.strashko@ti.com> writes:
>>> The Keystone 2 supports DT-boot only, as result dma_mask will be
>>> always configured properly from DT -
>>> of_platform_device_create_pdata()->of_dma_configure(). More over,
>>> dwc3-keystone.c can be built as module and in this case it's unsafe to
>>> assign local variable as dma_mask.
>>>
>>> Hence, remove dma_mask configuration code.
>>>
>>> Cc: Murali Karicheri <m-karicheri2@ti.com>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>
>> with these two patches from you, does USB Peripheral work on k2 devices ?
>
> I've tried CONFIG_USB_DWC3_GADGET=y + g_zero and k2e was detected
> as gzero dev from Host PC
>
>>
>> I'll drop my k2 changes from my series which I sent on saturday.
>>
>
> Yes, please.

can you test a similar patch to dwc3-omap.c, then ?

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-05  5:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04 11:33 [PATCH] usb: dwc3: keystone: drop dma_mask configuration Grygorii Strashko
2016-04-04 11:45 ` Felipe Balbi
2016-04-04 13:41   ` Grygorii Strashko
2016-04-05  5:19     ` Felipe Balbi

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).