From patchwork Mon Jan 6 08:18:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 3436321 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 BE298C02DC for ; Mon, 6 Jan 2014 08:18:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE0502016C for ; Mon, 6 Jan 2014 08:18:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A63D20170 for ; Mon, 6 Jan 2014 08:18:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbaAFISg (ORCPT ); Mon, 6 Jan 2014 03:18:36 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:48385 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753138AbaAFISe (ORCPT ); Mon, 6 Jan 2014 03:18:34 -0500 Received: by mail-pa0-f52.google.com with SMTP id ld10so18254875pab.25 for ; Mon, 06 Jan 2014 00:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:to:cc:subject:user-agent:mime-version :content-type; bh=a5o25UttBovQ243RgDMiYQpNOvyD2QHwywUf6O9I5ls=; b=Z5eWTDELrzbx7Sg3kTM/ZTGNXLuhLcIPLWZnHXsJfCp/80U9uecaobgJzqs5l/wGoU lFDVNTRMocfXFfDbWFS+TCMbSmqmGgGjSGs1NFcZ8h/PoWaYKgRkxxf4f3yQ2BzJXKr0 V2M903nQrWsdzv6WV7SgEfyNz6D1TcOpP5Tut5zMVcaq48OctA+p6+82rjRrY7+pa2+l 5WgBA4Qj5xOITChZyzO34fSVDL0LNnrSG5+YTv2uWVGQH53MGcdqBdoJDe9o4rTUCltL gigjYnj8hx4SNimhnbmJqyeO4GXKhdsOTarqLD6wBUsqeKnLoNUheqk8P0NnqDqU3chx EXpQ== X-Received: by 10.68.204.41 with SMTP id kv9mr3232805pbc.168.1388996311997; Mon, 06 Jan 2014 00:18:31 -0800 (PST) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPSA id vf7sm126918368pbc.5.2014.01.06.00.18.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 06 Jan 2014 00:18:31 -0800 (PST) Date: Mon, 06 Jan 2014 00:18:31 -0800 (PST) Message-ID: <8738l1jzfv.wl%kuninori.morimoto.gx@gmail.com> From: Kuninori Morimoto To: Simon , Laurent Cc: Morimoto , Magnus , Linux-SH , Kuninori Morimoto Subject: [PATCH] ARM: shmobile: r8a7790: add audio clocks User-Agent: Wanderlust/2.14.0 Emacs/23.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 From: Kuninori Morimoto Signed-off-by: Kuninori Morimoto --- >> Laurent Could you please check this patch ? >> Simon This patch is based on renesas-devel-v3.13-rc5-20131230 tag arch/arm/boot/dts/r8a7790.dtsi | 29 +++++++++++++++++++++++++++++ arch/arm/mach-shmobile/clock-r8a7790.c | 16 ++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index f48487c..abe68b9 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -312,6 +312,27 @@ clock-frequency = <0>; clock-output-names = "extal"; }; + audio_clk_a: audio_clk_a { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value can be overriden by the board if exist */ + clock-frequency = <0>; + clock-output-names = "audio_clk_a"; + }; + audio_clk_b: audio_clk_b { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value can be overriden by the board if exist */ + clock-frequency = <0>; + clock-output-names = "audio_clk_b"; + }; + audio_clk_c: audio_clk_c { + compatible = "fixed-clock"; + #clock-cells = <0>; + /* This value can be overriden by the board if exist */ + clock-frequency = <0>; + clock-output-names = "audio_clk_c"; + }; /* Special CPG clocks */ cpg_clocks: cpg_clocks@e6150000 { @@ -522,6 +543,14 @@ clock-mult = <1>; clock-output-names = "cp"; }; + audio_clk_internal: audio_clk_internal { + compatible = "fixed-factor-clock"; + clocks = <&m2_clk>; + #clock-cells = <0>; + clock-div = <1>; + clock-mult = <1>; + clock-output-names = "audio_clk_internal"; + }; /* Gate clocks */ mstp0_clks: mstp0_clks@e6150130 { diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index c5c60ec..9dd5499b4 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c @@ -82,6 +82,15 @@ static struct clk main_clk = { .ops = &followparent_clk_ops, }; +static struct clk audio_clk_a = { +}; + +static struct clk audio_clk_b = { +}; + +static struct clk audio_clk_c = { +}; + /* * clock ratio of these clock will be updated * on r8a7790_clock_init() @@ -115,6 +124,9 @@ SH_FIXED_RATIO_CLK_SET(ddr_clk, pll3_clk, 1, 8); SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); static struct clk *main_clks[] = { + &audio_clk_a, + &audio_clk_b, + &audio_clk_c, &extal_clk, &extal_div2_clk, &main_clk, @@ -246,6 +258,10 @@ static struct clk mstp_clks[MSTP_NR] = { static struct clk_lookup lookups[] = { /* main clocks */ + CLKDEV_CON_ID("audio_clk_a", &audio_clk_a), + CLKDEV_CON_ID("audio_clk_b", &audio_clk_b), + CLKDEV_CON_ID("audio_clk_c", &audio_clk_c), + CLKDEV_CON_ID("audio_clk_internal", &m2_clk), CLKDEV_CON_ID("extal", &extal_clk), CLKDEV_CON_ID("extal_div2", &extal_div2_clk), CLKDEV_CON_ID("main", &main_clk),