From patchwork Mon Nov 15 19:27:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 326042 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAFJRkF0013606 for ; Mon, 15 Nov 2010 19:27:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933579Ab0KOT1o (ORCPT ); Mon, 15 Nov 2010 14:27:44 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:54324 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757357Ab0KOT1o (ORCPT ); Mon, 15 Nov 2010 14:27:44 -0500 Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id oAFJRhuI010917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Nov 2010 13:27:43 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id oAFJRgMl004351; Mon, 15 Nov 2010 13:27:42 -0600 (CST) Received: from senorita (senorita.am.dhcp.ti.com [128.247.74.250]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id oAFJRgf03982; Mon, 15 Nov 2010 13:27:42 -0600 (CST) Received: by senorita (Postfix, from userid 1000) id 2FCA3C1EF; Mon, 15 Nov 2010 13:27:41 -0600 (CST) From: Nishanth Menon To: linux-omap Cc: Tony Subject: [PATCH v3 2/3] omap4: opp: add OPP table data Date: Mon, 15 Nov 2010 13:27:40 -0600 Message-Id: <1289849261-29767-3-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <[PATCH 0/3 v2] omap: opp: Add opp data> References: <[PATCH 0/3 v2] omap: opp: Add opp data> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 15 Nov 2010 19:27:47 +0000 (UTC) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 93a91ff..0f1855a 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -45,6 +45,7 @@ config ARCH_OMAP4 select ARM_GIC select PL310_ERRATA_588369 select ARM_ERRATA_720789 + select PM_OPP if PM comment "OMAP Core Type" depends on ARCH_OMAP2 diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c index 79c711c..d1012bd 100644 --- a/arch/arm/mach-omap2/opp.c +++ b/arch/arm/mach-omap2/opp.c @@ -152,3 +152,21 @@ int __init omap3_opp_init(void) } device_initcall(omap3_opp_init); +/* omap4 opps */ +#include "opp4xxx_data.h" +/** + * omap4_opp_init() - initialize omap4 opp table + */ +int __init omap4_opp_init(void) +{ + int r = -ENODEV; + + if (!cpu_is_omap44xx()) + return r; + + r = omap_init_opp_table(omap44xx_opp_def_list, + ARRAY_SIZE(omap44xx_opp_def_list)); + + return r; +} +device_initcall(omap4_opp_init); diff --git a/arch/arm/mach-omap2/opp4xxx_data.h b/arch/arm/mach-omap2/opp4xxx_data.h new file mode 100644 index 0000000..2e5fe67 --- /dev/null +++ b/arch/arm/mach-omap2/opp4xxx_data.h @@ -0,0 +1,37 @@ +/* + * OMAP4 OPP table definitions. + * + * Copyright (C) 2009 - 2010 Texas Instruments Incorporated. + * Nishanth Menon + * Copyright (C) 2009 - 2010 Deep Root Systems, LLC. + * Kevin Hilman + * Copyright (C) 2010 Nokia Corporation. + * Eduardo Valentin + * Copyright (C) 2010 Texas Instruments Incorporated. + * Thara Gopinath + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __ASM_PLAT_OPP_OMAP4XXX_H__ +#define __ASM_PLAT_OPP_OMAP4XXX_H__ + +static struct omap_opp_def __initdata omap44xx_opp_def_list[] = { + /* MPU OPP1 - OPP50 */ + OPP_INITIALIZER("mpu", true, 300000000, 1100000), + /* MPU OPP2 - OPP100 */ + OPP_INITIALIZER("mpu", true, 600000000, 1200000), + /* MPU OPP3 - OPP-Turbo */ + OPP_INITIALIZER("mpu", false, 800000000, 1260000), + /* MPU OPP4 - OPP-SB */ + OPP_INITIALIZER("mpu", false, 1008000000, 1350000), + /* L3 OPP1 - OPP50 */ + OPP_INITIALIZER("l3_main_1", true, 100000000, 930000), + /* L3 OPP2 - OPP100, OPP-Turbo, OPP-SB */ + OPP_INITIALIZER("l3_main_1", true, 200000000, 1100000), + /* TODO: add IVA, DSP, aess, fdif, gpu */ +}; + +#endif /* __ASM_PLAT_OPP_OMAP4XXX_H__ */ diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 2031f15..a43e069 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -22,11 +22,16 @@ extern int omap3_idle_init(void); #if defined(CONFIG_PM_OPP) extern int omap3_opp_init(void); +extern int omap4_opp_init(void); #else static inline int omap3_opp_init(void) { return -EINVAL; } +static inline int omap4_opp_init(void) +{ + return -EINVAL; +} #endif struct cpuidle_params {