From patchwork Tue Sep 10 11:39:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 2865431 Return-Path: X-Original-To: patchwork-linux-sh@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 3A1B19F2D6 for ; Tue, 10 Sep 2013 11:40:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8331420328 for ; Tue, 10 Sep 2013 11:40:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 591A620214 for ; Tue, 10 Sep 2013 11:40:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751419Ab3IJLkh (ORCPT ); Tue, 10 Sep 2013 07:40:37 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:52082 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751374Ab3IJLkh (ORCPT ); Tue, 10 Sep 2013 07:40:37 -0400 Received: by mail-wi0-f179.google.com with SMTP id hm2so545847wib.0 for ; Tue, 10 Sep 2013 04:40:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lZjZkuAyC90fN2DiuuMl2BbXy+HNOyEGrLMB22FzTAE=; b=YEpCaGJDRF4i11AcobFVfc8H5rl2XpfkWtUapu3ByQUtnmGhJMvQ+RwVYRZfMO4yCG qSrNC98303Exv5Sbb7xbGNAEVjo84i5aWQIr/pknePV01l1mgHIjrW2tXF5hOW+edN9P q/eTafjQoLLRn55EdWeAMYGLnav7UIbHNEK7yLeWiPSQzT53EWM5EGC1tztTwJ03InYf dxcjwGODcJoErR7xdf5OiTc9fp5AkFSajaJm8+BJRbqOCThKh+jlGqylZ9GWPw6XQ8IM omLIbE2m42h3vv2g/HaywQ3zv/Syzz+QC+YqIN2kNP6KRz0svajEAlpuCuE1mV1Zg9WZ E9/A== X-Received: by 10.180.103.7 with SMTP id fs7mr12548855wib.42.1378813235042; Tue, 10 Sep 2013 04:40:35 -0700 (PDT) Received: from groucho.site ([109.201.154.159]) by mx.google.com with ESMTPSA id b13sm2930036wic.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 04:40:34 -0700 (PDT) From: Ulrich Hecht To: linux-sh@vger.kernel.org, horms@verge.net.au, magnus.damm@gmail.com Cc: laurent.pinchart@ideasonboard.com, sergei.shtylyov@cogentembedded.com, Nguyen Viet Dung Subject: [PATCH 3/3] ARM: shmobile: r8a7790: add the I2C bus clock Date: Tue, 10 Sep 2013 13:39:54 +0200 Message-Id: <1378813194-19493-4-git-send-email-ulrich.hecht@gmail.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1378813194-19493-1-git-send-email-ulrich.hecht@gmail.com> References: <1378813194-19493-1-git-send-email-ulrich.hecht@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.4 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: Nguyen Viet Dung This patch adds the I2C bus clock. Signed-off-by: Nguyen Viet Dung --- arch/arm/mach-shmobile/clock-r8a7790.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index d99b87b..654d922 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c @@ -52,6 +52,7 @@ #define SMSTPCR5 0xe6150144 #define SMSTPCR7 0xe615014c #define SMSTPCR8 0xe6150990 +#define SMSTPCR9 0xe6150994 #define SDCKCR 0xE6150074 #define SD2CKCR 0xE6150078 @@ -181,6 +182,7 @@ static struct clk div6_clks[DIV6_NR] = { /* MSTP */ enum { + MSTP931, MSTP930, MSTP929, MSTP928, MSTP813, MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, MSTP717, MSTP716, @@ -192,6 +194,10 @@ enum { }; static struct clk mstp_clks[MSTP_NR] = { + [MSTP931] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 31, 0), /* I2C0 */ + [MSTP930] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 30, 0), /* I2C1 */ + [MSTP929] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 29, 0), /* I2C2 */ + [MSTP928] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 28, 0), /* I2C3 */ [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */ @@ -247,6 +253,7 @@ static struct clk_lookup lookups[] = { CLKDEV_CON_ID("mp", &mp_clk), CLKDEV_CON_ID("qspi", &qspi_clk), CLKDEV_CON_ID("cp", &cp_clk), + CLKDEV_CON_ID("peripheral_clk", &hp_clk), /* DIV4 */ CLKDEV_CON_ID("sdh", &div4_clks[DIV4_SDH]), @@ -286,6 +293,10 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), + CLKDEV_DEV_ID("i2c-rcar_h2.0", &mstp_clks[MSTP931]), + CLKDEV_DEV_ID("i2c-rcar_h2.1", &mstp_clks[MSTP930]), + CLKDEV_DEV_ID("i2c-rcar_h2.2", &mstp_clks[MSTP929]), + CLKDEV_DEV_ID("i2c-rcar_h2.3", &mstp_clks[MSTP928]), }; #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \