From patchwork Tue May 11 09:37:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 98676 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 o4B9YQFX007399 for ; Tue, 11 May 2010 09:35:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757747Ab0EKJfw (ORCPT ); Tue, 11 May 2010 05:35:52 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:47370 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757736Ab0EKJfv (ORCPT ); Tue, 11 May 2010 05:35:51 -0400 Received: by mail-pw0-f46.google.com with SMTP id 5so2125909pwi.19 for ; Tue, 11 May 2010 02:35:51 -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=uoJdAfnf6JEofrDsZcW8dCg3zBdxVVgIxyzRu13V75I=; b=pjWbh8rz4/NuM93XQg7Rj0g3mhWwC/mBKxH7N/r6f8zs+AGRKKAVwNuS2QqfzQFYcX 6zd/3rDtKbFqOeCfW5YofJtBJ3S78oLpie5mErfOdqiiOxtdbHFHxWHE3YF/UIfWysh1 kABudWCwGzrRNvsZDD5bEBI6K97e03ltAQ2gE= 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=K7gesF9E5jESbZSF5ul7lc1C5FaCeS8u+dyq3uN68x6ooIpCFM6KXheJiA+xxtIMxa wYpi//Jq6TWCZnukGlAy/+ZkEjbN1FphEzmvmNccrzagc5QbGdVTn5thvu9RN6Dhmdx2 gC+abBOhObWNuOVDY7Py0jNXO+RdAouFjXWfs= Received: by 10.115.102.16 with SMTP id e16mr4251969wam.117.1273570551553; Tue, 11 May 2010 02:35:51 -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 b6sm33640978wam.21.2010.05.11.02.35.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 May 2010 02:35:51 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org Date: Tue, 11 May 2010 18:37:05 +0900 Message-Id: <20100511093705.28210.6474.sendpatchset@t400s> In-Reply-To: <20100511093504.28210.25670.sendpatchset@t400s> References: <20100511093504.28210.25670.sendpatchset@t400s> Subject: [PATCH 14/15] sh: switch boards 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:53 +0000 (UTC) --- 0001/arch/sh/boards/mach-ecovec24/setup.c +++ work/arch/sh/boards/mach-ecovec24/setup.c 2010-05-11 18:00:17.000000000 +0900 @@ -710,8 +710,6 @@ static struct clk_ops fsimck_clk_ops = { }; static struct clk fsimckb_clk = { - .name = "fsimckb_clk", - .id = -1, .ops = &fsimck_clk_ops, .enable_reg = (void __iomem *)FCLKBCR, .rate = 0, /* unknown */ --- 0001/arch/sh/boards/mach-highlander/setup.c +++ work/arch/sh/boards/mach-highlander/setup.c 2010-05-11 18:07:01.000000000 +0900 @@ -14,6 +14,7 @@ * for more details. */ #include +#include #include #include #include @@ -26,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -326,7 +328,6 @@ static struct clk_ops ivdr_clk_ops = { }; static struct clk ivdr_clk = { - .name = "ivdr_clk", .ops = &ivdr_clk_ops, }; @@ -334,6 +335,13 @@ static struct clk *r7780rp_clocks[] = { &ivdr_clk, }; +#define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } + +static struct clk_lookup lookups[] = { + /* main clocks */ + CLKDEV_CON_ID("ivdr_clk", &ivdr_clk), +}; + static void r7780rp_power_off(void) { if (mach_is_r7780mp() || mach_is_r7785rp()) @@ -370,6 +378,8 @@ static void __init highlander_setup(char clk_enable(clk); } + clkdev_add_table(lookups, ARRAY_SIZE(lookups)); + __raw_writew(0x0000, PA_OBLED); /* Clear LED. */ if (mach_is_r7780rp()) --- 0001/arch/sh/boards/mach-se/7724/setup.c +++ work/arch/sh/boards/mach-se/7724/setup.c 2010-05-11 18:00:40.000000000 +0900 @@ -276,8 +276,6 @@ static struct clk_ops fsimck_clk_ops = { }; static struct clk fsimcka_clk = { - .name = "fsimcka_clk", - .id = -1, .ops = &fsimck_clk_ops, .enable_reg = (void __iomem *)FCLKACR, .rate = 0, /* unknown */