From patchwork Tue May 11 09:36:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 98671 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 o4B9YQFS007399 for ; Tue, 11 May 2010 09:35:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757723Ab0EKJfN (ORCPT ); Tue, 11 May 2010 05:35:13 -0400 Received: from mail-px0-f174.google.com ([209.85.212.174]:38941 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757719Ab0EKJfL (ORCPT ); Tue, 11 May 2010 05:35:11 -0400 Received: by pxi5 with SMTP id 5so2114444pxi.19 for ; Tue, 11 May 2010 02:35:11 -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=q6ANCg1nCTdi91YnfXg4inr9LHggLXr8qFU72jRCTMA=; b=ISzXLG5T0cGMlKLgst65n9bP5QDYcZlyv2bIZTxFKf9C4LDtk/P1gU6ozrTpbk1+9/ neJSiMiFarRPZ1/IbhMSzr3ICgZ5PY4rKla2loSWXMXE1Z/DGxcL+7J9atharJ++sOur hT1lE2TUkoWvwNM2brCpU47b60YVTBCmW29dE= 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=cmg9Y0H3SgzLBgOaG+3OmsqFGa5vy+67Ubxb24ZZ0H5Bfpya8vouvqmouHElxBvLkl LPx4/k3JJe5xTg2515Pl07jJR5kDHrq+iubyoailGMiZnKIJTkyt0TLfPX7ihZFSJ/1g +/Xwo4d5xTgBCxjBt5l/unmqey3x510DQPJc4= Received: by 10.115.64.5 with SMTP id r5mr4200639wak.180.1273570511335; Tue, 11 May 2010 02:35:11 -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 c22sm33643732wam.6.2010.05.11.02.35.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 May 2010 02:35:10 -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:24 +0900 Message-Id: <20100511093624.28210.14137.sendpatchset@t400s> In-Reply-To: <20100511093504.28210.25670.sendpatchset@t400s> References: <20100511093504.28210.25670.sendpatchset@t400s> Subject: [PATCH 09/15] sh: switch sh7780 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:13 +0000 (UTC) --- 0001/arch/sh/kernel/cpu/sh4a/clock-sh7780.c +++ work/arch/sh/kernel/cpu/sh4a/clock-sh7780.c 2010-05-11 17:14:17.000000000 +0900 @@ -11,6 +11,8 @@ */ #include #include +#include +#include #include #include #include @@ -83,7 +85,6 @@ static struct clk_ops sh7780_shyway_clk_ }; static struct clk sh7780_shyway_clk = { - .name = "shyway_clk", .flags = CLK_ENABLE_ON_INIT, .ops = &sh7780_shyway_clk_ops, }; @@ -96,6 +97,13 @@ static struct clk *sh7780_onchip_clocks[ &sh7780_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", &sh7780_shyway_clk), +}; + int __init arch_clk_init(void) { struct clk *clk; @@ -113,5 +121,7 @@ int __init arch_clk_init(void) clk_put(clk); + clkdev_add_table(lookups, ARRAY_SIZE(lookups)); + return ret; }