From patchwork Sat Feb 20 17:59:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 8367561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3042EC0553 for ; Sat, 20 Feb 2016 18:02:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D24D20265 for ; Sat, 20 Feb 2016 18:02:07 +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 631DF20254 for ; Sat, 20 Feb 2016 18:02:06 +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 1aXBpS-0005oz-LA; Sat, 20 Feb 2016 18:00:26 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aXBpG-0004dN-Pm for linux-arm-kernel@lists.infradead.org; Sat, 20 Feb 2016 18:00:15 +0000 Received: by mail-wm0-x22b.google.com with SMTP id g62so107449461wme.0 for ; Sat, 20 Feb 2016 09:59:53 -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=b+CfnUIMzzCdr85XynYOo29KUdVvkb0Ei0eWHUaf39tPtWBZxbaanhkAPq40GAFWJb 3iNVmvUbe+LtrDS2QuR94l9pTqv8QqBrSFR1tvjoVRIrT1LcIkus6pCI9XsBXyKsAMVd tu2uqGEswId4evOOr0Ah3MajLShkQsCpm2/H2h6dibPOTwIYCfPeBdCyjqzt1KGBtjhc gvN0Ezr/RdauSuGxM66oP1ZkmVA/nK/ZKNO6e7yMsU3AshyhHdzn6DJj8gekKXtNpUUD 74Dr9bvI0QiwzqC4h/YH5L8OepZMWqZ/K2UKbyZD527tZX6Jv9CeXvcJmlmgHnz4s3DD BdhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=U8A1b1mgzg6Ivp/HOqNE2Cu8xo9AMjTTNBZ3zr37aRg=; b=GmbIShIqgFnvd7xfRvzH7GmFyPBQr+aXGfaUSqtjyNuOs0F1131pwKXygTiRcqabCh s4Jx3THDxLQJZ4Tf1FzX6MHnPHhc2TdlDeEsukBVaT6a9JU3w43m7JyrAvUIGdX1frb0 uQKHswnNTvG4vXSJ35UTt4J5UWEHUP/3Xzxid70trYScxCd4fFqmiUvVRjMT8YtdGoIV tykT8C0bzOycNC9uAFfTKPPOMcHJ5B496v3bmzNdFoAtyNw+s9VbPyoNwVj9sgPGT5fH wnizfPjYygqwL0zLPx2bFuGALmAPqnCWKbbvkq8UdaEas4dk6qaa3J25eMYGF8bwsEae 7+Hw== X-Gm-Message-State: AG10YOToozVyKqt9k4xMp97DaWpUnss4rpSX/uUHemYA1F+kq7W2mKM3XGbTO94XScOT8A== X-Received: by 10.28.137.139 with SMTP id l133mr3871418wmd.1.1455991192079; Sat, 20 Feb 2016 09:59:52 -0800 (PST) Received: from [192.168.1.20] (x5d845bdb.dyn.telefonica.de. [93.132.91.219]) by smtp.gmail.com with ESMTPSA id l132sm13007072wmf.7.2016.02.20.09.59.50 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 20 Feb 2016 09:59:51 -0800 (PST) Subject: [PATCH v2 2/5] clk: ep93xx: Add ADC clock To: Hartley Sweeten , Ryan Mallon , linux-arm-kernel@lists.infradead.org, linux-iio@vger.kernel.org References: <56C88EDD.3040007@gmail.com> <56C88FCB.30008@gmail.com> From: Alexander Sverdlin Message-ID: <56C8A996.8040107@gmail.com> Date: Sat, 20 Feb 2016 18:59:50 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <56C88FCB.30008@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160220_100015_056481_229FFF79 X-CRM114-Status: GOOD ( 10.36 ) 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.1 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),