From patchwork Mon Dec 2 18:00:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 21939 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 48EA820299 for ; Mon, 2 Dec 2013 18:00:33 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id i4sf43743670oah.10 for ; Mon, 02 Dec 2013 10:00:32 -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=U7V/MsCzO1dIRONU3p0CJgq/dIsNAu/qilAzljgdL2Q=; b=Ff3JLHglnf3hFYkmJHUMPjcR1Cmgh4Dr9zgoyZnI/frt7i+kkfyn1wfygSZ2+bKPR4 r48BH3hkZ0h6PdWOKZILZ2WIS1v9N4I9Tnu3pDu8b0Vzg7fKyk8omGqU0fW9ZpDKmaSj 2xefam/alH9kioQ6uliwYLLApIZTKAj1fU9A4+jeagETk0qar1jWB5YFzUVIo7ja5V1p r1/2q6v/hVm/Bm41KD2pBokmdb5I0RWSGM71r9aTCTNWOKzcVFlutWqkAgYhc1ww1p05 aItNje19MZ+G8flLZ7jjuyX0VgMy803SWRrvXDePGvFDc+tmjzxILqxCkNFcxtX2fK9F hcmA== X-Gm-Message-State: ALoCoQlSeIJ72up9budECpgBjTorC53wNCKVU+ndwP1ZHjBPsUIDYpzUPy4EMqYmjWv3UiHljGDm X-Received: by 10.42.100.13 with SMTP id y13mr1099733icn.32.1386007232690; Mon, 02 Dec 2013 10:00:32 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.25.196 with SMTP id e4ls4831061qeg.6.gmail; Mon, 02 Dec 2013 10:00:32 -0800 (PST) X-Received: by 10.58.75.164 with SMTP id d4mr525184vew.53.1386007232573; Mon, 02 Dec 2013 10:00:32 -0800 (PST) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by mx.google.com with ESMTPS id gq10si29898642vdc.108.2013.12.02.10.00.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Dec 2013 10:00:32 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.46 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.46; Received: by mail-vb0-f46.google.com with SMTP id i12so8604042vbh.5 for ; Mon, 02 Dec 2013 10:00:32 -0800 (PST) X-Received: by 10.58.188.42 with SMTP id fx10mr526167vec.51.1386007232498; Mon, 02 Dec 2013 10:00:32 -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.220.174.196 with SMTP id u4csp143009vcz; Mon, 2 Dec 2013 10:00:32 -0800 (PST) X-Received: by 10.42.147.66 with SMTP id m2mr2810686icv.59.1386007231409; Mon, 02 Dec 2013 10:00:31 -0800 (PST) Received: from mail-ie0-f177.google.com (mail-ie0-f177.google.com [209.85.223.177]) by mx.google.com with ESMTPS id b14si37713976igm.65.2013.12.02.10.00.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Dec 2013 10:00:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.223.177 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.223.177; Received: by mail-ie0-f177.google.com with SMTP id tp5so21438002ieb.36 for ; Mon, 02 Dec 2013 10:00:31 -0800 (PST) X-Received: by 10.43.172.4 with SMTP id nw4mr42840035icc.25.1386007231154; Mon, 02 Dec 2013 10:00:31 -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 p5sm67718324igj.10.2013.12.02.10.00.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Dec 2013 10:00:30 -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, Lee Jones , alsa-devel@alsa-project.org Subject: [PATCH 2/3] ASoC: ux500_pcm: Differentiate between pdata and DT initialisation Date: Mon, 2 Dec 2013 18:00:21 +0000 Message-Id: <1386007222-10081-2-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386007222-10081-1-git-send-email-lee.jones@linaro.org> References: <1386007222-10081-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.212.46 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. We also require slightly different flags to inform the core that we are booting with DT. Cc: alsa-devel@alsa-project.org Acked-by: Linus Walleij Signed-off-by: Lee Jones --- sound/soc/ux500/ux500_pcm.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c index 2f1bdb7..00cdd7b 100644 --- a/sound/soc/ux500/ux500_pcm.c +++ b/sound/soc/ux500/ux500_pcm.c @@ -134,15 +134,31 @@ 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 = { + .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; + unsigned int pcm_flags; 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; + + pcm_flags = SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | + SND_DMAENGINE_PCM_FLAG_COMPAT; + } else { + pcm_config = &ux500_dmaengine_pcm_config; + + pcm_flags = SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | + SND_DMAENGINE_PCM_FLAG_NO_DT | + SND_DMAENGINE_PCM_FLAG_COMPAT; + } + + ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config, pcm_flags); if (ret < 0) { dev_err(&pdev->dev, "%s: ERROR: Failed to register platform '%s' (%d)!\n",