From patchwork Wed Oct 20 01:02:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 266921 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 o9K12UsM025308 for ; Wed, 20 Oct 2010 01:02:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754821Ab0JTBC1 (ORCPT ); Tue, 19 Oct 2010 21:02:27 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:45097 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754003Ab0JTBC0 (ORCPT ); Tue, 19 Oct 2010 21:02:26 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o9K12Px3018822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Oct 2010 20:02:25 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o9K12Ois019802; Tue, 19 Oct 2010 20:02:24 -0500 (CDT) 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 o9K12Of07295; Tue, 19 Oct 2010 20:02:24 -0500 (CDT) Received: by senorita (Postfix, from userid 1000) id CC40AC296; Tue, 19 Oct 2010 20:02:23 -0500 (CDT) From: Nishanth Menon To: l-o Cc: Kevin H , Tony , Nishanth Menon Subject: [PATCH 2/3 v2] omap4: opp: add OPP table data Date: Tue, 19 Oct 2010 20:02:22 -0500 Message-Id: <1287536543-9729-3-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1287536543-9729-2-git-send-email-nm@ti.com> References: <1287536543-9729-1-git-send-email-nm@ti.com> <1287536543-9729-2-git-send-email-nm@ti.com> 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]); Wed, 20 Oct 2010 01:02:30 +0000 (UTC) diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 3eb367a..12fefdb 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -44,6 +44,7 @@ config ARCH_OMAP4 depends on ARCH_OMAP2PLUS select CPU_V7 select ARM_GIC + 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 9342986..2266c1f 100644 --- a/arch/arm/mach-omap2/opp.c +++ b/arch/arm/mach-omap2/opp.c @@ -61,6 +61,7 @@ struct omap_opp_def { } #include "opp3xxx_data.h" +#include "opp4xxx_data.h" /* Temp variable to allow multiple calls */ static u8 __initdata omap_table_init; @@ -86,7 +87,10 @@ int __init omap_init_opp_table(void) omap_table_init = 1; /* Select the OPP table we'd like to enable based on cpu we are on */ - if (cpu_is_omap34xx()) { + if (cpu_is_omap44xx()) { + opp_def = omap44xx_opp_def_list; + opp_def_size = ARRAY_SIZE(omap44xx_opp_def_list); + } else if (cpu_is_omap34xx()) { opp_def = cpu_is_omap3630() ? omap36xx_opp_def_list : omap34xx_opp_def_list; opp_def_size = cpu_is_omap3630() ? 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__ */