diff options
| author | Tony Lindgren <tony@atomide.com> | 2012-06-26 09:55:23 -0400 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2012-06-26 09:55:23 -0400 |
| commit | 9e74f218abd04dfa082391672295ecc1a3654845 (patch) | |
| tree | d668104b1021bcc737b5fadc7992f45a4c638705 | |
| parent | b955eefc46a6923424cbede2f8ab76c8f5acf056 (diff) | |
| parent | 21ff63ad131218048525fbd37d065ce61f03bcbd (diff) | |
Merge branch 'for_3.6/pm/sr-move' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into devel-driver
| -rw-r--r-- | arch/arm/mach-omap2/Makefile | 5 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 12 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 3 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/pm.h | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/smartreflex-class3.c | 29 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/sr_device.c | 39 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/voltage.h | 21 | ||||
| -rw-r--r-- | arch/arm/plat-omap/Kconfig | 31 | ||||
| -rw-r--r-- | arch/arm/plat-omap/include/plat/voltage.h | 21 | ||||
| -rw-r--r-- | drivers/power/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/power/Makefile | 1 | ||||
| -rw-r--r-- | drivers/power/avs/Kconfig | 12 | ||||
| -rw-r--r-- | drivers/power/avs/Makefile | 1 | ||||
| -rw-r--r-- | drivers/power/avs/smartreflex.c (renamed from arch/arm/mach-omap2/smartreflex.c) | 161 | ||||
| -rw-r--r-- | include/linux/power/smartreflex.h (renamed from arch/arm/mach-omap2/smartreflex.h) | 74 |
15 files changed, 235 insertions, 179 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index fa742f3c2629..f74e975027b6 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
| @@ -70,8 +70,9 @@ obj-$(CONFIG_ARCH_OMAP3) += cpuidle34xx.o | |||
| 70 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o | 70 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o omap-mpuss-lowpower.o |
| 71 | obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o | 71 | obj-$(CONFIG_ARCH_OMAP4) += cpuidle44xx.o |
| 72 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o | 72 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o |
| 73 | obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o | 73 | |
| 74 | obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o | 74 | obj-$(CONFIG_POWER_AVS_OMAP) += sr_device.o |
| 75 | obj-$(CONFIG_POWER_AVS_OMAP_CLASS3) += smartreflex-class3.o | ||
| 75 | 76 | ||
| 76 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 | 77 | AFLAGS_sleep24xx.o :=-Wa,-march=armv6 |
| 77 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) | 78 | AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec) |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index b26d3c9bca16..ab1f40125ffd 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | * | 14 | * |
| 15 | * XXX these should be marked initdata for multi-OMAP kernels | 15 | * XXX these should be marked initdata for multi-OMAP kernels |
| 16 | */ | 16 | */ |
| 17 | #include <linux/power/smartreflex.h> | ||
| 18 | |||
| 17 | #include <plat/omap_hwmod.h> | 19 | #include <plat/omap_hwmod.h> |
| 18 | #include <mach/irqs.h> | 20 | #include <mach/irqs.h> |
| 19 | #include <plat/cpu.h> | 21 | #include <plat/cpu.h> |
| @@ -29,8 +31,6 @@ | |||
| 29 | #include <plat/dmtimer.h> | 31 | #include <plat/dmtimer.h> |
| 30 | 32 | ||
| 31 | #include "omap_hwmod_common_data.h" | 33 | #include "omap_hwmod_common_data.h" |
| 32 | |||
| 33 | #include "smartreflex.h" | ||
| 34 | #include "prm-regbits-34xx.h" | 34 | #include "prm-regbits-34xx.h" |
| 35 | #include "cm-regbits-34xx.h" | 35 | #include "cm-regbits-34xx.h" |
| 36 | #include "wd_timer.h" | 36 | #include "wd_timer.h" |
| @@ -1325,7 +1325,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_mpu_irqs[] = { | |||
| 1325 | }; | 1325 | }; |
| 1326 | 1326 | ||
| 1327 | static struct omap_hwmod omap34xx_sr1_hwmod = { | 1327 | static struct omap_hwmod omap34xx_sr1_hwmod = { |
| 1328 | .name = "sr1", | 1328 | .name = "smartreflex_mpu_iva", |
| 1329 | .class = &omap34xx_smartreflex_hwmod_class, | 1329 | .class = &omap34xx_smartreflex_hwmod_class, |
| 1330 | .main_clk = "sr1_fck", | 1330 | .main_clk = "sr1_fck", |
| 1331 | .prcm = { | 1331 | .prcm = { |
| @@ -1343,7 +1343,7 @@ static struct omap_hwmod omap34xx_sr1_hwmod = { | |||
| 1343 | }; | 1343 | }; |
| 1344 | 1344 | ||
| 1345 | static struct omap_hwmod omap36xx_sr1_hwmod = { | 1345 | static struct omap_hwmod omap36xx_sr1_hwmod = { |
| 1346 | .name = "sr1", | 1346 | .name = "smartreflex_mpu_iva", |
| 1347 | .class = &omap36xx_smartreflex_hwmod_class, | 1347 | .class = &omap36xx_smartreflex_hwmod_class, |
| 1348 | .main_clk = "sr1_fck", | 1348 | .main_clk = "sr1_fck", |
| 1349 | .prcm = { | 1349 | .prcm = { |
| @@ -1370,7 +1370,7 @@ static struct omap_hwmod_irq_info omap3_smartreflex_core_irqs[] = { | |||
| 1370 | }; | 1370 | }; |
| 1371 | 1371 | ||
| 1372 | static struct omap_hwmod omap34xx_sr2_hwmod = { | 1372 | static struct omap_hwmod omap34xx_sr2_hwmod = { |
| 1373 | .name = "sr2", | 1373 | .name = "smartreflex_core", |
| 1374 | .class = &omap34xx_smartreflex_hwmod_class, | 1374 | .class = &omap34xx_smartreflex_hwmod_class, |
| 1375 | .main_clk = "sr2_fck", | 1375 | .main_clk = "sr2_fck", |
| 1376 | .prcm = { | 1376 | .prcm = { |
| @@ -1388,7 +1388,7 @@ static struct omap_hwmod omap34xx_sr2_hwmod = { | |||
| 1388 | }; | 1388 | }; |
| 1389 | 1389 | ||
| 1390 | static struct omap_hwmod omap36xx_sr2_hwmod = { | 1390 | static struct omap_hwmod omap36xx_sr2_hwmod = { |
| 1391 | .name = "sr2", | 1391 | .name = "smartreflex_core", |
| 1392 | .class = &omap36xx_smartreflex_hwmod_class, | 1392 | .class = &omap36xx_smartreflex_hwmod_class, |
| 1393 | .main_clk = "sr2_fck", | 1393 | .main_clk = "sr2_fck", |
| 1394 | .prcm = { | 1394 | .prcm = { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index f30e861ce6d9..6b564c9c2cea 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | */ | 19 | */ |
| 20 | 20 | ||
| 21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 22 | #include <linux/power/smartreflex.h> | ||
| 22 | 23 | ||
| 23 | #include <plat/omap_hwmod.h> | 24 | #include <plat/omap_hwmod.h> |
| 24 | #include <plat/cpu.h> | 25 | #include <plat/cpu.h> |
| @@ -32,8 +33,6 @@ | |||
| 32 | #include <plat/common.h> | 33 | #include <plat/common.h> |
| 33 | 34 | ||
| 34 | #include "omap_hwmod_common_data.h" | 35 | #include "omap_hwmod_common_data.h" |
| 35 | |||
| 36 | #include "smartreflex.h" | ||
| 37 | #include "cm1_44xx.h" | 36 | #include "cm1_44xx.h" |
| 38 | #include "cm2_44xx.h" | 37 | #include "cm2_44xx.h" |
| 39 | #include "prm44xx.h" | 38 | #include "prm44xx.h" |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 78564895e914..9fac67d6c985 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
| @@ -88,7 +88,7 @@ extern void enable_omap3630_toggle_l2_on_restore(void); | |||
| 88 | static inline void enable_omap3630_toggle_l2_on_restore(void) { } | 88 | static inline void enable_omap3630_toggle_l2_on_restore(void) { } |
| 89 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ | 89 | #endif /* defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) */ |
| 90 | 90 | ||
| 91 | #ifdef CONFIG_OMAP_SMARTREFLEX | 91 | #ifdef CONFIG_POWER_AVS_OMAP |
| 92 | extern int omap_devinit_smartreflex(void); | 92 | extern int omap_devinit_smartreflex(void); |
| 93 | extern void omap_enable_smartreflex_on_init(void); | 93 | extern void omap_enable_smartreflex_on_init(void); |
| 94 | #else | 94 | #else |
diff --git a/arch/arm/mach-omap2/smartreflex-class3.c b/arch/arm/mach-omap2/smartreflex-class3.c index 955566eefac4..1da8f03c479e 100644 --- a/arch/arm/mach-omap2/smartreflex-class3.c +++ b/arch/arm/mach-omap2/smartreflex-class3.c | |||
| @@ -11,36 +11,37 @@ | |||
| 11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | #include "smartreflex.h" | 14 | #include <linux/power/smartreflex.h> |
| 15 | #include "voltage.h" | ||
| 15 | 16 | ||
| 16 | static int sr_class3_enable(struct voltagedomain *voltdm) | 17 | static int sr_class3_enable(struct omap_sr *sr) |
| 17 | { | 18 | { |
| 18 | unsigned long volt = voltdm_get_voltage(voltdm); | 19 | unsigned long volt = voltdm_get_voltage(sr->voltdm); |
| 19 | 20 | ||
| 20 | if (!volt) { | 21 | if (!volt) { |
| 21 | pr_warning("%s: Curr voltage unknown. Cannot enable sr_%s\n", | 22 | pr_warning("%s: Curr voltage unknown. Cannot enable %s\n", |
| 22 | __func__, voltdm->name); | 23 | __func__, sr->name); |
| 23 | return -ENODATA; | 24 | return -ENODATA; |
| 24 | } | 25 | } |
| 25 | 26 | ||
| 26 | omap_vp_enable(voltdm); | 27 | omap_vp_enable(sr->voltdm); |
| 27 | return sr_enable(voltdm, volt); | 28 | return sr_enable(sr->voltdm, volt); |
| 28 | } | 29 | } |
| 29 | 30 | ||
| 30 | static int sr_class3_disable(struct voltagedomain *voltdm, int is_volt_reset) | 31 | static int sr_class3_disable(struct omap_sr *sr, int is_volt_reset) |
| 31 | { | 32 | { |
| 32 | sr_disable_errgen(voltdm); | 33 | sr_disable_er |
