From patchwork Fri Nov 7 06:54:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 5250611 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 380599F39B for ; Fri, 7 Nov 2014 07:02:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 25DE720145 for ; Fri, 7 Nov 2014 07:02:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id B8720200F3 for ; Fri, 7 Nov 2014 07:02:09 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B4AFF265611; Fri, 7 Nov 2014 08:02:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 79E7926568F; Fri, 7 Nov 2014 08:01:47 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3196F2656EB; Fri, 7 Nov 2014 08:01:46 +0100 (CET) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by alsa0.perex.cz (Postfix) with ESMTP id 9CAFF2608F2 for ; Fri, 7 Nov 2014 08:01:20 +0100 (CET) Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEN009GRQ67GA40@mailout4.samsung.com> for alsa-devel@alsa-project.org; Fri, 07 Nov 2014 16:01:19 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 66.95.18484.F3E6C545; Fri, 07 Nov 2014 16:01:19 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-42-545c6e3f20fd Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 2F.32.09430.F3E6C545; Fri, 07 Nov 2014 16:01:19 +0900 (KST) Received: from chromebld-server.sisodomain.com ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NEN004U2Q4LQI20@mmp1.samsung.com>; Fri, 07 Nov 2014 16:01:19 +0900 (KST) From: Padmavathi Venna To: padma.kvr@gmail.com, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Fri, 07 Nov 2014 12:24:39 +0530 Message-id: <1415343280-18916-2-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1415343280-18916-1-git-send-email-padma.v@samsung.com> References: <1415343280-18916-1-git-send-email-padma.v@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRmVeSWpSXmKPExsWyRsSkVtc+LybEYMJWKYsrFw8xWUx9+ITN onfBVTaLTY+vsVrMOL+PyaJ92RxWi983v7NZXFzxhcmBw2PD5yY2j52z7rJ7bFrVyeaxeUm9 R9+WVYwenzfJBbBFcdmkpOZklqUW6dslcGVsefiNueCRUMXnl3UNjKv4uxg5OSQETCTOTv3D AmGLSVy4t56ti5GLQ0hgKaNE47sWJpiio9+aGCESixgltk/cygrhTGCSWHP2NlA7BwebgI5E y1kXkAYRgXqJ67/2soPYz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BotDjAIcjEo8vDd4Y0KEWBPLiitzDzFKcDArifBKBQGF eFMSK6tSi/Lji0pzUosPMZoCHTWRWUo0OR8Y73kl8YbGJuamxqaWJhYmZpZK4rwHW60DhQTS E0tSs1NTC1KLYPqYODilGhitHu+eeYfVx/CE2s/swr8nVml7e068zyPQZraY4RtD0cLJlkda 5M0XeR/cfdJv1sSMHu43j7Tzr09/7HD3tEyWXZVWiLOTcHRu0w77o+q80Z+U3Za4TTz8f/r5 9dHrXc+KP9qj4zPjo67gQdPNL6fWlD3Yw7ng36dP55JCX6QqMt308ex690pHiaU4I9FQi7mo OBEAWMsgpb8CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: sbkim73@samsung.com, kgene.kim@samsung.com, broonie@kernel.org, Padmavathi Venna Subject: [alsa-devel] [PATCH 1/2] ASoC: Samsung: Add quirk for internal DMA X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Internal DMA is available only on some of Samsung platforms. So added a quirk for the same and made it optional. Signed-off-by: Padmavathi Venna --- include/linux/platform_data/asoc-s3c.h | 1 + sound/soc/samsung/i2s.c | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/linux/platform_data/asoc-s3c.h b/include/linux/platform_data/asoc-s3c.h index a6591c6..5e0bc77 100644 --- a/include/linux/platform_data/asoc-s3c.h +++ b/include/linux/platform_data/asoc-s3c.h @@ -27,6 +27,7 @@ struct samsung_i2s { #define QUIRK_NO_MUXPSR (1 << 2) #define QUIRK_NEED_RSTCLR (1 << 3) #define QUIRK_SUPPORTS_TDM (1 << 4) +#define QUIRK_SUPPORTS_IDMA (1 << 5) /* Quirks of the I2S controller */ u32 quirks; dma_addr_t idma_addr; diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 9d51347..38b9a52 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -987,7 +987,7 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai) if (i2s->quirks & QUIRK_NEED_RSTCLR) writel(CON_RSTCLR, i2s->addr + I2SCON); - if (i2s->quirks & QUIRK_SEC_DAI) + if (i2s->quirks & QUIRK_SUPPORTS_IDMA) idma_reg_addr_init(i2s->addr, i2s->sec_dai->idma_playback.dma_addr); @@ -1199,10 +1199,9 @@ static int samsung_i2s_probe(struct platform_device *pdev) quirks = i2s_dai_data->quirks; if (of_property_read_u32(np, "samsung,idma-addr", &idma_addr)) { - if (quirks & QUIRK_SEC_DAI) { - dev_err(&pdev->dev, "idma address is not"\ + if (quirks & QUIRK_SUPPORTS_IDMA) { + dev_info(&pdev->dev, "idma address is not"\ "specified"); - return -EINVAL; } } } @@ -1309,13 +1308,14 @@ static const struct samsung_i2s_dai_data i2sv3_dai_type = { static const struct samsung_i2s_dai_data i2sv5_dai_type = { .dai_type = TYPE_PRI, - .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR, + .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR | + QUIRK_SUPPORTS_IDMA, }; static const struct samsung_i2s_dai_data i2sv6_dai_type = { .dai_type = TYPE_PRI, .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR | - QUIRK_SUPPORTS_TDM, + QUIRK_SUPPORTS_TDM | QUIRK_SUPPORTS_IDMA, }; static const struct samsung_i2s_dai_data samsung_dai_type_pri = {