Re: [PATCH 3/8 v4] dma: k3dma: Upgrade k3dma driver to support hisi_asp_dma hardware

From: John Stultz
Date: Wed Jan 23 2019 - 23:32:48 EST


On Wed, Jan 23, 2019 at 4:57 AM Vinod Koul <vkoul@xxxxxxxxxx> wrote:
> On 22-01-19, 15:48, John Stultz wrote:
> > Do let me know if there's an example you'd rather I follow.
>
> To elaborate I was thinking of alternate scheme with:
>
> compatible = "hisilicon,k3-dma-1.0", NULL
> compatible = "hisilicon,hisi-pcm-asp-dma-1.0", .data = &asp_v1_dma_data
>
> and
>
> soc_data = device_get_match_data(&op->dev);
> if (!soc_data) {
> /* no data so flags are null */
> dev_warn(... "no driver data specified, assuming no flags\n"
> k3_dma->flags = 0;
> }

Thanks for the clarification! Hmm. I can do this, though the trouble
is all the soc_data-> references have to switch to a struct
k3dma_soc_data on the stack, which we have to initialize/copy over
depending on the soc_data return, which I'm not sure really simplifies
much (other then saving a ulong off the heap). But I'm ok with either.

thanks
-john