From patchwork Sun Aug 28 18:10:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Heiko_St=C3=BCbner?= X-Patchwork-Id: 1105842 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7SIB6po019161 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 28 Aug 2011 18:11:27 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qxjou-0000cM-JN; Sun, 28 Aug 2011 18:10:56 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qxjou-0002lN-4d; Sun, 28 Aug 2011 18:10:56 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qxjor-0002lH-6J for linux-arm-kernel@canuck.infradead.org; Sun, 28 Aug 2011 18:10:53 +0000 Received: from s15407518.onlinehome-server.info ([82.165.136.167]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qxjoo-0000K4-Qr for linux-arm-kernel@lists.infradead.org; Sun, 28 Aug 2011 18:10:51 +0000 Received: from [91.64.125.49] (helo=marty.localnet) by s15407518.onlinehome-server.info with esmtpa (Exim 4.69) (envelope-from ) id 1Qxjoj-0007kz-2d; Sun, 28 Aug 2011 20:10:45 +0200 From: Heiko =?iso-8859-1?q?St=FCbner?= To: Kukjin Kim , "'Ben Dooks'" Subject: [PATCH v2 3/4] S3C2416: Add HSSPI clock sourced from EPLL Date: Sun, 28 Aug 2011 20:10:43 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.37-2-686; KDE/4.4.5; i686; ; ) References: <201108282006.31667.heiko@sntech.de> In-Reply-To: <201108282006.31667.heiko@sntech.de> MIME-Version: 1.0 Message-Id: <201108282010.44152.heiko@sntech.de> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110828_191051_025104_A2D92E46 X-CRM114-Status: GOOD ( 10.94 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (-1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.7 KHOP_DYNAMIC Relay looks like a dynamic address Cc: linux-samsung-soc@vger.kernel.org, Heiko =?iso-8859-1?q?St=FCbner?= , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 28 Aug 2011 18:11:27 +0000 (UTC) This clock is special to the S3C2416/2450 SoCs. Signed-off-by: Heiko Stuebner --- Changes since v1: move hsspi sources array arch/arm/mach-s3c2416/clock.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-s3c2416/clock.c b/arch/arm/mach-s3c2416/clock.c index 21a5e81..196fb37 100644 --- a/arch/arm/mach-s3c2416/clock.c +++ b/arch/arm/mach-s3c2416/clock.c @@ -38,6 +38,32 @@ static unsigned int armdiv[8] = { [7] = 8, }; +static struct clksrc_clk hsspi_eplldiv = { + .clk = { + .name = "hsspi-eplldiv", + .parent = &clk_esysclk.clk, + .ctrlbit = (1 << 14), + .enable = s3c2443_clkcon_enable_s, + }, + .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 24 }, +}; + +static struct clk *hsspi_sources[] = { + [0] = &hsspi_eplldiv.clk, + [1] = NULL, /* to fix */ +}; + +static struct clksrc_clk hsspi_mux = { + .clk = { + .name = "hsspi-if", + }, + .sources = &(struct clksrc_sources) { + .sources = hsspi_sources, + .nr_sources = ARRAY_SIZE(hsspi_sources), + }, + .reg_src = { .reg = S3C2443_CLKSRC, .size = 1, .shift = 18 }, +}; + static struct clksrc_clk hsmmc_div[] = { [0] = { .clk = { @@ -114,6 +140,8 @@ void __init_or_cpufreq s3c2416_setup_clocks(void) static struct clksrc_clk *clksrcs[] __initdata = { + &hsspi_eplldiv, + &hsspi_mux, &hsmmc_div[0], &hsmmc_div[1], &hsmmc_mux[0],