From patchwork Wed Dec 19 05:35:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 1894561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 80E9ADF230 for ; Wed, 19 Dec 2012 05:38:28 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TlCJa-0001hA-EQ; Wed, 19 Dec 2012 05:35:34 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TlCJE-0001e5-Fx for linux-arm-kernel@lists.infradead.org; Wed, 19 Dec 2012 05:35:14 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MF900LXEJI7PBJ0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 19 Dec 2012 14:35:07 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.123]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 54.EE.01231.B0251D05; Wed, 19 Dec 2012 14:35:07 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-ba-50d1520bd6c2 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id D3.EE.01231.B0251D05; Wed, 19 Dec 2012 14:35:07 +0900 (KST) Received: from padma-linuxpc.sisodomain.com ([107.108.83.35]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MF900KQQJI8CS20@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 19 Dec 2012 14:35:07 +0900 (KST) From: Padmavathi Venna To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, padma.kvr@gmail.com Subject: [PATCH 2/5] ARM: S5PC100: Add I2S clkdev support Date: Wed, 19 Dec 2012 11:05:50 +0530 Message-id: <1355895353-10316-3-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1355895353-10316-1-git-send-email-padma.v@samsung.com> References: <1355895353-10316-1-git-send-email-padma.v@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsWyRsSkWpc76GKAwYvnhhabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugStjz4GFzAWr5Sp+bexja2CcI9HFyMkhIWAi0bJjAjuELSZx4d56 ti5GLg4hgaWMEptmL2SBKXq67D5UYhGjxJm3l1ghnK1MEo+WPGfuYuTgYBPQkWg56wLSICKQ JPF8US8TiM0sUCfxtXUZG4gtLGApcfP1MrBtLAKqEkvv/WIGsXkFnCV61y+DWqYgcWzqV1YQ m1PARWLe3S6wuBBQzdR7u5kgegUkvk0+xAKyVkJAVmLTAWaQcyQELrNJbO3rY4OYIylxcMUN lgmMwgsYGVYxiqYWJBcUJ6XnGuoVJ+YWl+al6yXn525iBIbg6X/PpHYwrmywOMQowMGoxMNb sOpCgBBrYllxZe4hRgkOZiURXl7ViwFCvCmJlVWpRfnxRaU5qcWHGH2ALpnILCWanA+Mj7yS eENjE3NTY1NLIyMzU1McwkrivM0eKQFCAumJJanZqakFqUUw45g4OKUaGI+LRbRrMJlf4XH/ HHWDa6X700tmdwu9fWuWNQrPkFAoU3bJk5177YXRHbtbmwMlKlKkP52Z7ixwSWF2oHrT7Q/O Os3xLK8iU35e22TzQeBP0WYuhZrgl2U3c/uPMLDf3vWQqdLqyUSWqOs/yuP7S6J4j+5+Zru4 WCP62p8CBRHee6JvZoSaKrEUZyQaajEXFScCAEiqj/luAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupikeLIzCtJLcpLzFFi42I5/e+xgC530MUAg+MzVCw2Pb7G6sDosXlJ fQBjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYQ1jxp4DC5kLVstV/NrYx9bA OEeii5GTQ0LAROLpsvtsELaYxIV764FsLg4hgUWMEmfeXmKFcLYySTxa8py5i5GDg01AR6Ll rAtIg4hAksTzRb1MIDazQJ3E19ZlYIOEBSwlbr5exg5iswioSiy994sZxOYVcJboXb+MBWKZ gsSxqV9ZQWxOAReJeXe7wOJCQDVT7+1mmsDIu4CRYRWjaGpBckFxUnquoV5xYm5xaV66XnJ+ 7iZGcIA/k9rBuLLB4hCjAAejEg9vwaoLAUKsiWXFlbmHGCU4mJVEeHlVLwYI8aYkVlalFuXH F5XmpBYfYvQBumois5Rocj4w+vJK4g2NTcxNjU0tTSxMzCxxCCuJ8zZ7pAQICaQnlqRmp6YW pBbBjGPi4JRqYOysTJCNXhy7Ulab2ZrNjbvyptDTlc6i67cofVwdfSV0y2ap/OO/dWqZtLx2 lr29rfXoqJqqV9uPuPutnwIUL2lqf65rni3RFZY4XaRuRm1FnPqD4Da29AWMmpyZz81eLf8g 7hJiUmSqvVPu2mqBCKmQNT9LXtSEvSqLCU7p9vSafUevxsVSiaU4I9FQi7moOBEAzyG2M50C AAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121219_003512_842806_5F5BBDD4 X-CRM114-Status: GOOD ( 13.02 ) 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: sbkim73@samsung.com, kgene.kim@samsung.com, broonie@opensource.wolfsonmicro.com, jhbird.choi@samsung.com, olof@lixom.net 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 I2S controller has an internal mux for RCLK source clk. The list of source clk names were passed through platform data in non-dt case. Register the existing RCLK source clocks with clkdev using generic connection id. This is required as part of adding DT support for I2S controller driver. Signed-off-by: Padmavathi Venna Acked-by: Sangbeom Kim --- arch/arm/mach-s5pc100/clock.c | 48 +++++++++++++++++++++++-------------- arch/arm/mach-s5pc100/dev-audio.c | 16 ------------ 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/arch/arm/mach-s5pc100/clock.c b/arch/arm/mach-s5pc100/clock.c index 9262197..a206dc3 100644 --- a/arch/arm/mach-s5pc100/clock.c +++ b/arch/arm/mach-s5pc100/clock.c @@ -606,24 +606,6 @@ static struct clk init_clocks_off[] = { .enable = s5pc100_d1_4_ctrl, .ctrlbit = (1 << 13), }, { - .name = "iis", - .devname = "samsung-i2s.0", - .parent = &clk_div_pclkd1.clk, - .enable = s5pc100_d1_5_ctrl, - .ctrlbit = (1 << 0), - }, { - .name = "iis", - .devname = "samsung-i2s.1", - .parent = &clk_div_pclkd1.clk, - .enable = s5pc100_d1_5_ctrl, - .ctrlbit = (1 << 1), - }, { - .name = "iis", - .devname = "samsung-i2s.2", - .parent = &clk_div_pclkd1.clk, - .enable = s5pc100_d1_5_ctrl, - .ctrlbit = (1 << 2), - }, { .name = "ac97", .parent = &clk_div_pclkd1.clk, .enable = s5pc100_d1_5_ctrl, @@ -724,6 +706,30 @@ static struct clk clk_48m_spi2 = { .ctrlbit = (1 << 9), }; +static struct clk clk_i2s0 = { + .name = "iis", + .devname = "samsung-i2s.0", + .parent = &clk_div_pclkd1.clk, + .enable = s5pc100_d1_5_ctrl, + .ctrlbit = (1 << 0), +}; + +static struct clk clk_i2s1 = { + .name = "iis", + .devname = "samsung-i2s.1", + .parent = &clk_div_pclkd1.clk, + .enable = s5pc100_d1_5_ctrl, + .ctrlbit = (1 << 1), +}; + +static struct clk clk_i2s2 = { + .name = "iis", + .devname = "samsung-i2s.2", + .parent = &clk_div_pclkd1.clk, + .enable = s5pc100_d1_5_ctrl, + .ctrlbit = (1 << 2), +}; + static struct clk clk_vclk54m = { .name = "vclk_54m", .rate = 54000000, @@ -1154,6 +1160,9 @@ static struct clk *clk_cdev[] = { &clk_48m_spi0, &clk_48m_spi1, &clk_48m_spi2, + &clk_i2s0, + &clk_i2s1, + &clk_i2s2, }; static struct clksrc_clk *clksrc_cdev[] = { @@ -1321,6 +1330,9 @@ static struct clk_lookup s5pc100_clk_lookup[] = { CLKDEV_INIT("s5pc100-spi.1", "spi_busclk2", &clk_sclk_spi1.clk), CLKDEV_INIT("s5pc100-spi.2", "spi_busclk1", &clk_48m_spi2), CLKDEV_INIT("s5pc100-spi.2", "spi_busclk2", &clk_sclk_spi2.clk), + CLKDEV_INIT("samsung-i2s.0", "i2s_opclk0", &clk_i2s0), + CLKDEV_INIT("samsung-i2s.1", "i2s_opclk0", &clk_i2s1), + CLKDEV_INIT("samsung-i2s.2", "i2s_opclk0", &clk_i2s2), }; void __init s5pc100_register_clocks(void) diff --git a/arch/arm/mach-s5pc100/dev-audio.c b/arch/arm/mach-s5pc100/dev-audio.c index 1cc252c..46f488b 100644 --- a/arch/arm/mach-s5pc100/dev-audio.c +++ b/arch/arm/mach-s5pc100/dev-audio.c @@ -39,18 +39,12 @@ static int s5pc100_cfg_i2s(struct platform_device *pdev) return 0; } -static const char *rclksrc_v5[] = { - [0] = "iis", - [1] = "i2sclkd2", -}; - static struct s3c_audio_pdata i2sv5_pdata = { .cfg_gpio = s5pc100_cfg_i2s, .type = { .i2s = { .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR, - .src_clk = rclksrc_v5, }, }, }; @@ -72,18 +66,8 @@ struct platform_device s5pc100_device_iis0 = { }, }; -static const char *rclksrc_v3[] = { - [0] = "iis", - [1] = "sclk_audio", -}; - static struct s3c_audio_pdata i2sv3_pdata = { .cfg_gpio = s5pc100_cfg_i2s, - .type = { - .i2s = { - .src_clk = rclksrc_v3, - }, - }, }; static struct resource s5pc100_iis1_resource[] = {