From cdf78ac85c5a4e22e7d5f0e20b0b5de6932f42bd Mon Sep 17 00:00:00 2001 From: Kevin Hilman Date: Wed, 23 Mar 2011 16:09:41 -0700 Subject: [PATCH] --- yaml --- r: 272717 b: refs/heads/master c: aae030fa329307895eb935b057a72b12c6bd678b h: refs/heads/master i: 272715: 31b8b1f555558a5efd787bc8a186d31201ed6bba v: v3 --- [refs] | 2 +- trunk/arch/arm/mach-omap2/Makefile | 3 +- trunk/arch/arm/mach-omap2/io.c | 2 ++ .../arm/mach-omap2/powerdomain2xxx_3xxx.c | 2 +- .../arm/mach-omap2/powerdomains2xxx_data.c | 4 +++ trunk/arch/arm/mach-omap2/voltage.h | 1 + .../arm/mach-omap2/voltagedomains2xxx_data.c | 32 +++++++++++++++++++ 7 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 trunk/arch/arm/mach-omap2/voltagedomains2xxx_data.c diff --git a/[refs] b/[refs] index 1a83e3c69446..3b6119d605eb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8f1bec246c44d936a02cc6b781bfd9ba670d7e45 +refs/heads/master: aae030fa329307895eb935b057a72b12c6bd678b diff --git a/trunk/arch/arm/mach-omap2/Makefile b/trunk/arch/arm/mach-omap2/Makefile index 5a6fe735b566..cce9bc300af5 100644 --- a/trunk/arch/arm/mach-omap2/Makefile +++ b/trunk/arch/arm/mach-omap2/Makefile @@ -91,7 +91,8 @@ obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \ # OMAP voltage domains ifeq ($(CONFIG_PM),y) voltagedomain-common := voltage.o -obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) +obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) \ + voltagedomains2xxx_data.o obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \ voltagedomains3xxx_data.o obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ diff --git a/trunk/arch/arm/mach-omap2/io.c b/trunk/arch/arm/mach-omap2/io.c index 7c36fde5dd62..7802e84f42c7 100644 --- a/trunk/arch/arm/mach-omap2/io.c +++ b/trunk/arch/arm/mach-omap2/io.c @@ -342,10 +342,12 @@ void __init omap2_init_common_infrastructure(void) u8 postsetup_state; if (cpu_is_omap242x()) { + omap2xxx_voltagedomains_init(); omap242x_powerdomains_init(); omap242x_clockdomains_init(); omap2420_hwmod_init(); } else if (cpu_is_omap243x()) { + omap2xxx_voltagedomains_init(); omap243x_powerdomains_init(); omap243x_clockdomains_init(); omap2430_hwmod_init(); diff --git a/trunk/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c b/trunk/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c index cf600e22bf8e..6a17e4ca1d79 100644 --- a/trunk/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c +++ b/trunk/arch/arm/mach-omap2/powerdomain2xxx_3xxx.c @@ -1,7 +1,7 @@ /* * OMAP2 and OMAP3 powerdomain control * - * Copyright (C) 2009-2010 Texas Instruments, Inc. + * Copyright (C) 2009-2011 Texas Instruments, Inc. * Copyright (C) 2007-2009 Nokia Corporation * * Derived from mach-omap2/powerdomain.c written by Paul Walmsley diff --git a/trunk/arch/arm/mach-omap2/powerdomains2xxx_data.c b/trunk/arch/arm/mach-omap2/powerdomains2xxx_data.c index bb4394e3b621..2385c1f009ee 100644 --- a/trunk/arch/arm/mach-omap2/powerdomains2xxx_data.c +++ b/trunk/arch/arm/mach-omap2/powerdomains2xxx_data.c @@ -37,6 +37,7 @@ static struct powerdomain dsp_pwrdm = { .pwrsts_mem_on = { [0] = PWRSTS_ON, }, + .voltdm = { .name = "core" }, }; static struct powerdomain mpu_24xx_pwrdm = { @@ -51,6 +52,7 @@ static struct powerdomain mpu_24xx_pwrdm = { .pwrsts_mem_on = { [0] = PWRSTS_ON, }, + .voltdm = { .name = "core" }, }; static struct powerdomain core_24xx_pwrdm = { @@ -68,6 +70,7 @@ static struct powerdomain core_24xx_pwrdm = { [1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */ [2] = PWRSTS_OFF_RET_ON, /* MEM3ONSTATE */ }, + .voltdm = { .name = "core" }, }; @@ -89,6 +92,7 @@ static struct powerdomain mdm_pwrdm = { .pwrsts_mem_on = { [0] = PWRSTS_ON, /* MEMONSTATE */ }, + .voltdm = { .name = "core" }, }; /* diff --git a/trunk/arch/arm/mach-omap2/voltage.h b/trunk/arch/arm/mach-omap2/voltage.h index 25cfb5c8f06b..cacd76e1e2c3 100644 --- a/trunk/arch/arm/mach-omap2/voltage.h +++ b/trunk/arch/arm/mach-omap2/voltage.h @@ -180,6 +180,7 @@ static inline int omap_voltage_late_init(void) } #endif +extern void omap2xxx_voltagedomains_init(void); extern void omap3xxx_voltagedomains_init(void); extern void omap44xx_voltagedomains_init(void); diff --git a/trunk/arch/arm/mach-omap2/voltagedomains2xxx_data.c b/trunk/arch/arm/mach-omap2/voltagedomains2xxx_data.c new file mode 100644 index 000000000000..7a41349981e5 --- /dev/null +++ b/trunk/arch/arm/mach-omap2/voltagedomains2xxx_data.c @@ -0,0 +1,32 @@ +/* + * OMAP3 voltage domain data + * + * Copyright (C) 2011 Texas Instruments, Inc. + * + * 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. + */ +#include +#include + +#include "voltage.h" + +static struct voltagedomain omap2_voltdm_core = { + .name = "core", +}; + +static struct voltagedomain omap2_voltdm_wkup = { + .name = "wakeup", +}; + +static struct voltagedomain *voltagedomains_omap2[] __initdata = { + &omap2_voltdm_core, + &omap2_voltdm_wkup, + NULL, +}; + +void __init omap2xxx_voltagedomains_init(void) +{ + voltdm_init(voltagedomains_omap2); +}