From patchwork Fri Aug 30 12:37:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 2851964 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 9E5EAC0AB5 for ; Fri, 30 Aug 2013 12:39:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E781C203B4 for ; Fri, 30 Aug 2013 12:39:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB9BD2039A for ; Fri, 30 Aug 2013 12:39:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754544Ab3H3MjL (ORCPT ); Fri, 30 Aug 2013 08:39:11 -0400 Received: from mail-ea0-f182.google.com ([209.85.215.182]:59730 "EHLO mail-ea0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755991Ab3H3MjK (ORCPT ); Fri, 30 Aug 2013 08:39:10 -0400 Received: by mail-ea0-f182.google.com with SMTP id o10so885368eaj.41 for ; Fri, 30 Aug 2013 05:39:09 -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=3I2vckpggctX9yWOYO6A/5TUUujaKo1Tz+Qx4d/xUwY=; b=lB4znK91gW7MahMM1uHU9M6zrDdtEe+Rp6tXmrE6fX5h+ug39WjGGdNpUZ+pqBqLDg 3kULBej8Y34THubY102KZVt6VWmEQPA8mUSBZVCn33nTVMOuRc0XM9NMOjv02GHS61ZK ecwFYJjEO5/b6JNsHTrEm2Z21lbds7oC66oliEFI2/hOqoy1kGCBy/Pk4BMpgwIdX1tz rPCbNur0eIWOs7cSuLE8sTr3rYPMit0qKx32dfXaR9UOFadHNDot6xfDf0Pv2r6PO2UT 2j2eC0N6DZXebMq96S9fGgJTmU0kaC/hk1ooIAsE98GnFJsgkZuRCRPzkDF+lczkSHbn Dxcw== X-Received: by 10.14.89.72 with SMTP id b48mr12506957eef.43.1377866349088; Fri, 30 Aug 2013 05:39:09 -0700 (PDT) Received: from groucho.site ([109.201.152.242]) by mx.google.com with ESMTPSA id j7sm54444384eeo.15.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Aug 2013 05:39:08 -0700 (PDT) From: Ulrich Hecht To: linux-sh@vger.kernel.org Cc: magnus.damm@gmail.com, Nguyen Viet Dung Subject: [RFC 06/10] ARM: shmobile: r8a7790: add I2C clock Date: Fri, 30 Aug 2013 14:37:40 +0200 Message-Id: <1377866264-21110-7-git-send-email-ulrich.hecht@gmail.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1377866264-21110-1-git-send-email-ulrich.hecht@gmail.com> References: <1377866264-21110-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=-8.9 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 add clock for I2C bus. 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..05cd34b 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.0", &mstp_clks[MSTP931]), + CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP930]), + CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP929]), + CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP928]), }; #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \