From patchwork Wed Nov 25 11:50:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 7698311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B6EE99F1BE for ; Wed, 25 Nov 2015 11:53:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7B65208ED for ; Wed, 25 Nov 2015 11:53:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C669208E5 for ; Wed, 25 Nov 2015 11:53:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a1YbT-0004KE-Ma; Wed, 25 Nov 2015 11:51:15 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a1Yb9-00045X-Tx for linux-arm-kernel@lists.infradead.org; Wed, 25 Nov 2015 11:50:56 +0000 Received: by wmeo63 with SMTP id o63so11114952wme.2 for ; Wed, 25 Nov 2015 03:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=U8A1b1mgzg6Ivp/HOqNE2Cu8xo9AMjTTNBZ3zr37aRg=; b=ycd38hE267tBWwara78Mhwh62p62ZgTCC4/pK1YCSkKz4fnjVmyp7zJanPcn+tswJ+ zX+E6MUKEz+SXK+ZAwiyW7EEXoFUALiVDxHBPW4Lk835yLN3VU2Hkm1JlcyI7ASiox4Q qK+LQftu2HAwNYhS1enCtkf9zDAHaz79ml804JozdOxhF+asnVUzPwxkdowpmj7WCypP qMMqetKqL0wbtCBntdyNfv+1yAsyXNFLCdSBLJK3sY1OxKM3yRWKb2fPLeqk7i7KNkV+ mIkRhtCXbuSlLz1jRwqfkK0oLSVG+zxPhvAa/ANCGFxvZVj4O8OGgnaQjzobCObls9qw uA9g== X-Received: by 10.194.58.5 with SMTP id m5mr42789577wjq.31.1448452239506; Wed, 25 Nov 2015 03:50:39 -0800 (PST) Received: from [192.168.1.20] (x5d846db9.dyn.telefonica.de. [93.132.109.185]) by smtp.gmail.com with ESMTPSA id bk2sm22861725wjc.3.2015.11.25.03.50.38 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Nov 2015 03:50:38 -0800 (PST) Subject: [PATCH 2/5] clk: ep93xx: Add ADC clock To: Hartley Sweeten , Ryan Mallon , linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org References: <56558B23.4080506@gmail.com> From: Alexander Sverdlin Message-ID: <5655A08D.3090701@gmail.com> Date: Wed, 25 Nov 2015 12:50:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56558B23.4080506@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151125_035056_134005_14CE8552 X-CRM114-Status: GOOD ( 10.91 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lars-Peter Clausen , Russell King , Peter Meerwald , Jonathan Cameron , Hartmut Knaack Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ADC and keypad controller clocks share the same control register, so use the existing infrastructure to add ADC clock support for Cirrus Logic EP93xx SoCs. Signed-off-by: Alexander Sverdlin --- arch/arm/mach-ep93xx/clock.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index b9cd9d7..4253426 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c @@ -98,6 +98,13 @@ static struct clk clk_keypad = { .enable_mask = EP93XX_SYSCON_KEYTCHCLKDIV_KEN, .set_rate = set_keytchclk_rate, }; +static struct clk clk_adc = { + .parent = &clk_xtali, + .sw_locked = 1, + .enable_reg = EP93XX_SYSCON_KEYTCHCLKDIV, + .enable_mask = EP93XX_SYSCON_KEYTCHCLKDIV_TSEN, + .set_rate = set_keytchclk_rate, +}; static struct clk clk_spi = { .parent = &clk_xtali, .rate = EP93XX_EXT_CLK_RATE, @@ -214,6 +221,7 @@ static struct clk_lookup clocks[] = { INIT_CK(NULL, "pll2", &clk_pll2), INIT_CK("ohci-platform", NULL, &clk_usb_host), INIT_CK("ep93xx-keypad", NULL, &clk_keypad), + INIT_CK("ep93xx-adc", NULL, &clk_adc), INIT_CK("ep93xx-fb", NULL, &clk_video), INIT_CK("ep93xx-spi.0", NULL, &clk_spi), INIT_CK("ep93xx-i2s", "mclk", &clk_i2s_mclk),