From patchwork Tue May 11 05:00:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 98598 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4B4xAtW005227 for ; Tue, 11 May 2010 04:59:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753200Ab0EKE71 (ORCPT ); Tue, 11 May 2010 00:59:27 -0400 Received: from mail-pz0-f204.google.com ([209.85.222.204]:57490 "EHLO mail-pz0-f204.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752962Ab0EKE70 (ORCPT ); Tue, 11 May 2010 00:59:26 -0400 Received: by mail-pz0-f204.google.com with SMTP id 42so532565pzk.4 for ; Mon, 10 May 2010 21:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=iz94XOYT5Q8om8jjD+S0vLqx4ELRi8tx6u2Xs1skSsg=; b=uoFhwoKs3mpjdCwfBB0cwN56l8l21EQJMbho8TVIEPu8lEdxUzKlQtxHQej93bk1SF XZy85aTXGZUnMSsMHrahjAtOAaouSCrc1QjFcv8cQJ4k9if++qZdGtAkMARRIy4tBo3x vhUUU5RlRgerBDHM6ZydxmSsVjEMBkiV+a6B0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=bOSB9/tioJasrfQpQZq8xfPgBE2aovL+I2Yy1btoFzCo24QB2al4qtjevYvh5n9Zbz vGbOpGpjRJm4JzCoOrwJtaoLfVJRtz/qLTGn2MgrpNq9F60hqPDzF2SeaqLEr2+D3cpZ JXeQ/LwoKncHge9vZFB8SHyFKt+ARwDtDIDQY= Received: by 10.114.237.21 with SMTP id k21mr3985153wah.141.1273553966235; Mon, 10 May 2010 21:59:26 -0700 (PDT) Received: from [127.0.0.1] (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id c22sm31832391wam.18.2010.05.10.21.59.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 May 2010 21:59:25 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Tue, 11 May 2010 14:00:38 +0900 Message-Id: <20100511050038.26302.62997.sendpatchset@t400s> In-Reply-To: <20100511045933.26302.37116.sendpatchset@t400s> References: <20100511045933.26302.37116.sendpatchset@t400s> Subject: [PATCH 08/09] sh: sh7786 mstp32 clkdev lookup Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 11 May 2010 04:59:27 +0000 (UTC) --- 0015/arch/sh/kernel/cpu/sh4a/clock-sh7786.c +++ work/arch/sh/kernel/cpu/sh4a/clock-sh7786.c 2010-05-11 13:26:38.000000000 +0900 @@ -130,7 +130,49 @@ static struct clk mstp_clks[MSTP_NR] = { [MSTP102] = SH_CLK_MSTP32("ether_fck", -1, NULL, MSTPCR1, 2, 0), }; +#define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } + static struct clk_lookup lookups[] = { + /* MSTP32 clocks */ + { + /* SCIF5 */ + .dev_id = "sh-sci.5", + .con_id = "sci_fck", + .clk = &mstp_clks[MSTP029], + }, { + /* SCIF4 */ + .dev_id = "sh-sci.4", + .con_id = "sci_fck", + .clk = &mstp_clks[MSTP028], + }, { + /* SCIF3 */ + .dev_id = "sh-sci.3", + .con_id = "sci_fck", + .clk = &mstp_clks[MSTP027], + }, { + /* SCIF2 */ + .dev_id = "sh-sci.2", + .con_id = "sci_fck", + .clk = &mstp_clks[MSTP026], + }, { + /* SCIF1 */ + .dev_id = "sh-sci.1", + .con_id = "sci_fck", + .clk = &mstp_clks[MSTP025], + }, { + /* SCIF0 */ + .dev_id = "sh-sci.0", + .con_id = "sci_fck", + .clk = &mstp_clks[MSTP024], + }, + CLKDEV_CON_ID("ssi3_fck", &mstp_clks[MSTP023]), + CLKDEV_CON_ID("ssi2_fck", &mstp_clks[MSTP022]), + CLKDEV_CON_ID("ssi1_fck", &mstp_clks[MSTP021]), + CLKDEV_CON_ID("ssi0_fck", &mstp_clks[MSTP020]), + CLKDEV_CON_ID("hac1_fck", &mstp_clks[MSTP017]), + CLKDEV_CON_ID("hac0_fck", &mstp_clks[MSTP016]), + CLKDEV_CON_ID("i2c1_fck", &mstp_clks[MSTP015]), + CLKDEV_CON_ID("i2c0_fck", &mstp_clks[MSTP014]), { /* TMU0 */ .dev_id = "sh_tmu.0", @@ -191,7 +233,18 @@ static struct clk_lookup lookups[] = { .dev_id = "sh_tmu.11", .con_id = "tmu_fck", .clk = &mstp_clks[MSTP011], - } + }, + CLKDEV_CON_ID("sdif1_fck", &mstp_clks[MSTP005]), + CLKDEV_CON_ID("sdif0_fck", &mstp_clks[MSTP004]), + CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]), + CLKDEV_CON_ID("usb_fck", &mstp_clks[MSTP112]), + CLKDEV_CON_ID("pcie2_fck", &mstp_clks[MSTP110]), + CLKDEV_CON_ID("pcie1_fck", &mstp_clks[MSTP109]), + CLKDEV_CON_ID("pcie0_fck", &mstp_clks[MSTP108]), + CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]), + CLKDEV_CON_ID("dmac_5_0_fck", &mstp_clks[MSTP104]), + CLKDEV_CON_ID("du_fck", &mstp_clks[MSTP103]), + CLKDEV_CON_ID("ether_fck", &mstp_clks[MSTP102]), }; int __init arch_clk_init(void)