From patchwork Thu Jan 24 11:00:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 2030771 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 2CE72DF264 for ; Thu, 24 Jan 2013 11:03:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TyKXz-0004xl-MW; Thu, 24 Jan 2013 11:00:43 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TyKXv-0004xD-9F for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2013 11:00:41 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MH40067UMKJ6HU0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2013 20:00:32 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.51]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id EC.53.03880.05411015; Thu, 24 Jan 2013 20:00:32 +0900 (KST) X-AuditID: cbfee61b-b7fb06d000000f28-07-510114506cfd Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 6C.53.03880.05411015; Thu, 24 Jan 2013 20:00:32 +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 <0MH400064MKVLE30@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 24 Jan 2013 20:00:32 +0900 (KST) From: Sangsu Park To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] ARM: EXYNOS: Add clocks for EXYNOS I2S and PCM I/F Date: Thu, 24 Jan 2013 20:00:33 +0900 Message-id: <013e01cdfa22$07fa03f0$17ee0bd0$@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac36IYPxxamZgLSYR3Kkwhhdo8edHA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMIsWRmVeSWpSXmKPExsVy+t8zY90AEcZAgwttfBabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugSuj4fUR5oKN4hV7e10aGG8KdzFyckgImEh82LiaEcIWk7hwbz0b iC0ksIxR4sE/d5ian9MOsnQxcgHFpzNKnLh0gRnCWc4k8fXuW7BuNgFdiQPr5gBVcXCICHhL LL+mCBJmFqiR6JjTBVYiLOAs8Wn7GUaQEhYBVYmlC1RBwrwClhKNdzeyQ9iCEj8m32OBaNWS WL/zOBOELS+xec1bZoh7FCR2nH0NNlJEQE9i97MPbBA1IhL7XrxjBDlNQqCdXeLesx6woSwC AhLfJh8CO01CQFZi0wGoOZISB1fcYJnAKDYLyepZSFbPQrJ6FpIVCxhZVjGKphYkFxQnpeca 6RUn5haX5qXrJefnbmKERIn0DsZVDRaHGAU4GJV4eCvUGQKFWBPLiitzDzFKcDArifCuZ2EM FOJNSaysSi3Kjy8qzUktPsSYDHTsRGYp0eR8YATnlcQbGhubmJmYmphbmpqbkiasJM7LeOpJ gJBAemJJanZqakFqEcwWJg5OqQbGerXnLdf2P++8vduq59hXka2b4sxjvRcVflB5U2V0kffc +5Rblm+fFOxiFEqfO++dHp+Yvdg8WR4j06fx/zvjzHqC5fxWmsQ16c5pmVT3Zfa3Fqudvk1t LIfWu2ltfGuZVv3A6a4OW4Kc6r/92z/9Pa/F2OfVL5nJZvFt/q7tb0KuqnxgPX9FiaU4I9FQ i7moOBEAhlnj89YCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrMIsWRmVeSWpSXmKPExsVy+t9jQd0AEcZAg3mv2S02Pb7G6sDosXlJ fQBjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYR1jRsPrI8wFG8Ur9va6NDDe FO5i5OSQEDCR+DntIAuELSZx4d56ti5GLg4hgemMEicuXWCGcJYzSXy9+5YRpIpNQFfiwLo5 QB0cHCIC3hLLrymChJkFaiQ65nSBlQgLOEt82n6GEaSERUBVYukCVZAwr4ClROPdjewQtqDE j8n3WCBatSTW7zzOBGHLS2xe85YZ4h4FiR1nX4ONFBHQk9j97AMbRI2IxL4X7xgnMArMQjJq FpJRs5CMmoWkZQEjyypG0dSC5ILipPRcI73ixNzi0rx0veT83E2M4Ch8Jr2DcVWDxSFGAQ5G JR7eCnWGQCHWxLLiytxDjBIczEoivOtZGAOFeFMSK6tSi/Lji0pzUosPMSYDPTqRWUo0OR+Y IPJK4g2NTcyMLI3MLIxMzM1JE1YS52U89SRASCA9sSQ1OzW1ILUIZgsTB6dUA2PT720XpQw3 ftuTufzDufrynmmvj++c/UDWoMFnYudOP9cXuTJhIUfnqP7vrrnl6BVjs5Ft0ddiNrdddenF Fz0ZcvYWrHvLbXGspGDnkkTt5NmHzf4WuzMIp9tH7Ysq93/vlSt8S/ZasNiEC9wB81f5rHhr ImxlIvfU5KOYmfSBjzue/89j8VZiKc5INNRiLipOBAC++8QhBgMAAA== 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-20130124_060039_646134_69C8928A X-CRM114-Status: GOOD ( 15.85 ) 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.25 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,