From patchwork Tue Nov 6 04:48:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmavathi Venna X-Patchwork-Id: 1702691 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 E9DC5DF2A2 for ; Tue, 6 Nov 2012 04:49:18 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVb4b-0002hA-V2; Tue, 06 Nov 2012 04:47:38 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVb4W-0002eV-BN for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2012 04:47:34 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD1002QCUN1UZ00@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2012 13:47:30 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.124]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id DF.EC.01231.06698905; Tue, 06 Nov 2012 13:47:28 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-4a-50989660666a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 0F.EC.01231.F5698905; Tue, 06 Nov 2012 13:47:28 +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 <0MD100EM1UJ3W290@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Tue, 06 Nov 2012 13:47:27 +0900 (KST) From: Padmavathi Venna To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH V3 2/5] ARM: S5PC100: Add I2S clkdev support Date: Tue, 06 Nov 2012 10:18:34 +0530 Message-id: <1352177317-16395-3-git-send-email-padma.v@samsung.com> X-Mailer: git-send-email 1.7.4.4 In-reply-to: <1352177317-16395-1-git-send-email-padma.v@samsung.com> References: <1352177317-16395-1-git-send-email-padma.v@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGLMWRmVeSWpSXmKPExsWyRsSkRjdh2owAg6btghabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugStj58zPjAV/ZSu+7pNqYPws3sXIySEhYCIx4chCJghbTOLCvfVs XYxcHEICSxklDk1rYYEpWrl4FZgtJDCdUWJnrwRE0VYmiSPfdjN3MXJwsAnoSLScdQExRQS8 JZZfUwQxmQVyJBrbVEBMYQEbiR/btECGsAioSsxbugJsK6+As0Tv5C5WiEUKEsemfgWzOQVc JNa0LYda6iwx6/hKZoheAYlvkw+xgIyUEJCV2HSAGeQWCYEzbBKvLy9khJgjKXFwxQ2WCYzC CxgZVjGKphYkFxQnpeca6hUn5haX5qXrJefnbmIEBt7pf8+kdjCubLA4xCjAwajEw7tTeEaA EGtiWXFl7iFGCQ5mJRFejjvTA4R4UxIrq1KL8uOLSnNSiw8x+gBdMpFZSjQ5HxgVeSXxhsYm 5qbGppZGRmampjiElcR5mz1SAoQE0hNLUrNTUwtSi2DGMXFwAiMls3rjtPdp3fvnWInfD/yw wmrC7i1151ZmFty6OOXst/BL2jlR879Gm23t3WWXEs/Wy9x+KFulettau7iO3HJXR+7rOr8W hf/hzPmTdo8twPOaqEfIze1CN2oqeswEKrfK+7PNPuwT4bDp68f/Nrtdc602nPjk8NbsaH5M kOfEfT7+v9RTeKOVWIozEg21mIuKEwEMXPMOaQIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeLIzCtJLcpLzFFi42I5/e+xoG7CtBkBBhumMFtsenyN1YHRY/OS +gDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwhrGjJ0zPzMW/JWt+LpPqoHx s3gXIyeHhICJxMrFq1ggbDGJC/fWs4HYQgLTGSV29kp0MXIB2VuZJI58283cxcjBwSagI9Fy 1gXEFBHwllh+TRHEZBbIkWhsUwExhQVsJH5s0wIZwiKgKjFv6QomEJtXwFmid3IXK8QiBYlj U7+C2ZwCLhJr2pazQCx1lph1fCXzBEbeBYwMqxhFUwuSC4qT0nMN9YoTc4tL89L1kvNzNzGC w/qZ1A7GlQ0WhxgFOBiVeHh3Cs8IEGJNLCuuzD3EKMHBrCTCy3FneoAQb0piZVVqUX58UWlO avEhRh+gqyYyS4km5wNjLq8k3tDYxNzU2NTSxMLEzBKHsJI4b7NHSoCQQHpiSWp2ampBahHM OCYOTmBYTr864c1pm/jTbm5hfxemiwVNTt9S6HGZV3Lhlmt/H+/0mZgrGzbji6xjmMq9+EtG M1UXL+g73n72ysK4vII3NrXrS3UqT+VND3u7MWP378qNd559SNTKKg59a8K/b8PhJw2LT95d 8fO8+bdgy78PjaLXHisKXHD9TUpHg4/N8ZLNYt26GTlTw5VYijMSDbWYi4oTAV5lvHyYAgAA X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121105_234732_728990_976BCBF4 X-CRM114-Status: GOOD ( 12.99 ) 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.34 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, olofj@google.com, ben-linux@fluff.org, padma.v@samsung.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 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 --- 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[] = {