RE: [PATCH] usb: gadget: fsl: Set dma_ops for FSL USB Gadget Device

From: suresh.gupta@xxxxxxxxxxxxx
Date: Fri Mar 14 2014 - 17:08:44 EST


Hi,

-----Original Message-----
From: Felipe Balbi [mailto:balbi@xxxxxx]
Sent: Thursday, March 13, 2014 8:57 PM
To: Gupta Suresh-B42813
Cc: balbi@xxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Gupta Suresh-B42813
Subject: Re: [PATCH] usb: gadget: fsl: Set dma_ops for FSL USB Gadget Device

Hi,

On Thu, Mar 13, 2014 at 07:37:12PM +0530, Suresh Gupta wrote:
> From: Suresh Gupta <B42813@xxxxxxxxxxxxx>

return -ENOLOG

> Signed-off-by: Suresh Gupta <B42813@xxxxxxxxxxxxx>
> ---
> 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 35b20e6..2a43d9d 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);

why is the driver doing this ? Why is the driver given knowledge about details on archdata ?

Why do you need this at all ?
[SuresH] This is due to moving mapping virtual address functions
to common "udc-core.c" where for example the dma_map_single expect dma_ops of gadget device.
Before we call this function from our file with argument dma_map_single(ep->udc->gadget.dev.parent,.....

----
Thanks
SuresH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/