From patchwork Wed Mar 19 18:19:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Emilio_L=C3=B3pez?= X-Patchwork-Id: 3860091 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CDE8FBF540 for ; Wed, 19 Mar 2014 18:22:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04958200BE for ; Wed, 19 Mar 2014 18:22:09 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 13DD620122 for ; Wed, 19 Mar 2014 18:22:08 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQL6u-0002N5-L7; Wed, 19 Mar 2014 18:21:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQL6j-0003el-Pp; Wed, 19 Mar 2014 18:20:53 +0000 Received: from yotta.elopez.com.ar ([2a00:1768:1004:d00d:c0de:4:f00d:cafe]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQL6M-0003c2-8F for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 18:20:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=elopez.com.ar; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=GzJWS8yNuI0btqatdKJkZ9N8eFfrDjLBGkHbJ5IAxQU=; b=k/7/gr0zbXpdPR4R8SiKTkDxIzvG+qDx6aeL3SZKcsjAU0Dd/AEGEAjCxEGxk+2XHXAounyPf4mnTjUX1O2XbMWW3ZEgoZh3+5Y9ECYbpEWOLX9gUX5mEMJI9QvbfDQcfDJXthO9bIxCV4DoR+TAoQEqac+IWgfEg/Szbmom2op63cnYcAinb+l7ciuMfdHE+v6mAE+VpaWMetzgNMgJtsTeaDeaWh31CZZgThSQj0yecxTTnE3GcVfyacaa0q2smfkw8Wco1gopYzRJm4qofkykx7GKzitj9izSEsong8VC8O6gRgu2FkKze5UuS/NDLeIV4iwiE0zxqCYi9Fy47g==; Received: from 201-212-135-39.cab.prima.net.ar ([201.212.135.39] helo=desktop.lan) by yotta.elopez.com.ar with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.82) id 1WQL5r-0006ra-Mn; Wed, 19 Mar 2014 15:20:00 -0300 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= To: Mike Turquette , Maxime Ripard Subject: [PATCH 1/4] clk: sunxi: fix A20 PLL4 calculation Date: Wed, 19 Mar 2014 15:19:30 -0300 Message-Id: <1395253173-30437-2-git-send-email-emilio@elopez.com.ar> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1395253173-30437-1-git-send-email-emilio@elopez.com.ar> References: <1395253173-30437-1-git-send-email-emilio@elopez.com.ar> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140319_142030_803130_0A6FC4C6 X-CRM114-Status: UNSURE ( 7.12 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: =?UTF-8?q?Emilio=20L=C3=B3pez?= , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Allwinner actually reworked the PLL4 on A20; now it's compatible with the sun4i PLL5/6 design previous to any divisions, as well as to the new PLL8 in sun7i. Signed-off-by: Emilio López --- drivers/clk/sunxi/clk-sunxi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c index 7ca9ed9..a393df1 100644 --- a/drivers/clk/sunxi/clk-sunxi.c +++ b/drivers/clk/sunxi/clk-sunxi.c @@ -621,6 +621,12 @@ static const struct factors_data sun6i_a31_pll1_data __initconst = { .getter = sun6i_a31_get_pll1_factors, }; +static const struct factors_data sun7i_a20_pll4_data __initconst = { + .enable = 31, + .table = &sun4i_pll5_config, + .getter = sun4i_get_pll5_factors, +}; + static const struct factors_data sun4i_pll5_data __initconst = { .enable = 31, .table = &sun4i_pll5_config, @@ -1244,6 +1250,7 @@ free_clkdata: static const struct of_device_id clk_factors_match[] __initconst = { {.compatible = "allwinner,sun4i-a10-pll1-clk", .data = &sun4i_pll1_data,}, {.compatible = "allwinner,sun6i-a31-pll1-clk", .data = &sun6i_a31_pll1_data,}, + {.compatible = "allwinner,sun7i-a20-pll4-clk", .data = &sun7i_a20_pll4_data,}, {.compatible = "allwinner,sun6i-a31-pll6-clk", .data = &sun6i_a31_pll6_data,}, {.compatible = "allwinner,sun5i-a13-ahb-clk", .data = &sun5i_a13_ahb_data,}, {.compatible = "allwinner,sun4i-a10-apb1-clk", .data = &sun4i_apb1_data,},