From patchwork Tue May 11 09:36:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 98675 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 o4B9YQFW007399 for ; Tue, 11 May 2010 09:35:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757739Ab0EKJfo (ORCPT ); Tue, 11 May 2010 05:35:44 -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 S1757729Ab0EKJfo (ORCPT ); Tue, 11 May 2010 05:35:44 -0400 Received: by mail-pw0-f46.google.com with SMTP id 5so2125909pwi.19 for ; Tue, 11 May 2010 02:35:44 -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=IIcDkvDM+Fzx+y/NtZyEIDf+uprxko1I62Ira6KGEDg=; b=G6OFpStKpUjFHb6h3jdD2OUvmZmQdbplV/ThZ2+MfLp9QJaT/xny0BVFjOFCtWXQ6L IKfWdyGByDtwtnreCNIm3Kq3pbPHG2E3F2sjR26mkuFmbOpBiEkOSdj18QwJMYyTZdiv szUWzukVWZfqD9ZTLAJfiyAwkBBkl8Mm+y/IA= 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=yF7h2nG9aopUPZwhVTFclu1ZUrp96eyWYYFowdIkZ30yc2snqZU/TFxqnzTN1+348N gdTMa8kID9WVJRD0NoFeuqiqn/77J6x8M2IxT+UMOpmplWE5tU2f2vf6VQZ7SH0gcsrJ B0ranctzx6zD4uxV79ClWFifEQle4YckQv7QM= Received: by 10.114.237.16 with SMTP id k16mr4250006wah.26.1273570543975; Tue, 11 May 2010 02:35:43 -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 r20sm33652082wam.5.2010.05.11.02.35.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 May 2010 02:35:43 -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:57 +0900 Message-Id: <20100511093657.28210.22731.sendpatchset@t400s> In-Reply-To: <20100511093504.28210.25670.sendpatchset@t400s> References: <20100511093504.28210.25670.sendpatchset@t400s> Subject: [PATCH 13/15] sh: switch sh4-202 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:45 +0000 (UTC) --- 0001/arch/sh/kernel/cpu/sh4/clock-sh4-202.c +++ work/arch/sh/kernel/cpu/sh4/clock-sh4-202.c 2010-05-11 17:47:17.000000000 +0900 @@ -12,9 +12,10 @@ #include #include #include +#include +#include #include #include -#include #define CPG2_FRQCR3 0xfe0a0018 @@ -45,7 +46,6 @@ static struct clk_ops sh4202_emi_clk_ops }; static struct clk sh4202_emi_clk = { - .name = "emi_clk", .flags = CLK_ENABLE_ON_INIT, .ops = &sh4202_emi_clk_ops, }; @@ -61,7 +61,6 @@ static struct clk_ops sh4202_femi_clk_op }; static struct clk sh4202_femi_clk = { - .name = "femi_clk", .flags = CLK_ENABLE_ON_INIT, .ops = &sh4202_femi_clk_ops, }; @@ -139,7 +138,6 @@ static struct clk_ops sh4202_shoc_clk_op }; static struct clk sh4202_shoc_clk = { - .name = "shoc_clk", .flags = CLK_ENABLE_ON_INIT, .ops = &sh4202_shoc_clk_ops, }; @@ -150,6 +148,15 @@ static struct clk *sh4202_onchip_clocks[ &sh4202_shoc_clk, }; +#define CLKDEV_CON_ID(_id, _clk) { .con_id = _id, .clk = _clk } + +static struct clk_lookup lookups[] = { + /* main clocks */ + CLKDEV_CON_ID("emi_clk", &sh4202_emi_clk), + CLKDEV_CON_ID("femi_clk", &sh4202_femi_clk), + CLKDEV_CON_ID("shoc_clk", &sh4202_shoc_clk), +}; + int __init arch_clk_init(void) { struct clk *clk; @@ -167,5 +174,7 @@ int __init arch_clk_init(void) clk_put(clk); + clkdev_add_table(lookups, ARRAY_SIZE(lookups)); + return ret; }