From patchwork Tue May 11 09:36:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 98673 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 o4B9YQFU007399 for ; Tue, 11 May 2010 09:35:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757724Ab0EKJf3 (ORCPT ); Tue, 11 May 2010 05:35:29 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:46813 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756024Ab0EKJf1 (ORCPT ); Tue, 11 May 2010 05:35:27 -0400 Received: by pvb32 with SMTP id 32so437792pvb.19 for ; Tue, 11 May 2010 02:35:27 -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=jhrEcxIGDiLWg6zmHDsG2ma5i/XJaU+mKiKCIIATuAI=; b=VtQx3IvN4FC3NfjiedVkR+EpEemXmn5q5GghZ0x32ttAMQpJFuDq/OwCSUr7wc/lG9 RdWPANsz6+wAnZYxZT+bkQu1G8fZMtDidMy9eWKVHC7ObWZJGgBDJruK/aBzg9cMdNiz QZ9o+OMJVT9TwLpmradaC9NZTijRjC5PFJubk= 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=SDLHr/CYdVmsK+dQRGpplyAYuiehURDFmDGw/ZoH0h7B65npHMZplZRodlKG60Bgml Y5VavA9EzgE7X7YMjhW+YMc8tfsY57V0y8vlUwweL8o111H4Msf2pqqRijQ+xfiEmy07 qvPc8M7CEJgyQ/tLXkwRwRcAGyxJkj3aoRJgw= Received: by 10.115.80.7 with SMTP id h7mr4214710wal.159.1273570527241; Tue, 11 May 2010 02:35:27 -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 c22sm33645221wam.18.2010.05.11.02.35.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 May 2010 02:35:26 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Tue, 11 May 2010 18:36:40 +0900 Message-Id: <20100511093640.28210.69602.sendpatchset@t400s> In-Reply-To: <20100511093504.28210.25670.sendpatchset@t400s> References: <20100511093504.28210.25670.sendpatchset@t400s> Subject: [PATCH 11/15] sh: switch sh7757 to clkdev 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 09:35:29 +0000 (UTC) --- 0001/arch/sh/kernel/cpu/sh4a/clock-sh7757.c +++ work/arch/sh/kernel/cpu/sh4a/clock-sh7757.c 2010-05-11 17:36:46.000000000 +0900 @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -87,7 +88,6 @@ static struct clk_ops sh7757_shyway_clk_ }; static struct clk sh7757_shyway_clk = { - .name = "shyway_clk", .flags = CLK_ENABLE_ON_INIT, .ops = &sh7757_shyway_clk_ops, }; @@ -100,6 +100,13 @@ static struct clk *sh7757_onchip_clocks[ &sh7757_shyway_clk, }; +#define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } + +static struct clk_lookup lookups[] = { + /* main clocks */ + CLKDEV_CON_ID("shyway_clk", &sh7757_shyway_clk), +}; + static int __init sh7757_clk_init(void) { struct clk *clk = clk_get(NULL, "master_clk"); @@ -123,6 +130,8 @@ static int __init sh7757_clk_init(void) clk_put(clk); + clkdev_add_table(lookups, ARRAY_SIZE(lookups)); + return 0; }