From patchwork Tue Sep 2 09:12:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 4823851 Return-Path: X-Original-To: patchwork-linux-sh@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 56788C0338 for ; Tue, 2 Sep 2014 09:13:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41D36200ED for ; Tue, 2 Sep 2014 09:13:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B89320155 for ; Tue, 2 Sep 2014 09:13:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752857AbaIBJNm (ORCPT ); Tue, 2 Sep 2014 05:13:42 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:46639 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbaIBJNl (ORCPT ); Tue, 2 Sep 2014 05:13:41 -0400 Received: by mail-wg0-f49.google.com with SMTP id y10so6606751wgg.32 for ; Tue, 02 Sep 2014 02:13:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=TTutvvw8QEWFKz0W9pJySkQaDBXmtRCnyaZV1tSkq+E=; b=lFZVat6bwT7nhOzKy6vmg5zVAlD65dUryfNV35BiH9BpWcyN3epqzKiMeH3DHt+ZOJ gDkRaJ81WF6876tvl7kyZeG3VB6unKeeocQUg9Te3r+/UEkIrEHuUdDT7l1VI20cb4Ns K7Iy4B6OzYLSVDGpvQrK7+WLf2ZKn5/leDRfk42BptkLPH99HtgsjNMzUxM5maPU6BxC 8mLcJe3dnZnPZV3duvZNnNRNoReCwuUnHtGoBLIe2yevh6Ateh2RfAdpGdNxJfg2bvLw VmFADOf8z0CdehN0TmJY1NJrG+v7coMvtEP4gT+cqTQg8iLShmkzDkLSoDjiw8QXfRGb 44IA== X-Received: by 10.180.221.107 with SMTP id qd11mr14593835wic.61.1409649220703; Tue, 02 Sep 2014 02:13:40 -0700 (PDT) Received: from groucho.site ([91.108.183.74]) by mx.google.com with ESMTPSA id h6sm8087525wjb.33.2014.09.02.02.13.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Sep 2014 02:13:40 -0700 (PDT) From: Ulrich Hecht To: horms@verge.net.au Cc: linux-sh@vger.kernel.org, mturquette@linaro.org, magnus.damm@gmail.com, Laurent Pinchart , Geert Uytterhoeven , Ulrich Hecht Subject: [PATCH v2 03/10] ARM: shmobile: sh73a0: common clock framework board support Date: Tue, 2 Sep 2014 11:12:59 +0200 Message-Id: <1409649186-1046-4-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1409649186-1046-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1409649186-1046-1-git-send-email-ulrich.hecht+renesas@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SBL, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY, URI_HEX 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 Adds support for the common clock framework to the KZM9G reference board and SH73A0 SoC setup code. Signed-off-by: Ulrich Hecht --- arch/arm/mach-shmobile/board-kzm9g-reference.c | 25 +++++++++++++++++++++++++ arch/arm/mach-shmobile/setup-sh73a0.c | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c index d9cdf9a..19b0842 100644 --- a/arch/arm/mach-shmobile/board-kzm9g-reference.c +++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c @@ -30,11 +30,36 @@ #include #include +#include "clock.h" #include "common.h" #include "sh73a0.h" +#ifdef CONFIG_COMMON_CLK +static const struct clk_name clk_names[] __initconst = { + { "cmt1", NULL, "sh_cmt.10" }, + { "scifa0", NULL, "sh-sci.0" }, + { "scifa1", NULL, "sh-sci.1" }, + { "scifa2", NULL, "sh-sci.2" }, + { "scifa3", NULL, "sh-sci.3" }, + { "scifa4", NULL, "sh-sci.4" }, + { "scifa5", NULL, "sh-sci.5" }, + { "scifa6", NULL, "sh-sci.6" }, + { "scifa7", NULL, "sh-sci.7" }, + { "scifb", NULL, "sh-sci.8" }, + { "sdhi0", NULL, "ee100000.sd" }, + { "sdhi1", NULL, "ee120000.sd" }, + { "sdhi2", NULL, "ee140000.sd" }, + { "mmcif0", NULL, "e6bd0000.mmc" }, + { "iic0", NULL, "e6820000.i2c" }, + { "iic3", NULL, "e6826000.i2c" }, +}; +#endif + static void __init kzm_init(void) { +#ifdef CONFIG_COMMON_CLK + shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false); +#endif sh73a0_add_standard_devices_dt(); #ifdef CONFIG_CACHE_L2X0 diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 0085305..6d73b83 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c @@ -756,7 +756,9 @@ void __init __weak sh73a0_register_twd(void) { } void __init sh73a0_earlytimer_init(void) { sh73a0_init_delay(); +#ifndef CONFIG_COMMON_CLK sh73a0_clock_init(); +#endif shmobile_earlytimer_init(); sh73a0_register_twd(); } @@ -777,8 +779,9 @@ void __init sh73a0_add_early_devices(void) void __init sh73a0_add_standard_devices_dt(void) { /* clocks are setup late during boot in the case of DT */ +#ifndef CONFIG_COMMON_CLK sh73a0_clock_init(); - +#endif platform_add_devices(sh73a0_devices_dt, ARRAY_SIZE(sh73a0_devices_dt)); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);