From patchwork Thu Dec 19 15:55:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 22648 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2118E23FCA for ; Thu, 19 Dec 2013 15:55:50 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf3372838pab.3 for ; Thu, 19 Dec 2013 07:55:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=oCeNqLHUy9dgCV1xZTBrkxUJM5YBi1OeIY8HzAbUjfc=; b=R4qMjxwtQVH7CKIEECHyQpnKvNW6kL5AzcBGKVmGgFWRKZvwHbFwsXEXmzGMwOrtVf q8KwYvEyYo89lqTWO0IU8Y2JMyyXrYjBrJYKaFM75VbOcO1VlMnjOLYTiZ3WlzWRq8Az 0tR3cXSgv0x3cqrareBAu77EcsMCSWjcvdTc844LbLGwt8vwfj9nqY2o/VXm1/Z7EJOh 26u4s1TKr/8u4svIeO+pS1mUlFcpfSWAY1wsnt145I5cRTky93vS3VG2Lex7MzdqcBBJ 2Nu9HxHXOx+84kf5H1JMrqZjktgToYCxc66SiBQiWI0NyyLCZ75NmKqYX+mmqSI48ldS ee/Q== X-Gm-Message-State: ALoCoQkBnUQS04gdNNtyrQjFqLnveC8KdnXpHAMkSc5CIVt9Fio+u5w+yDadarB5N9BAGK/IZMa/ X-Received: by 10.66.66.163 with SMTP id g3mr1001524pat.3.1387468549436; Thu, 19 Dec 2013 07:55:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.25.42 with SMTP id z10ls399583qef.63.gmail; Thu, 19 Dec 2013 07:55:49 -0800 (PST) X-Received: by 10.58.37.67 with SMTP id w3mr504869vej.22.1387468549258; Thu, 19 Dec 2013 07:55:49 -0800 (PST) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id y5si786589vck.2.2013.12.19.07.55.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 07:55:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lf12so732207vcb.7 for ; Thu, 19 Dec 2013 07:55:49 -0800 (PST) X-Received: by 10.52.103.35 with SMTP id ft3mr1139000vdb.5.1387468549132; Thu, 19 Dec 2013 07:55:49 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp331362ved; Thu, 19 Dec 2013 07:55:48 -0800 (PST) X-Received: by 10.194.110.138 with SMTP id ia10mr2099722wjb.3.1387468548119; Thu, 19 Dec 2013 07:55:48 -0800 (PST) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx.google.com with ESMTPS id pm9si1697028wjb.20.2013.12.19.07.55.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 07:55:48 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.182 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.182; Received: by mail-wi0-f182.google.com with SMTP id en1so2395367wid.15 for ; Thu, 19 Dec 2013 07:55:47 -0800 (PST) X-Received: by 10.180.189.68 with SMTP id gg4mr3075850wic.46.1387468547576; Thu, 19 Dec 2013 07:55:47 -0800 (PST) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginm.net. [92.233.57.238]) by mx.google.com with ESMTPSA id ko3sm279236wjb.23.2013.12.19.07.55.45 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Dec 2013 07:55:46 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, broonie@kernel.org, alsa-devel@alsa-project.org, Lee Jones Subject: [PATCH 10/11] ASoC: ux500_pcm: Differentiate between pdata and DT initialisation Date: Thu, 19 Dec 2013 15:55:07 +0000 Message-Id: <1387468508-12286-11-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387468508-12286-1-git-send-email-lee.jones@linaro.org> References: <1387468508-12286-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , If booting with full DT support (i.e. DMA too, the last piece of the puzzle), then we don't need to use the compatible_request_channel call back or require some of the historical bumph which probably isn't required by a platform data start-up now either. This will also be ripped out in upcoming commits. Acked-by: Linus Walleij Signed-off-by: Lee Jones --- sound/soc/ux500/ux500_pcm.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c index 3d1c342..55a8634 100644 --- a/sound/soc/ux500/ux500_pcm.c +++ b/sound/soc/ux500/ux500_pcm.c @@ -145,15 +145,25 @@ static const struct snd_dmaengine_pcm_config ux500_dmaengine_pcm_config = { .prepare_slave_config = ux500_pcm_prepare_slave_config, }; +static const struct snd_dmaengine_pcm_config ux500_dmaengine_of_pcm_config = { + .compat_request_channel = ux500_pcm_request_chan, + .prepare_slave_config = ux500_pcm_prepare_slave_config, +}; + int ux500_pcm_register_platform(struct platform_device *pdev) { + const struct snd_dmaengine_pcm_config *pcm_config; + struct device_node *np = pdev->dev.of_node; int ret; - ret = snd_dmaengine_pcm_register(&pdev->dev, - &ux500_dmaengine_pcm_config, - SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | - SND_DMAENGINE_PCM_FLAG_COMPAT | - SND_DMAENGINE_PCM_FLAG_NO_DT); + if (np) + pcm_config = &ux500_dmaengine_of_pcm_config; + else + pcm_config = &ux500_dmaengine_pcm_config; + + ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config, + SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | + SND_DMAENGINE_PCM_FLAG_COMPAT); if (ret < 0) { dev_err(&pdev->dev, "%s: ERROR: Failed to register platform '%s' (%d)!\n",