From patchwork Thu Dec 26 15:37:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentine Barshak X-Patchwork-Id: 3407121 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 A1EC5C02DC for ; Thu, 26 Dec 2013 15:38:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 904252015D for ; Thu, 26 Dec 2013 15:38:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B799220149 for ; Thu, 26 Dec 2013 15:38:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753441Ab3LZPiH (ORCPT ); Thu, 26 Dec 2013 10:38:07 -0500 Received: from mail-lb0-f180.google.com ([209.85.217.180]:49756 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753355Ab3LZPiG (ORCPT ); Thu, 26 Dec 2013 10:38:06 -0500 Received: by mail-lb0-f180.google.com with SMTP id x18so3804915lbi.11 for ; Thu, 26 Dec 2013 07:38:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d7aTtskqdXDBoSOMGIwadK/Sil2ggSNVDCIERBnEYvk=; b=JOikNC5snDvojWXlBuT4/sQhBH+vYWAgm49Cn8f/W44y9ToxfoWMH3HhRg5W7vN/IT wpJsbVyGBHaohmT2dewr2s7MJtUkz0SzJGGEgPV71f0fK9TjGrnc4KQnUYK61z9tytjl Ropo+T5gq2FMXQbFhgsl5kEBA+XtV/xjwnbrT0Gs1zQAnGypE1L4Tqq6eWH1SXB9b4Kt LBdxPtSGtX5SP/gE4bQYUEUhhed+vOAa0FRGLhftTZ3/Pik22ZHurA2VI8pTzkWz0XZ8 kW/CAvFRssqgRbEcU9Bm293NwM8PgXK47Yioko1h6uEDE1uDiLKcpEY4ltwxguVIq0wC KBmA== X-Gm-Message-State: ALoCoQmaxgN16a+0ZZJbD7NHEd88zSE0NCw41lNpOr10INtojBDIwGciPo+mDw5zVI0YRE1/PIUS X-Received: by 10.152.120.66 with SMTP id la2mr1319115lab.62.1388072285258; Thu, 26 Dec 2013 07:38:05 -0800 (PST) Received: from black.localnet ([93.100.122.208]) by mx.google.com with ESMTPSA id bo10sm18909270lbb.16.2013.12.26.07.38.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Dec 2013 07:38:04 -0800 (PST) From: Valentine Barshak To: linux-sh@vger.kernel.org Cc: Simon Horman , Magnus Damm , Kuninori Morimoto , Laurent Pinchart Subject: [PATCH 2/3] arm: shmobile: r8a7791: Add VIN clocks Date: Thu, 26 Dec 2013 19:37:58 +0400 Message-Id: <1388072279-12508-3-git-send-email-valentine.barshak@cogentembedded.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1388072279-12508-1-git-send-email-valentine.barshak@cogentembedded.com> References: <1388072279-12508-1-git-send-email-valentine.barshak@cogentembedded.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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 This adds VIN[0-2] clock support to R8A7791 SoC. Signed-off-by: Valentine Barshak --- arch/arm/mach-shmobile/clock-r8a7791.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c index fe4a774..191ad60 100644 --- a/arch/arm/mach-shmobile/clock-r8a7791.c +++ b/arch/arm/mach-shmobile/clock-r8a7791.c @@ -103,6 +103,7 @@ SH_FIXED_RATIO_CLK_SET(hp_clk, pll1_clk, 1, 12); SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24); SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024)); SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); +SH_FIXED_RATIO_CLK_SET(zg_clk, pll1_clk, 1, 3); SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3); static struct clk *main_clks[] = { @@ -117,6 +118,7 @@ static struct clk *main_clks[] = { &rclk_clk, &mp_clk, &cp_clk, + &zg_clk, &zx_clk, }; @@ -124,6 +126,7 @@ static struct clk *main_clks[] = { enum { MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925, MSTP813, + MSTP811, MSTP810, MSTP809, MSTP726, MSTP724, MSTP723, MSTP721, MSTP720, MSTP719, MSTP718, MSTP715, MSTP714, MSTP522, @@ -141,6 +144,9 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP927] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 27, 0), /* I2C4 */ [MSTP925] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 25, 0), /* I2C5 */ [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ + [MSTP811] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 11, 0), /* VIN0 */ + [MSTP810] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 10, 0), /* VIN1 */ + [MSTP809] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 9, 0), /* VIN2 */ [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */ [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */ @@ -172,6 +178,7 @@ static struct clk_lookup lookups[] = { CLKDEV_CON_ID("pll1", &pll1_clk), CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk), CLKDEV_CON_ID("pll3", &pll3_clk), + CLKDEV_CON_ID("zg", &zg_clk), CLKDEV_CON_ID("hp", &hp_clk), CLKDEV_CON_ID("p", &p_clk), CLKDEV_CON_ID("rclk", &rclk_clk), @@ -208,6 +215,9 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("i2c-rcar_gen2.4", &mstp_clks[MSTP927]), CLKDEV_DEV_ID("i2c-rcar_gen2.5", &mstp_clks[MSTP925]), CLKDEV_DEV_ID("r8a7791-ether", &mstp_clks[MSTP813]), /* Ether */ + CLKDEV_DEV_ID("r8a7791-vin.0", &mstp_clks[MSTP811]), + CLKDEV_DEV_ID("r8a7791-vin.1", &mstp_clks[MSTP810]), + CLKDEV_DEV_ID("r8a7791-vin.2", &mstp_clks[MSTP809]), }; #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \