From patchwork Wed Feb 6 05:21:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 2101761 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 2F8DC3FDF1 for ; Wed, 6 Feb 2013 05:24:26 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U2xRZ-00036K-7R; Wed, 06 Feb 2013 05:21:13 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U2xRT-000352-CE for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2013 05:21:10 +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 <0MHS00MY29IR9CI0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2013 14:21:03 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.49]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 5D.4D.03880.F38E1115; Wed, 06 Feb 2013 14:21:03 +0900 (KST) X-AuditID: cbfee61b-b7fb06d000000f28-21-5111e83f6b52 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 2C.4D.03880.E38E1115; Wed, 06 Feb 2013 14:21:02 +0900 (KST) Received: from DOSANGSU4UP02 ([12.23.118.226]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MHS00GWI9J2VZ80@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 06 Feb 2013 14:21:02 +0900 (KST) From: Sangsu Park To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [RESEND][PATCH] ARM: EXYNOS: Add clocks for EXYNOS I2S and PCM I/F Date: Wed, 06 Feb 2013 14:21:02 +0900 Message-id: <003201ce0429$c15e8350$441b89f0$@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac4EKZ19LI4ykezqT267HBZCA5KQ2Q== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsVy+t8zQ137F4KBBk8uGFlsenyN1YHRY/OS +gDGKC6blNSczLLUIn27BK6M/qapjAWbxSv29ro0MN4U7mLk4JAQMJFYvciri5ETyBSTuHBv PVsXIxeHkMAyRol1t5pYIBImEq975zNBJKYzStw4/x7KWc4k8W7hb3aQKjYBXYkD6+awgEwV EfCWWH5NESTMLFAj0TGnixHEFgYKT525hwnEZhFQlTh56xsziM0rYClxdy/EMl4BQYkfk++x QPRqSazfeZwJwpaX2LzmLTPEQQoSO86+BpspIqAn0X38PDNEjYjEvhfvGCFqmtklnvyvgNgl IPFt8iEWiIdlJTYdgBojKXFwxQ2WCYxis5BsnoVk8ywkm2ch2bCAkWUVo2hqQXJBcVJ6rpFe cWJucWleul5yfu4mRkiUSO9gXNVgcYhRgINRiYf3hp5goBBrYllxZe4hRgkOZiURXoVtQCHe lMTKqtSi/Pii0pzU4kOMyUDHTmSWEk3OB0ZwXkm8obGxiZmJqYm5pam5KWnCSuK8jKeeBAgJ pCeWpGanphakFsFsYeLglGpgdKlJ1X3/5aaGelpbQNjt4xWPt79et9n7n5Eh4/zTHFeu64sY lrKV30jdv07yc/Ajb2+25DLn/n9aiu4b5u3i3ZjGwpo6q2Kr6/xpuRZnWOc6fbpf4nr7ywG5 5kkBkxc6GDzVeaxgHpox08LvifzT7xu8Wu4vKeHfJH1Rsstl49YnxxR21xbdV2Ipzkg01GIu Kk4EAJfo4lrWAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCIsWRmVeSWpSXmKPExsVy+t9jQV27F4KBBnOX6lpsenyN1YHRY/OS +gDGqAZGm4zUxJTUIoXUvOT8lMy8dFsl7+B453hTMwNDXUNLC3MlhbzE3FRbJRefAF23zByg qUoKZYk5pUChgMTiYiV9O0wTQkPcdC1gGiN0fUOC4HqMDNBAwjrGjP6mqYwFm8Ur9va6NDDe FO5i5OSQEDCReN07nwnCFpO4cG89WxcjF4eQwHRGiRvn3zNBOMuZJN4t/M0OUsUmoCtxYN0c li5GDg4RAW+J5dcUQcLMAjUSHXO6GEFsYaDw1Jl7wIayCKhKnLz1jRnE5hWwlLi7t4kFwhaU +DH5HgtEr5bE+p3HmSBseYnNa94yQxykILHj7GuwmSICehLdx88zQ9SISOx78Y5xAqPALCSj ZiEZNQvJqFlIWhYwsqxiFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECI7DZ9I7GFc1WBxiFOBg VOLhvaEnGCjEmlhWXJl7iFGCg1lJhFdhG1CINyWxsiq1KD++qDQntfgQYzLQpxOZpUST84Ep Iq8k3tDYxMzI0sjMwsjE3Jw0YSVxXsZTTwKEBNITS1KzU1MLUotgtjBxcEo1MCpuK7bjt1vr XybuNut11md9XYZDAREMz9IT84tn5Oz6dWvfF5Nt6TqSqhIN+UsEm/Q7+uL3dyrvO1/yrLI5 P+T3lf2OjwN2sYjIG+2QuBHo/tswaULhvfdmM1Ktr2xmP/j4znI7j72nj2qdnfCwrvzMmhur k38YZhgZ3Ds9ZV8v41ypnmlKtkosxRmJhlrMRcWJAL3ZI8cHAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130206_002107_707892_04DD0C8E X-CRM114-Status: GOOD ( 15.22 ) 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] 0.0 T_MANY_HDRS_LCASE Odd capitalization of multiple message headers Cc: sbkim73@samsung.com, Kukjin Kim , ben-linux@fluff.org, Tushar Behera 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: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Audio Subsystem has own clocks for I2S0 and PCM0 in all EXYNOS series. This patch add clocks for I2S0 and PCM0 I/F. Signed-off-by: Sangsu Park --- arch/arm/mach-exynos/Makefile | 1 + arch/arm/mach-exynos/clock-audss.c | 64 ++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-exynos/clock-audss.c ARRAY_SIZE(exynos_init_audss_clocks)); + s3c_disable_clocks(exynos_init_audss_clocks, ARRAY_SIZE(exynos_init_audss_clocks)); +} diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile index 7e53a3a..5b6c7c0 100644 --- a/arch/arm/mach-exynos/Makefile +++ b/arch/arm/mach-exynos/Makefile @@ -13,6 +13,7 @@ obj- := # Core obj-$(CONFIG_ARCH_EXYNOS) += common.o +obj-$(CONFIG_ARCH_EXYNOS) += clock-audss.o obj-$(CONFIG_ARCH_EXYNOS4) += clock-exynos4.o obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o diff --git a/arch/arm/mach-exynos/clock-audss.c b/arch/arm/mach-exynos/clock-audss.c new file mode 100644 index 0000000..8260185 --- /dev/null +++ b/arch/arm/mach-exynos/clock-audss.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2013 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Clock support for EXYNOS Audio Subsystem + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include + +#include +#include + +#define EXYNOS_PA_AUDSS (0x03810000) + +/* IP Clock Gate 0 Registers */ +#define EXYNOS_AUDSS_CLKGATE_I2SBUS (1<<2) +#define EXYNOS_AUDSS_CLKGATE_I2SSPECIAL (1<<3) +#define EXYNOS_AUDSS_CLKGATE_PCMBUS (1<<4) +#define EXYNOS_AUDSS_CLKGATE_PCMSPECIAL (1<<5) +#define EXYNOS_AUDSS_CLKGATE_GPIO (1<<6) + +static void __iomem *clk_audss_base = 0; + +static int exynos_clk_audss_ctrl(struct clk *clk, int enable) +{ + if (!clk_audss_base) + return ENOMEM; + + return s5p_gatectrl(clk_audss_base, clk, enable); +} + +static struct clk exynos_init_audss_clocks[] = { + { + .name = "iis", + .devname = "samsung-i2s.0", + .enable = exynos_clk_audss_ctrl, + .ctrlbit = EXYNOS_AUDSS_CLKGATE_I2SSPECIAL | EXYNOS_AUDSS_CLKGATE_I2SBUS + | EXYNOS_AUDSS_CLKGATE_GPIO, + }, { + .name = "pcm", + .devname = "samsung-pcm.0", + .enable = exynos_clk_audss_ctrl, + .ctrlbit = EXYNOS_AUDSS_CLKGATE_PCMSPECIAL | EXYNOS_AUDSS_CLKGATE_PCMBUS + | EXYNOS_AUDSS_CLKGATE_GPIO, + }, +}; + +void __init exynos_register_audss_clocks(void) +{ + clk_audss_base = ioremap(EXYNOS_PA_AUDSS, SZ_4K); + if (clk_audss_base == NULL) { + pr_err("unable to ioremap for gpio_base1\n"); + return; + } + + s3c_register_clocks(exynos_init_audss_clocks,