From patchwork Wed Mar 12 23:36:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3821371 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EC1579F2BB for ; Wed, 12 Mar 2014 23:45:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 05F6F202A1 for ; Wed, 12 Mar 2014 23:45:57 +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 EA25520170 for ; Wed, 12 Mar 2014 23:45:55 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNsqN-0003cb-BF; Wed, 12 Mar 2014 23:45:51 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNslM-0007rD-P7; Wed, 12 Mar 2014 23:40:40 +0000 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNslJ-0007qZ-IQ for linux-arm-kernel@lists.infradead.org; Wed, 12 Mar 2014 23:40:38 +0000 Received: by mail-pa0-f47.google.com with SMTP id lj1so237514pab.6 for ; Wed, 12 Mar 2014 16:40:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=9h7bYEJiidgnXneeWlXWHtvVZ4Qu0cAOwAD69OZ2bsc=; b=EY0+FVodYzvL/6LA9CNnQp7QoHytFFQKJkSd+FeBNJ5uGORhAM70p+KIXlJuqIvciR 9LwEC/xiHPnvBrLgLe0HLjnQvjYlkJYeH/JZ/AsHG716vW7hP83HjnPnncJYez8abAcR Plr6LEBPnU5m9pMVy+2VoYBpq3gpyWn3T8k7prcbuZW/pP2gqrKah56pbChUoZ/8XAdB YbdIiRSh9dTUZhiATtlRzlXiDG4SGHJZVJHXGPjQgtJn+7l6RuOfVydbY9KFpILCzH30 EXNO3JsTx+eg6hEW2OusliiJ81lAHaqO6u1H82eQVbh7loC4vmhWauyGe1inzSwzvNHv yKmA== X-Received: by 10.68.194.38 with SMTP id ht6mr367843pbc.120.1394667309354; Wed, 12 Mar 2014 16:35:09 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id rk15sm69516pab.37.2014.03.12.16.35.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Mar 2014 16:35:08 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Thu, 13 Mar 2014 08:36:35 +0900 Message-Id: <20140312233635.17009.37946.sendpatchset@w520> In-Reply-To: <20140312233608.17009.65690.sendpatchset@w520> References: <20140312233608.17009.65690.sendpatchset@w520> Subject: [PATCH 03/03] ARM: shmobile: Use shmobile_clk_workaround() on Koelsch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140312_194037_728167_135403E7 X-CRM114-Status: GOOD ( 12.62 ) X-Spam-Score: -2.0 (--) Cc: horms@verge.net.au, Magnus Damm , 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: , MIME-Version: 1.0 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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Magnus Damm Convert the Koelsch DT reference code to use the newly introduced function shmobile_clk_workaround(). Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/board-koelsch-reference.c | 71 ++++++++-------------- 1 file changed, 28 insertions(+), 43 deletions(-) --- 0001/arch/arm/mach-shmobile/board-koelsch-reference.c +++ work/arch/arm/mach-shmobile/board-koelsch-reference.c 2014-02-24 15:50:57.000000000 +0900 @@ -19,12 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include #include #include #include #include +#include #include #include #include @@ -82,49 +81,35 @@ static void __init koelsch_add_du_device platform_device_register_full(&info); } +/* + * This is a really crude hack to provide clkdev support to platform + * devices until they get moved to DT. + */ +static const struct clk_name clk_names[] = { + { "cmt0", NULL, "sh_cmt.0" }, + { "scifa0", NULL, "sh-sci.0" }, + { "scifa1", NULL, "sh-sci.1" }, + { "scifb0", NULL, "sh-sci.2" }, + { "scifb1", NULL, "sh-sci.3" }, + { "scifb2", NULL, "sh-sci.4" }, + { "scifa2", NULL, "sh-sci.5" }, + { "scif0", NULL, "sh-sci.6" }, + { "scif1", NULL, "sh-sci.7" }, + { "scif2", NULL, "sh-sci.8" }, + { "scif3", NULL, "sh-sci.9" }, + { "scif4", NULL, "sh-sci.10" }, + { "scif5", NULL, "sh-sci.11" }, + { "scifa3", NULL, "sh-sci.12" }, + { "scifa4", NULL, "sh-sci.13" }, + { "scifa5", NULL, "sh-sci.14" }, + { "du0", "du.0", "rcar-du-r8a7791" }, + { "du1", "du.1", "rcar-du-r8a7791" }, + { "lvds0", "lvds.0", "rcar-du-r8a7791" }, +}; + static void __init koelsch_add_standard_devices(void) { - /* - * This is a really crude hack to provide clkdev support to the CMT and - * DU devices until they get moved to DT. - */ - static const struct clk_name { - const char *clk; - const char *con_id; - const char *dev_id; - } clk_names[] = { - { "cmt0", NULL, "sh_cmt.0" }, - { "scifa0", NULL, "sh-sci.0" }, - { "scifa1", NULL, "sh-sci.1" }, - { "scifb0", NULL, "sh-sci.2" }, - { "scifb1", NULL, "sh-sci.3" }, - { "scifb2", NULL, "sh-sci.4" }, - { "scifa2", NULL, "sh-sci.5" }, - { "scif0", NULL, "sh-sci.6" }, - { "scif1", NULL, "sh-sci.7" }, - { "scif2", NULL, "sh-sci.8" }, - { "scif3", NULL, "sh-sci.9" }, - { "scif4", NULL, "sh-sci.10" }, - { "scif5", NULL, "sh-sci.11" }, - { "scifa3", NULL, "sh-sci.12" }, - { "scifa4", NULL, "sh-sci.13" }, - { "scifa5", NULL, "sh-sci.14" }, - { "du0", "du.0", "rcar-du-r8a7791" }, - { "du1", "du.1", "rcar-du-r8a7791" }, - { "lvds0", "lvds.0", "rcar-du-r8a7791" }, - }; - struct clk *clk; - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(clk_names); ++i) { - clk = clk_get(NULL, clk_names[i].clk); - if (!IS_ERR(clk)) { - clk_register_clkdev(clk, clk_names[i].con_id, - clk_names[i].dev_id); - clk_put(clk); - } - } - + shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); r8a7791_add_dt_devices(); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);