From patchwork Tue May 11 09:36:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 98674 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 o4B9YQFV007399 for ; Tue, 11 May 2010 09:35:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757730Ab0EKJfh (ORCPT ); Tue, 11 May 2010 05:35:37 -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 S1757728Ab0EKJfh (ORCPT ); Tue, 11 May 2010 05:35:37 -0400 Received: by pwi5 with SMTP id 5so2125909pwi.19 for ; Tue, 11 May 2010 02:35:36 -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=vNSXdQFNoubPz6NuHSgUolPIG9B5NDy1puXyyMDMZ3A=; b=w59HLkad6Fb7ZwsmFl2u++QVpX85yDydnVWYcpJh2RoCfC4XPRC+M1tmsUSPDj9GCI WNtE/GfE3N4LIJ7A4EyFjXr3uwcYCVtvOzDmkBuhGZfQxrRpzWUOaqUHvc8SYgcplyM7 CuqrLBwr8xTbEEgxAP2A0lGTeX4Qg7HnbROpg= 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=U+SvEStyoHADqmikZ9RRFJYBqCuQB4FG1/+4TN0dNa4+3GUhc04MT9iI1vAw/NE67C wcYzWiipQvHBX7cTAy6v+XTmuG9SimU/CmAIp3W/3SLQGJdH85Ydl7aYKWex/Ya9WWQp xAeCTp5rhMK9sEwXnnt/TUE9jKjKc8yRlFS2o= Received: by 10.114.33.18 with SMTP id g18mr4272323wag.2.1273570536003; Tue, 11 May 2010 02:35:36 -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 r20sm33651211wam.5.2010.05.11.02.35.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 May 2010 02:35:35 -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:48 +0900 Message-Id: <20100511093648.28210.33129.sendpatchset@t400s> In-Reply-To: <20100511093504.28210.25670.sendpatchset@t400s> References: <20100511093504.28210.25670.sendpatchset@t400s> Subject: [PATCH 12/15] sh: switch shx3 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:38 +0000 (UTC) --- 0001/arch/sh/kernel/cpu/sh4a/clock-shx3.c +++ work/arch/sh/kernel/cpu/sh4a/clock-shx3.c 2010-05-11 17:42:01.000000000 +0900 @@ -13,9 +13,10 @@ */ #include #include +#include +#include #include #include -#include static int ifc_divisors[] = { 1, 2, 4 ,6 }; static int bfc_divisors[] = { 1, 1, 1, 1, 1, 12, 16, 18, 24, 32, 36, 48 }; @@ -94,7 +95,6 @@ static struct clk_ops shx3_shyway_clk_op }; static struct clk shx3_shyway_clk = { - .name = "shyway_clk", .flags = CLK_ENABLE_ON_INIT, .ops = &shx3_shyway_clk_ops, }; @@ -107,6 +107,13 @@ static struct clk *shx3_onchip_clocks[] &shx3_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", &shx3_shyway_clk), +}; + int __init arch_clk_init(void) { struct clk *clk; @@ -124,5 +131,7 @@ int __init arch_clk_init(void) clk_put(clk); + clkdev_add_table(lookups, ARRAY_SIZE(lookups)); + return ret; }