Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3183809imm; Fri, 25 May 2018 00:56:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrcnUuG96VNBNjtaLuLDR2ndK6Sxez1GXhNGyS7meeUUA5TjtErPJVXkOqwlCoOI+k+aMBt X-Received: by 2002:a63:648:: with SMTP id 69-v6mr1130071pgg.205.1527235011255; Fri, 25 May 2018 00:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527235011; cv=none; d=google.com; s=arc-20160816; b=vq+dEGEVQjWoWAj5Sqe+4v4zZdZA95ab940ldA2ikBhxZH9Y5/xamViW4AIca9pUhX MThzSRCtyob1sszfEBu42UTmVARuj4932wK09HiGGhhH7ptsWX+xiuRawdup8Xjdgs0i 4R719/byQ+sj8yID7S6w0PmWgR6PQTVpm+6UBwg7grzWdIstQCVGzbAhXgKwXDyZgEEM mMgJPrHdI/AEPqR4A9k5GRzkWxSfTp0aGK7UQRL6DDXrI4GQ23C0UY8pPmNnePAfuKt6 agLaaiotq4c6nqejcO+2VZOC4gDqY74XpshFWmn7s1t+B9X/wyO2vPnddq6HIWWKNSLm j1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=zMQDp0oQlPrOgcLun2uV72KGdExun+VE3v0ctvBtxZ0=; b=gG98R1YgG1EokYrXdLKi7rKnfx1nFRUQpLZ7vifURENAffjxuh2TDQYvPKCt9eZ9ko oI4sLlqYUkTIYVty+62tQQYcLXqz3En2gcKpG9thgjDT5h9MmyGvf6M1yY4rm3h49kbU O2lE2tSHdtXGFCXK+2wKnUeJRgv+E1Ka/9olhvXRxQKMvLFoUk+M5NHAOnGus/2oHK0/ I0P8ktIdmemARpTztjyVBiEGcGNkvc/QyVoLIWnUDQ4liKAfGQeSiqwcWF5Svy3XAt7O bXNiU8ZShTnFLnM2UMmYCd/SqiOCxRJdx+ullxO+Ihe4WH6xp9Y4UXXUZyNiC29UUid+ iXgQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5-v6si23235579plo.113.2018.05.25.00.56.36; Fri, 25 May 2018 00:56:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935960AbeEYH4V (ORCPT + 99 others); Fri, 25 May 2018 03:56:21 -0400 Received: from mail.bugwerft.de ([46.23.86.59]:52730 "EHLO mail.bugwerft.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935919AbeEYH4T (ORCPT ); Fri, 25 May 2018 03:56:19 -0400 Received: from [IPv6:2001:16b8:4670:7800:5921:dcfc:9cc7:6e5e] (200116b8467078005921dcfc9cc76e5e.dip.versatel-1u1.de [IPv6:2001:16b8:4670:7800:5921:dcfc:9cc7:6e5e]) by mail.bugwerft.de (Postfix) with ESMTPSA id 236FA2857F2; Fri, 25 May 2018 07:53:39 +0000 (UTC) Subject: Re: [PATCH v2 13/13] ARM: pxa: change SSP DMA channels allocation To: Robert Jarzmik , Haojian Zhuang , Ezequiel Garcia , Boris Brezillon , David Woodhouse , Brian Norris , Marek Vasut , Richard Weinberger , Liam Girdwood , Mark Brown , Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, dmaengine@vger.kernel.org, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, netdev@vger.kernel.org, alsa-devel@alsa-project.org References: <20180524070703.11901-1-robert.jarzmik@free.fr> <20180524070703.11901-14-robert.jarzmik@free.fr> From: Daniel Mack Message-ID: <7e50d21c-c563-156f-d5d3-cd977af0e9d0@zonque.org> Date: Fri, 25 May 2018 09:56:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180524070703.11901-14-robert.jarzmik@free.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, May 24, 2018 09:07 AM, Robert Jarzmik wrote: > Now the dma_slave_map is available for PXA architecture, switch the SSP > device to it. > > This specifically means that : > - for platform data based machines, the DMA requestor channels are > extracted from the slave map, where pxa-ssp-dai. is a 1-1 match to > ssp., and the channels are either "rx" or "tx". > > - for device tree platforms, the dma node should be hooked into the > pxa2xx-ac97 or pxa-ssp-dai node. > > Signed-off-by: Robert Jarzmik Acked-by: Daniel Mack We should, however, merge what's left of this management glue code into the users of it, so the dma related properties can be put in the right devicetree node. I'll prepare a patch for that for 4.18. This is a good preparation for this round though. Thanks, Daniel > --- > Since v1: Removed channel names from platform_data > --- > arch/arm/plat-pxa/ssp.c | 47 ---------------------------------------------- > include/linux/pxa2xx_ssp.h | 2 -- > sound/soc/pxa/pxa-ssp.c | 5 ++--- > 3 files changed, 2 insertions(+), 52 deletions(-) > > diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c > index ba13f793fbce..ed36dcab80f1 100644 > --- a/arch/arm/plat-pxa/ssp.c > +++ b/arch/arm/plat-pxa/ssp.c > @@ -127,53 +127,6 @@ static int pxa_ssp_probe(struct platform_device *pdev) > if (IS_ERR(ssp->clk)) > return PTR_ERR(ssp->clk); > > - if (dev->of_node) { > - struct of_phandle_args dma_spec; > - struct device_node *np = dev->of_node; > - int ret; > - > - /* > - * FIXME: we should allocate the DMA channel from this > - * context and pass the channel down to the ssp users. > - * For now, we lookup the rx and tx indices manually > - */ > - > - /* rx */ > - ret = of_parse_phandle_with_args(np, "dmas", "#dma-cells", > - 0, &dma_spec); > - > - if (ret) { > - dev_err(dev, "Can't parse dmas property\n"); > - return -ENODEV; > - } > - ssp->drcmr_rx = dma_spec.args[0]; > - of_node_put(dma_spec.np); > - > - /* tx */ > - ret = of_parse_phandle_with_args(np, "dmas", "#dma-cells", > - 1, &dma_spec); > - if (ret) { > - dev_err(dev, "Can't parse dmas property\n"); > - return -ENODEV; > - } > - ssp->drcmr_tx = dma_spec.args[0]; > - of_node_put(dma_spec.np); > - } else { > - res = platform_get_resource(pdev, IORESOURCE_DMA, 0); > - if (res == NULL) { > - dev_err(dev, "no SSP RX DRCMR defined\n"); > - return -ENODEV; > - } > - ssp->drcmr_rx = res->start; > - > - res = platform_get_resource(pdev, IORESOURCE_DMA, 1); > - if (res == NULL) { > - dev_err(dev, "no SSP TX DRCMR defined\n"); > - return -ENODEV; > - } > - ssp->drcmr_tx = res->start; > - } > - > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > if (res == NULL) { > dev_err(dev, "no memory resource defined\n"); > diff --git a/include/linux/pxa2xx_ssp.h b/include/linux/pxa2xx_ssp.h > index 8461b18e4608..03a7ca46735b 100644 > --- a/include/linux/pxa2xx_ssp.h > +++ b/include/linux/pxa2xx_ssp.h > @@ -212,8 +212,6 @@ struct ssp_device { > int type; > int use_count; > int irq; > - int drcmr_rx; > - int drcmr_tx; > > struct device_node *of_node; > }; > diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c > index 0291c7cb64eb..e09368d89bbc 100644 > --- a/sound/soc/pxa/pxa-ssp.c > +++ b/sound/soc/pxa/pxa-ssp.c > @@ -104,9 +104,8 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, > dma = kzalloc(sizeof(struct snd_dmaengine_dai_dma_data), GFP_KERNEL); > if (!dma) > return -ENOMEM; > - > - dma->filter_data = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? > - &ssp->drcmr_tx : &ssp->drcmr_rx; > + dma->chan_name = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? > + "tx" : "rx"; > > snd_soc_dai_set_dma_data(cpu_dai, substream, dma); > >