aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2010-12-09 10:13:47 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-12-21 17:30:40 -0500
commitf5a6422d4e0e85a9c7f5522d3321254bfdfa7f04 (patch)
treefc8b5bb5b1beae385b7f150159d70e52b287fdd8 /arch/arm
parentfd1478cd61624479c89e35602925459d74505ff3 (diff)
omap4: opp: add OPP table data
This patch adds OPP tables for OMAP4. New file has been added to keep the OMAP4 opp tables and the registration of these tables with the generic opp framework by OMAP SoC OPP interface. Based on: http://dev.omapzoom.org/?p=santosh/kernel-omap4-base.git;a=blob;f=arch/arm/mach-omap2/opp44xx_data.c;h=252e3d0cb6050a64f390b9311c1c4977d74f762a;hb=refs/heads/omap4_next Signed-off-by: Thara Gopinath <thara@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/Kconfig2
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/opp4xxx_data.c57
-rw-r--r--arch/arm/mach-omap2/pm.h5
4 files changed, 65 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index e752cb397ba7..3e8c9e859f98 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -46,6 +46,8 @@ config ARCH_OMAP4
46 select ARM_GIC 46 select ARM_GIC
47 select PL310_ERRATA_588369 47 select PL310_ERRATA_588369
48 select ARM_ERRATA_720789 48 select ARM_ERRATA_720789
49 select ARCH_HAS_OPP
50 select PM_OPP if PM
49 51
50comment "OMAP Core Type" 52comment "OMAP Core Type"
51 depends on ARCH_OMAP2 53 depends on ARCH_OMAP2
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index fa16806092e5..e11943d77fe0 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -53,6 +53,7 @@ obj-$(CONFIG_ARCH_OMAP2) += sdrc2xxx.o
53ifeq ($(CONFIG_PM_OPP),y) 53ifeq ($(CONFIG_PM_OPP),y)
54obj-y += opp.o 54obj-y += opp.o
55obj-$(CONFIG_ARCH_OMAP3) += opp3xxx_data.o 55obj-$(CONFIG_ARCH_OMAP3) += opp3xxx_data.o
56obj-$(CONFIG_ARCH_OMAP4) += opp4xxx_data.o
56endif 57endif
57 58
58# Power Management 59# Power Management
diff --git a/arch/arm/mach-omap2/opp4xxx_data.c b/arch/arm/mach-omap2/opp4xxx_data.c
new file mode 100644
index 000000000000..a11fa566d8ee
--- /dev/null
+++ b/arch/arm/mach-omap2/opp4xxx_data.c
@@ -0,0 +1,57 @@
1/*
2 * OMAP4 OPP table definitions.
3 *
4 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
5 * Nishanth Menon
6 * Kevin Hilman
7 * Thara Gopinath
8 * Copyright (C) 2010 Nokia Corporation.
9 * Eduardo Valentin
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 *
15 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
16 * kind, whether express or implied; without even the implied warranty
17 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 */
20#include <linux/module.h>
21
22#include <plat/cpu.h>
23
24#include "omap_opp_data.h"
25
26static struct omap_opp_def __initdata omap44xx_opp_def_list[] = {
27 /* MPU OPP1 - OPP50 */
28 OPP_INITIALIZER("mpu", true, 300000000, 1100000),
29 /* MPU OPP2 - OPP100 */
30 OPP_INITIALIZER("mpu", true, 600000000, 1200000),
31 /* MPU OPP3 - OPP-Turbo */
32 OPP_INITIALIZER("mpu", false, 800000000, 1260000),
33 /* MPU OPP4 - OPP-SB */
34 OPP_INITIALIZER("mpu", false, 1008000000, 1350000),
35 /* L3 OPP1 - OPP50 */
36 OPP_INITIALIZER("l3_main_1", true, 100000000, 930000),
37 /* L3 OPP2 - OPP100, OPP-Turbo, OPP-SB */
38 OPP_INITIALIZER("l3_main_1", true, 200000000, 1100000),
39 /* TODO: add IVA, DSP, aess, fdif, gpu */
40};
41
42/**
43 * omap4_opp_init() - initialize omap4 opp table
44 */
45static int __init omap4_opp_init(void)
46{
47 int r = -ENODEV;
48
49 if (!cpu_is_omap44xx())
50 return r;
51
52 r = omap_init_opp_table(omap44xx_opp_def_list,
53 ARRAY_SIZE(omap44xx_opp_def_list));
54
55 return r;
56}
57device_initcall(omap4_opp_init);
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 2031f157a6ee..a43e0697b6bc 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);
22 22
23#if defined(CONFIG_PM_OPP) 23#if defined(CONFIG_PM_OPP)
24extern int omap3_opp_init(void); 24extern int omap3_opp_init(void);
25extern int omap4_opp_init(void);
25#else 26#else
26static inline int omap3_opp_init(void) 27static inline int omap3_opp_init(void)
27{ 28{
28 return -EINVAL; 29 return -EINVAL;
29} 30}
31static inline int omap4_opp_init(void)
32{
33 return -EINVAL;
34}
30#endif 35#endif
31 36
32struct cpuidle_params { 37struct cpuidle_params {