From patchwork Wed Jan 30 14:32:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 2067841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 3971E3FD2B for ; Wed, 30 Jan 2013 14:34:59 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U0YiS-000083-2k; Wed, 30 Jan 2013 14:32:44 +0000 Received: from co9ehsobe005.messaging.microsoft.com ([207.46.163.28] helo=co9outboundpool.messaging.microsoft.com) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U0YiP-00005O-2g for linux-arm-kernel@lists.infradead.org; Wed, 30 Jan 2013 14:32:41 +0000 Received: from mail128-co9-R.bigfish.com (10.236.132.231) by CO9EHSOBE026.bigfish.com (10.236.130.89) with Microsoft SMTP Server id 14.1.225.23; Wed, 30 Jan 2013 14:32:38 +0000 Received: from mail128-co9 (localhost [127.0.0.1]) by mail128-co9-R.bigfish.com (Postfix) with ESMTP id 5A343C020B; Wed, 30 Jan 2013 14:32:38 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275dhz2dh87h2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h1155h) X-FB-DOMAIN-IP-MATCH: fail Received: from mail128-co9 (localhost.localdomain [127.0.0.1]) by mail128-co9 (MessageSwitch) id 1359556356725562_4853; Wed, 30 Jan 2013 14:32:36 +0000 (UTC) Received: from CO9EHSMHS015.bigfish.com (unknown [10.236.132.250]) by mail128-co9.bigfish.com (Postfix) with ESMTP id A50D358005A; Wed, 30 Jan 2013 14:32:36 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO9EHSMHS015.bigfish.com (10.236.130.25) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 30 Jan 2013 14:32:34 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.318.3; Wed, 30 Jan 2013 14:32:33 +0000 Received: from S2101-09.ap.freescale.net ([10.192.185.101]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r0UEWTsY004516; Wed, 30 Jan 2013 07:32:30 -0700 From: Shawn Guo To: , Subject: [PATCH] ARM: omap2: register cpufreq-cpu0 device for am33xx Date: Wed, 30 Jan 2013 22:32:22 +0800 Message-ID: <1359556342-17020-1-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: sigmatel.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130130_093241_279585_AFA7C849 X-CRM114-Status: GOOD ( 12.33 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [207.46.163.28 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Tony Lindgren , Shawn Guo , AnilKumar Ch X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The cpufreq-cpu0 driver changes to instantiate use platform_driver mechanism. The patch is an am33xx platform level adaptation for it. Signed-off-by: Shawn Guo Tested-by: AnilKumar Ch --- arch/arm/mach-omap2/board-generic.c | 1 + arch/arm/mach-omap2/cclock33xx_data.c | 2 +- arch/arm/mach-omap2/common.h | 1 + arch/arm/mach-omap2/io.c | 8 ++++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 53cb380b..b945480 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -139,6 +139,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)") .init_irq = omap_intc_of_init, .handle_irq = omap3_intc_handle_irq, .init_machine = omap_generic_init, + .init_late = am33xx_init_late, .timer = &omap3_am33xx_timer, .dt_compat = am33xx_boards_compat, MACHINE_END diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c index ea64ad6..acb1620 100644 --- a/arch/arm/mach-omap2/cclock33xx_data.c +++ b/arch/arm/mach-omap2/cclock33xx_data.c @@ -850,7 +850,7 @@ static struct omap_clk am33xx_clks[] = { CLK(NULL, "dpll_core_m5_ck", &dpll_core_m5_ck, CK_AM33XX), CLK(NULL, "dpll_core_m6_ck", &dpll_core_m6_ck, CK_AM33XX), CLK(NULL, "dpll_mpu_ck", &dpll_mpu_ck, CK_AM33XX), - CLK("cpu0", NULL, &dpll_mpu_ck, CK_AM33XX), + CLK("cpufreq-cpu0.0", NULL, &dpll_mpu_ck, CK_AM33XX), CLK(NULL, "dpll_mpu_m2_ck", &dpll_mpu_m2_ck, CK_AM33XX), CLK(NULL, "dpll_ddr_ck", &dpll_ddr_ck, CK_AM33XX), CLK(NULL, "dpll_ddr_m2_ck", &dpll_ddr_m2_ck, CK_AM33XX), diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 948bcaa..e3355df5 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -106,6 +106,7 @@ void omap2430_init_late(void); void omap3430_init_late(void); void omap35xx_init_late(void); void omap3630_init_late(void); +void am33xx_init_late(void); void am35xx_init_late(void); void ti81xx_init_late(void); void omap4430_init_late(void); diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 2c3fdd6..0e67711 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -535,6 +535,14 @@ void __init omap3630_init_late(void) omap2_clk_enable_autoidle_all(); } +void __init am33xx_init_late(void) +{ + struct platform_device_info devinfo = { .name = "cpufreq-cpu0", }; + + if (IS_ENABLED(CONFIG_GENERIC_CPUFREQ_CPU0)) + platform_device_register_full(&devinfo); +} + void __init am35xx_init_late(void) { omap_mux_late_init();