From patchwork Fri Feb 8 09:05:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ??? X-Patchwork-Id: 2115161 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 F3638DF264 for ; Fri, 8 Feb 2013 09:09:05 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U3juK-0004oF-O2; Fri, 08 Feb 2013 09:06:08 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U3juG-0004ni-R7 for linux-arm-kernel@lists.infradead.org; Fri, 08 Feb 2013 09:06:06 +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 <0MHW00H7C99W7NK0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 08 Feb 2013 18:06:00 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.50]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id B9.23.03880.8FFB4115; Fri, 08 Feb 2013 18:06:00 +0900 (KST) X-AuditID: cbfee61b-b7fb06d000000f28-ac-5114bff8f976 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 39.23.03880.8FFB4115; Fri, 08 Feb 2013 18:06:00 +0900 (KST) Received: from DOSANGSU4UP02 ([12.23.118.226]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MHW004ZC99ZPM30@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 08 Feb 2013 18:06:00 +0900 (KST) From: Sangsu Park To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH V3] ARM: EXYNOS: Add clocks for EXYNOS I2S and PCM I/F Date: Fri, 08 Feb 2013 18:05:58 +0900 Message-id: <011201ce05db$82ae97e0$880bc7a0$@samsung.com> MIME-version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac4F23zHhJrzTMZhRLSTGnw13S7UOg== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsVy+t8zI90f+0UCDc5fFrDY9PgaqwOjx+Yl 9QGMUVw2Kak5mWWpRfp2CVwZf15NZC04KV7xrXc9YwPjbeEuRk4OCQETiZMP97NB2GISF+6t B7K5OIQEljFK7J//mxmm6PyU7+wQiUWMEtcmL2CEcJYzSez//4odpIpNQFfiwLo5LF2MHBwi At4Sy68pgtQwC5xilDi2cCYrSI2wgJvEl8VzmEFqWARUJU6d5wYJ8wpYSsz4d5wJwhaU+DH5 HguIzSygJbF+J0ScWUBeYvOat1AHKUjsOPuaEcQWEdCTWDJ1BxtEjYjEvhfvwG6TEOhnl1i3 4BLYIBYBAYlvkw+B3SYhICux6QDUHEmJgytusExgFJuFZPUsJKtnIVk9C8mKBYwsqxhFUwuS C4qT0nON9IoTc4tL89L1kvNzNzFCYkV6B+OqBotDjAIcjEo8vBpnhQOFWBPLiitzDzFKcDAr ifAy7xIJFOJNSaysSi3Kjy8qzUktPsSYDHTsRGYp0eR8YBznlcQbGhubmJmYmphbmpqbkias JM7LeOpJgJBAemJJanZqakFqEcwWJg5OqQZG62NfvjB9iDc7oyFxKtx40ot5K+Xa2So3O4Y8 bk24M/NmmGPit1yWlN4URUmmPy6rf1ttjU+P3V294P4E7z9hpwSXf3Z7+Zkv4O5paT3PUG6T y60iF0L3H9/pMvHwyfXKVyQvCj1U2PP7Tvr7uastCycrnc4K1V5+8Di7+F7+o78zOxz79HeY K7EUZyQaajEXFScCAFaH4EDZAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKIsWRmVeSWpSXmKPExsVy+t9jAd0f+0UCDU7/5bLY9PgaqwOjx+Yl 9QGMUQ2MNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlA U5UUyhJzSoFCAYnFxUr6dpgmhIa46VrANEbo+oYEwfUYGaCBhHWMGX9eTWQtOCle8a13PWMD 423hLkZODgkBE4nzU76zQ9hiEhfurWfrYuTiEBJYxChxbfICRghnOZPE/v+vwKrYBHQlDqyb w9LFyMEhIuAtsfyaIkgNs8ApRoljC2eygtQIC7hJfFk8hxmkhkVAVeLUeW6QMK+ApcSMf8eZ IGxBiR+T77GA2MwCWhLrd0LEmQXkJTavecsMcZCCxI6zrxlBbBEBPYklU3ewQdSISOx78Y5x AqPALCSjZiEZNQvJqFlIWhYwsqxiFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECI7EZ9I7GFc1 WBxiFOBgVOLh1TgrHCjEmlhWXJl7iFGCg1lJhJd5l0igEG9KYmVValF+fFFpTmrxIcZkoEcn MkuJJucDk0ReSbyhsYmZkaWRmYWRibk5acJK4ryMp54ECAmkJ5akZqemFqQWwWxh4uCUamDM PXvDLiiUO2vZ6Sdzviu+Ohi4fWbd2tM/bjeLy66Y8avVWsR4udk+0fq/e7pbGNZmb4tUN/w8 w/wBG9cSV7X98Vmzqv3s3vyvN5GtbXkcmurnkWS4/R93yH2GbZPX2HG+uFWldZGFO27bjwzG rYJvTs82rtxiOC1hrmfH+8AutjatsPNR+l+VWIozEg21mIuKEwH+oMkjCAMAAA== 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-20130208_040605_119651_0FC1E28B X-CRM114-Status: GOOD ( 15.64 ) 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: Kukjin Kim , sbkim73@samsung.com, Sachin Kamat , ben-linux@fluff.org, Padma Venkat , 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 | 68 ++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-exynos/clock-audss.c 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..31d01c3 --- /dev/null +++ b/arch/arm/mach-exynos/clock-audss.c @@ -0,0 +1,68 @@ +/* + * 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; + +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 audss base\n"); + return; + } + + s3c_register_clocks(exynos_init_audss_clocks, + ARRAY_SIZE(exynos_init_audss_clocks)); + s3c_disable_clocks(exynos_init_audss_clocks, + ARRAY_SIZE(exynos_init_audss_clocks)); +}