From patchwork Wed Nov 28 10:47:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 1815491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id DD4BD3FC54 for ; Wed, 28 Nov 2012 10:47:47 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tdf8H-0007Tt-7b; Wed, 28 Nov 2012 10:44:45 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tdf81-0007S5-DL for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2012 10:44:31 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ME7005O11SY8P11@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2012 19:44:19 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.124]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id EB.D2.12699.30BE5B05; Wed, 28 Nov 2012 19:44:19 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-77-50b5eb037c9a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id FA.D2.12699.30BE5B05; Wed, 28 Nov 2012 19:44:19 +0900 (KST) Received: from padma-linuxpc.sisodomain.com ([107.108.83.35]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0ME7009NS1TF0550@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 28 Nov 2012 19:44:19 +0900 (KST) From: Padmavathi Venna To: padma.kvr@gmail.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, alsa-devel@alsa-project.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH V4 1/2] ASoC: Samsung: Get I2S src_clk from clock alias id. Date: Wed, 28 Nov 2012 16:17:48 +0530 Message-id: <1354099669-1735-2-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1354099669-1735-1-git-send-email-padma.v@samsung.com> References: <1354099669-1735-1-git-send-email-padma.v@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLLMWRmVeSWpSXmKPExsWyRsSkRpf59dYAg3/H5S02Pb7G6sDosXlJ fQBjFJdNSmpOZllqkb5dAlfG3EmnmAomi1bMOvGAsYFxsmAXIyeHhICJxMvNT9ghbDGJC/fW s3UxcnEICSxllNi1ZiYzTNHbOzNYIRLTGSX+3f3CAuFsZZL4O+8iUIaDg01AR6LlrAtIXERg GaPEsj2nGEEcZoEJQKMu32YCGSUs4C3x5eBNVhCbRUBVYtLfU2C7eQWcJBp274G6Q0Hi2NSv YDWcAs4Sj/cuZgGxhYBqJj9fD9UrIPFt8iEWkMUSArISmw4wg+ySELjOJrHn/G9WiDmSEgdX 3GCZwCi8gJFhFaNoakFyQXFSeq6RXnFibnFpXrpecn7uJkZgGJ7+90x6B+OqBotDjAIcjEo8 vA6OWwOEWBPLiitzDzFKcDArifAyPwIK8aYkVlalFuXHF5XmpBYfYvQBumQis5Rocj4wRvJK 4g2NTcxNjU0tjYzMTE1xCCuJ8zZ7pAQICaQnlqRmp6YWpBbBjGPi4JRqYFxbcppLQNLii+TR SU8fp1aFWHYHLp/x2FTF3Gq2uOW7LdePL0o5ZTz5kGlsvMWuGaof/TSWa07uWXbmRvWdk433 YkUPsyl428seV02N2/yQ9X6Hu2djisQ7g7UyKlYR944qdT9rMFaJ4TC02S+5f3v/P1Pj8kcb 3LtE3aSnTxLI8vZt+DqpVImlOCPRUIu5qDgRADkLXuNwAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e+xoC7z660BBk03hSw2Pb7G6sDosXlJ fQBjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYQ1jxtxJp5gKJotWzDrxgLGB cbJgFyMnh4SAicTbOzNYIWwxiQv31rN1MXJxCAlMZ5T4d/cLC4SzlUni77yLQFUcHGwCOhIt Z11A4iICyxgllu05xQjiMAtMYJTYdfk2E8goYQFviS8Hb4KNZRFQlZj09xQ7iM0r4CTRsHsP O8Q6BYljU7+C1XAKOEs83ruYBcQWAqqZ/Hw96wRG3gWMDKsYRVMLkguKk9JzjfSKE3OLS/PS 9ZLzczcxgoP8mfQOxlUNFocYBTgYlXh4HRy3BgixJpYVV+YeYpTgYFYS4WV+BBTiTUmsrEot yo8vKs1JLT7E6AN01URmKdHkfGAE5pXEGxqbmJsam1qaWJiYWeIQVhLnbfZICRASSE8sSc1O TS1ILYIZx8TBKdXAOF/wT+Jm6+ZXeye8b7vvGRgVZyRYpqPsbqbMd1bfgEl5+w++krA4g9J9 6eyz5P8r2f6TcA766DD1w0zBjB/XZi3lmJSvllRvVSp3qFW4OcFM4jeb+nXPQA0R5lLtWenT X21Zk7DtqYbU7j5B0w1378VtSTfR3C6x/wTbPHPBCLHIDXyLZj5WYinOSDTUYi4qTgQAcb6A jZ8CAAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121128_054429_748475_B344F505 X-CRM114-Status: GOOD ( 10.76 ) X-Spam-Score: -7.6 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.33 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 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: kgene.kim@samsung.com, sbkim73@samsung.com, jassisinghbrar@gmail.com, ben-linux@fluff.org, broonie@opensource.wolfsonmicro.com, lrg@ti.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org As the I2S src clks are registered with clkdev using generic connection id, driver can get the clk name using generic id. So the variable representing the array of rclk src clks is deleted. Signed-off-by: Padmavathi Venna --- include/linux/platform_data/asoc-s3c.h | 6 ------ sound/soc/samsung/i2s.c | 12 ++++++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/include/linux/platform_data/asoc-s3c.h b/include/linux/platform_data/asoc-s3c.h index aa9875f..8827259 100644 --- a/include/linux/platform_data/asoc-s3c.h +++ b/include/linux/platform_data/asoc-s3c.h @@ -38,12 +38,6 @@ struct samsung_i2s { #define QUIRK_NEED_RSTCLR (1 << 3) /* Quirks of the I2S controller */ u32 quirks; - - /* - * Array of clock names that can be used to generate I2S signals. - * Also corresponds to clocks of I2SMOD[10] - */ - const char **src_clk; dma_addr_t idma_addr; }; diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 547b919..aaf57b7 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -49,8 +49,6 @@ struct i2s_dai { struct clk *clk; /* Clock for generating I2S signals */ struct clk *op_clk; - /* Array of clock names for op_clk */ - const char **src_clk; /* Pointer to the Primary_Fifo if this is Sec_Fifo, NULL otherwise */ struct i2s_dai *pri_dai; /* Pointer to the Secondary_Fifo if it has one, NULL otherwise */ @@ -432,8 +430,12 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai, } } - i2s->op_clk = clk_get(&i2s->pdev->dev, - i2s->src_clk[clk_id]); + if (clk_id) + i2s->op_clk = clk_get(&i2s->pdev->dev, + "i2s_opclk1"); + else + i2s->op_clk = clk_get(&i2s->pdev->dev, + "i2s_opclk0"); clk_prepare_enable(i2s->op_clk); i2s->rclk_srcrate = clk_get_rate(i2s->op_clk); @@ -1067,7 +1069,6 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) (struct s3c2410_dma_client *)&pri_dai->dma_capture; pri_dai->dma_playback.channel = dma_pl_chan; pri_dai->dma_capture.channel = dma_cp_chan; - pri_dai->src_clk = i2s_cfg->src_clk; pri_dai->dma_playback.dma_size = 4; pri_dai->dma_capture.dma_size = 4; pri_dai->base = regs_base; @@ -1088,7 +1089,6 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev) (struct s3c2410_dma_client *)&sec_dai->dma_playback; /* Use iDMA always if SysDMA not provided */ sec_dai->dma_playback.channel = dma_pl_sec_chan ? : -1; - sec_dai->src_clk = i2s_cfg->src_clk; sec_dai->dma_playback.dma_size = 4; sec_dai->base = regs_base; sec_dai->quirks = quirks;