From patchwork Mon Aug 6 12:31:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 1278771 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8D2663FC23 for ; Mon, 6 Aug 2012 12:32:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756130Ab2HFMcA (ORCPT ); Mon, 6 Aug 2012 08:32:00 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:44504 "EHLO relmlor1.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756101Ab2HFMb7 (ORCPT ); Mon, 6 Aug 2012 08:31:59 -0400 Received: from relmlir1.idc.renesas.com ([10.200.68.151]) by relmlor1.idc.renesas.com ( SJSMS) with ESMTP id <0M8C00AIR2TAIQA0@relmlor1.idc.renesas.com> for linux-sh@vger.kernel.org; Mon, 06 Aug 2012 21:31:58 +0900 (JST) Received: from relmlac4.idc.renesas.com ([10.200.69.24]) by relmlir1.idc.renesas.com (SJSMS) with ESMTP id <0M8C003LS2TAOSD0@relmlir1.idc.renesas.com> for linux-sh@vger.kernel.org; Mon, 06 Aug 2012 21:31:58 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 8F35F480A3; Mon, 06 Aug 2012 21:31:58 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 88EA548097; Mon, 06 Aug 2012 21:31:58 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id XAA20941; Mon, 06 Aug 2012 21:31:58 +0900 X-IronPort-AV: E=Sophos; i="4.77,720,1336316400"; d="scan'208"; a="93350216" Received: from unknown (HELO relay41.aps.necel.com) ([10.29.19.9]) by relmlii1.idc.renesas.com with ESMTP; Mon, 06 Aug 2012 21:31:58 +0900 Received: from julia (du2com5.eu.necel.com [172.29.24.35] (may be forged)) by relay41.aps.necel.com (8.14.4+Sun/8.14.4) with ESMTP id q76CVtIk009015; Mon, 06 Aug 2012 21:31:55 +0900 (JST) Received: by julia (Postfix, from userid 2) id 06A29102F2; Mon, 06 Aug 2012 14:31:55 +0200 (CEST) Received: from du0nohub.eu.necel.com (unknown [172.29.24.70]) by julia (Postfix) with ESMTP id 900D5102ED; Mon, 06 Aug 2012 14:31:54 +0200 (CEST) Received: from duacsls.ad.ree.renesas.com ([172.29.43.47]) by du0nohub.eu.necel.com (Lotus Domino Release 8.5.3 HF466) with ESMTP id 2012080614312291-209676 ; Mon, 06 Aug 2012 14:31:22 +0200 From: Phil Edworthy To: linux-sh@vger.kernel.org, Kuninori Morimoto Cc: kuninori morimoto , Magnus Damm , "Rafael J. Wysocki" , Phil Edworthy X-Mailer: git-send-email 1.7.5.4 In-reply-to: <1344256265-9802-1-git-send-email-phil.edworthy@renesas.com> References: <1344256265-9802-1-git-send-email-phil.edworthy@renesas.com> X-TNEFEvaluated: 1 Message-id: <1344256265-9802-2-git-send-email-phil.edworthy@renesas.com> Date: Mon, 06 Aug 2012 13:31:04 +0100 Subject: [PATCH 1/2 v2] r8a7779: add SDHI clock support X-MIMETrack: Itemize by SMTP Server on DU0NOHUB/NECEE(Release 8.5.3 HF466|March 09, 2012) at 06.08.2012 14:31:23, Serialize by Router on DU0NOHUB/NECEE(Release 8.5.3 HF466|March 09, 2012) at 06.08.2012 14:31:54, Serialize complete at 06.08.2012 14:31:54 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Signed-off-by: Phil Edworthy --- v2: Minor formatting changes to match existing code. arch/arm/mach-shmobile/clock-r8a7779.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 339c62c..3cafb6a 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c @@ -86,11 +86,16 @@ static struct clk div4_clks[DIV4_NR] = { 0x0300, CLK_ENABLE_ON_INIT), }; -enum { MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, +enum { MSTP323, MSTP322, MSTP321, MSTP320, + MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, MSTP016, MSTP015, MSTP014, MSTP_NR }; static struct clk mstp_clks[MSTP_NR] = { + [MSTP323] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 23, 0), /* SDHI0 */ + [MSTP322] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 22, 0), /* SDHI1 */ + [MSTP321] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 21, 0), /* SDHI2 */ + [MSTP320] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR3, 20, 0), /* SDHI3 */ [MSTP026] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 26, 0), /* SCIF0 */ [MSTP025] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 25, 0), /* SCIF1 */ [MSTP024] = SH_CLK_MSTP32(&div4_clks[DIV4_P], MSTPCR0, 24, 0), /* SCIF2 */ @@ -149,6 +154,10 @@ static struct clk_lookup lookups[] = { CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */ CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ + CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ + CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ + CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ + CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */ }; void __init r8a7779_clock_init(void)