From patchwork Sun Apr 7 19:25:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Pargmann X-Patchwork-Id: 2403391 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 106B73FC71 for ; Sun, 7 Apr 2013 20:49:48 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UOwW6-0001yS-3t; Sun, 07 Apr 2013 20:48:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UOvFD-0007lO-55; Sun, 07 Apr 2013 19:27:15 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UOvEK-0007gF-VD for linux-arm-kernel@lists.infradead.org; Sun, 07 Apr 2013 19:26:23 +0000 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1UOvDy-00017O-QB; Sun, 07 Apr 2013 21:25:58 +0200 Received: from mpa by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1UOvDu-0001bo-8h; Sun, 07 Apr 2013 21:25:54 +0200 From: Markus Pargmann To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 06/11] ASoC: fsl-ssi: Setup generic imx dma params Date: Sun, 7 Apr 2013 21:25:16 +0200 Message-Id: <1365362721-3731-7-git-send-email-mpa@pengutronix.de> X-Mailer: git-send-email 1.8.2.rc2 In-Reply-To: <1365362721-3731-1-git-send-email-mpa@pengutronix.de> References: <1365362721-3731-1-git-send-email-mpa@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: mpa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130407_152621_379623_0B5B13C8 X-CRM114-Status: GOOD ( 13.13 ) X-Spam-Score: -4.3 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Fabio Estevam , alsa-devel@alsa-project.org, devicetree-discuss@lists.ozlabs.org, Mark Brown , Timur Tabi , Liam Girdwood , Grant Likely , Sascha Hauer , Markus Pargmann , Shawn Guo X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use device pointer as parameter for imx-pcm-dma. This allows usage of the generic DMA DT bindings. Signed-off-by: Markus Pargmann --- sound/soc/fsl/fsl_ssi.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index afb5a23..bb9a1e0 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -742,7 +742,6 @@ static int fsl_ssi_probe(struct platform_device *pdev) ssi_private->fifo_depth = 8; if (of_device_is_compatible(pdev->dev.of_node, "fsl,imx21-ssi")) { - u32 dma_events[2]; ssi_private->ssi_on_imx = true; ssi_private->clk = clk_get(&pdev->dev, NULL); @@ -765,18 +764,11 @@ static int fsl_ssi_probe(struct platform_device *pdev) ssi_private->ssi_phys + offsetof(struct ccsr_ssi, stx0); ssi_private->dma_params_rx.dma_addr = ssi_private->ssi_phys + offsetof(struct ccsr_ssi, srx0); - /* - * TODO: This is a temporary solution and should be changed - * to use generic DMA binding later when the helplers get in. - */ - ret = of_property_read_u32_array(pdev->dev.of_node, - "fsl,ssi-dma-events", dma_events, 2); - if (ret) { - dev_err(&pdev->dev, "could not get dma events\n"); - goto error_clk; - } - ssi_private->dma_params_tx.dma = dma_events[0]; - ssi_private->dma_params_rx.dma = dma_events[1]; + + ssi_private->dma_params_rx.dma_client_dev = &pdev->dev; + ssi_private->dma_params_rx.dma_req_name = "rx"; + ssi_private->dma_params_tx.dma_client_dev = &pdev->dev; + ssi_private->dma_params_tx.dma_req_name = "tx"; ssi_private->dma_params_tx.shared_peripheral = of_device_is_compatible(of_get_parent(np), @@ -887,7 +879,6 @@ error_dev: dev_set_drvdata(&pdev->dev, NULL); device_remove_file(&pdev->dev, dev_attr); -error_clk: if (ssi_private->ssi_on_imx) { clk_disable_unprepare(ssi_private->clk); clk_put(ssi_private->clk);