On 01/18/2017 06:43 PM, Tony Lindgren wrote: > * Alexandre Bailon <abailon@xxxxxxxxxxxx> [170118 06:54]: >> On 01/18/2017 12:29 AM, Tony Lindgren wrote: >>> * Alexandre Bailon <abailon@xxxxxxxxxxxx> [170117 05:16]: >>>> Currently, the CPPI 4.1 driver is not completely generic and >>>> only work on dsps. >>>> Add two functions which will help to move platform code from CPPI 4.1 to >>>> MUSB glue driver: >>>> - cppi41_register_dma_callback() to register a platform dma_callback >>>> (e.g to acknowledge interrupt on DMA completion). >>>> - cppi41_dma_controller_to_musb() to convert a dma_controller pointer to >>>> a musb pointer. This is required to get a musb pointer from DMA callbacks. >>> >>> Can't you just add a new function to struct dma_controller in musb_dma.h? >> Yes, I can add the dma_callback function to dma_controller and then >> remove cppi41_register_dma_callback(). > > OK > >> But I still to define cppi41_dma_controller_to_musb() except if I add a >> musb pointer to dma_controller. > > Yeah makes sense to me. Or get it from the hw_ep that already has it? Yes hw_ep has it but it only available in cppi41_dma_callback(). I also need to get the musb pointer from dma_exit() callback (defined in musb_platform_ops). dma_exit only have one argument: struct dma_controller. Having musb in dma_controller make thing more easier. The other solution is to add a new argument to dma_exit(). Regards, Alexandre > > Regards, > > Tony > -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html