mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] usb: gadget: fsl: Set dma_ops for FSL USB Gadget Device
@ 2014-03-20 20:26 Suresh Gupta
  2014-04-17 15:28 ` Felipe Balbi
  0 siblings, 1 reply; 2+ messages in thread
From: Suresh Gupta @ 2014-03-20 20:26 UTC (permalink / raw)
  To: balbi, gregkh; +Cc: linux-usb, linux-kernel, Suresh Gupta

From: Suresh Gupta <B42813@freescale.com>

DMA mapping functions are moved to common place in udc_core.c
which expect the DMA operation of gadget device

Signed-off-by: Suresh Gupta <B42813@freescale.com>
---
Changes from previous version:
* Added description

 drivers/usb/gadget/fsl_udc_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
index d68aa77..35cb972 100644
--- a/drivers/usb/gadget/fsl_udc_core.c
+++ b/drivers/usb/gadget/fsl_udc_core.c
@@ -2456,6 +2456,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
 	/* Setup gadget.dev and register with kernel */
 	dev_set_name(&udc_controller->gadget.dev, "gadget");
 	udc_controller->gadget.dev.of_node = pdev->dev.of_node;
+	set_dma_ops(&udc_controller->gadget.dev, pdev->dev.archdata.dma_ops);
 
 	if (!IS_ERR_OR_NULL(udc_controller->transceiver))
 		udc_controller->gadget.is_otg = 1;
-- 
1.8.4.1



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

* Re: [PATCH v2] usb: gadget: fsl: Set dma_ops for FSL USB Gadget Device
  2014-03-20 20:26 [PATCH v2] usb: gadget: fsl: Set dma_ops for FSL USB Gadget Device Suresh Gupta
@ 2014-04-17 15:28 ` Felipe Balbi
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2014-04-17 15:28 UTC (permalink / raw)
  To: Suresh Gupta; +Cc: balbi, gregkh, linux-usb, linux-kernel, Suresh Gupta

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

Hi,

On Fri, Mar 21, 2014 at 01:56:49AM +0530, Suresh Gupta wrote:
> From: Suresh Gupta <B42813@freescale.com>
> 
> DMA mapping functions are moved to common place in udc_core.c
> which expect the DMA operation of gadget device
> 
> Signed-off-by: Suresh Gupta <B42813@freescale.com>
> ---
> Changes from previous version:
> * Added description
> 
>  drivers/usb/gadget/fsl_udc_core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/gadget/fsl_udc_core.c b/drivers/usb/gadget/fsl_udc_core.c
> index d68aa77..35cb972 100644
> --- a/drivers/usb/gadget/fsl_udc_core.c
> +++ b/drivers/usb/gadget/fsl_udc_core.c
> @@ -2456,6 +2456,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
>  	/* Setup gadget.dev and register with kernel */
>  	dev_set_name(&udc_controller->gadget.dev, "gadget");
>  	udc_controller->gadget.dev.of_node = pdev->dev.of_node;
> +	set_dma_ops(&udc_controller->gadget.dev, pdev->dev.archdata.dma_ops);

I'm still not convinced this is the best thing to do in a driver.
set_dma_ops() isn't even exposed on include/linux/ and no other driver
tries to call it. This is really something that should be done at arch
level.

Perhaps send a note to lakml and see if anybody has a better idea ?

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2014-04-17 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-20 20:26 [PATCH v2] usb: gadget: fsl: Set dma_ops for FSL USB Gadget Device Suresh Gupta
2014-04-17 15:28 ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®