From patchwork Thu Mar 7 12:43:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastien Guiriec X-Patchwork-Id: 2231431 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0E3573FCF6 for ; Thu, 7 Mar 2013 12:44:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755895Ab3CGMoT (ORCPT ); Thu, 7 Mar 2013 07:44:19 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:52384 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754827Ab3CGMoS (ORCPT ); Thu, 7 Mar 2013 07:44:18 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r27Ci4Kn013844; Thu, 7 Mar 2013 06:44:04 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r27Ci4kc002759; Thu, 7 Mar 2013 06:44:04 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Thu, 7 Mar 2013 06:44:04 -0600 Received: from unb0919150.emea.dhcp.ti.com (unb0919150.emea.dhcp.ti.com [137.167.110.144]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r27ChstT028567; Thu, 7 Mar 2013 06:44:02 -0600 From: Sebastien Guiriec To: Sebastien Guiriec , Peter Ujfalusi , Liam Girdwood , Mark Brown , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Jarkko Nikula , Tony Lindgren CC: , Subject: [PATCH 4/5] ASoC: omap-mcbsp:Update driver for DMA DT binding. Date: Thu, 7 Mar 2013 13:43:23 +0100 Message-ID: <1362660204-27074-5-git-send-email-s-guiriec@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362660204-27074-1-git-send-email-s-guiriec@ti.com> References: <1362660204-27074-1-git-send-email-s-guiriec@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Update the driver in order to use OMAP DMA DT binding instead of hwmod data for DT boot. Signed-off-by: Sebastien Guiriec --- sound/soc/omap/mcbsp.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c index 285c836..16936493 100644 --- a/sound/soc/omap/mcbsp.c +++ b/sound/soc/omap/mcbsp.c @@ -1012,24 +1012,30 @@ int omap_mcbsp_init(struct platform_device *pdev) } } - res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); - if (!res) { - dev_err(&pdev->dev, "invalid rx DMA channel\n"); - return -ENODEV; + if (!pdev->dev.of_node) { + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); + if (!res) { + dev_err(&pdev->dev, "invalid rx DMA channel\n"); + return -ENODEV; + } + mcbsp->dma_data[1].dma_req = res->start; } /* RX DMA request number, and port address configuration */ mcbsp->dma_data[1].name = "Audio Capture"; - mcbsp->dma_data[1].dma_req = res->start; + mcbsp->dma_data[1].dma_name = "rx"; mcbsp->dma_data[1].port_addr = omap_mcbsp_dma_reg_params(mcbsp, 1); - res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); - if (!res) { - dev_err(&pdev->dev, "invalid tx DMA channel\n"); - return -ENODEV; + if (!pdev->dev.of_node) { + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); + if (!res) { + dev_err(&pdev->dev, "invalid tx DMA channel\n"); + return -ENODEV; + } + mcbsp->dma_data[0].dma_req = res->start; } /* TX DMA request number, and port address configuration */ mcbsp->dma_data[0].name = "Audio Playback"; - mcbsp->dma_data[0].dma_req = res->start; + mcbsp->dma_data[0].dma_name = "tx"; mcbsp->dma_data[0].port_addr = omap_mcbsp_dma_reg_params(mcbsp, 0); mcbsp->fclk = clk_get(&pdev->dev, "fck");