diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-29 16:07:34 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-29 16:07:34 -0400 |
commit | ad932bb6b549722a561fb31ac2fa50dcbcb3e36b (patch) | |
tree | 66cde27bd288e011a6e4cff87d342666399a1266 /arch/arm/mach-omap2/powerdomain.c | |
parent | 5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff) | |
parent | 9cd68fa707cf6372f33eb51a5719dd7626efe5f6 (diff) |
Merge tag 'omap-devel-late-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into late/soc
These changes take us a step closer to merging the common clock
framework for omap but unfortunately these patches were not
ready for merging earlier. See also the notes below on the
dependencies these patches have, they are based on a merge
of sereral branches already merged.
From Paul Walmsley <paul@pwsan.com>:
OMAP patches intended for the 3.7 merge window:
- Runtime PM conversions for the GPMC and RNG IP blocks
- Preparation patches for the OMAP common clock framework conversion
- clkdev alias additions required by other drivers
- Performance Monitoring Unit (PMU) support for OMAP2, 3, and non-4430 OMAP4
- OMAP hwmod code and data improvements
- Preparation patches for the IOMMU runtime PM conversion
- Preparation patches for OMAP4 full-chip retention support
Based on a merge of v3.6-rc6, the omap-cleanup-b-for-3.7 tag
(7852ec0536ca39cefffc6301dc77f8ae55592926),the cleanup-fixes-for-v3.7
tag (de6ca33a96a6bf61fcb91d3d399703e19ead9d1e), and the
omap-devel-am33xx-for-v3.7 tag
(11964f53eb4d9ce59a058be9999d9cfcb1ced878), due to dependencies.
* tag 'omap-devel-late-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (281 commits)
ARM: OMAP4460/4470: PMU: Enable PMU for OMAP4460/70
ARM: OMAP2+: PMU: Add runtime PM support
ARM: OMAP4430: PMU: prepare to create PMU device via HWMOD
ARM: OMAP2+: PMU: Convert OMAP2/3 devices to use HWMOD
ARM: OMAP3: hwmod data: Add debugss HWMOD data
ARM: OMAP2+: clockdomain/hwmod: add workaround for EMU clockdomain idle problems
ARM: OMAP: Add a timer attribute for timers that can interrupt the DSP
hwrng: OMAP: remove SoC restrictions from driver registration
ARM: OMAP: split OMAP1, OMAP2+ RNG device registration
hwrng: OMAP: convert to use runtime PM
hwrng: OMAP: store per-device data in per-device variables, not file statics
ARM: OMAP2xxx: hwmod/CM: add RNG integration data
ARM: OMAP2+: gpmc: minimal driver support
ARM: OMAP2+: gpmc: Adapt to HWMOD
ARM: OMAP2/3: hwmod data: add gpmc
ARM: OMAP4: hwmod data: add mmu hwmod for ipu and dsp
ARM: OMAP3: hwmod data: add mmu data for iva and isp
ARM: OMAP: iommu: fix including iommu.h without IOMMU_API selected
ARM: OMAP4: hwmod data: add missing HWMOD_NO_IDLEST flags to some PRCM IP blocks
ARM: OMAP4: hwmod data: make *phy_48m* as the main_clk of ocp2scp
...
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.c')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 69b36e185e9b..1678a3284233 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -28,11 +28,13 @@ | |||
28 | #include "prm44xx.h" | 28 | #include "prm44xx.h" |
29 | 29 | ||
30 | #include <asm/cpu.h> | 30 | #include <asm/cpu.h> |
31 | #include <plat/cpu.h> | 31 | |
32 | #include <plat/prcm.h> | ||
33 | |||
32 | #include "powerdomain.h" | 34 | #include "powerdomain.h" |
33 | #include "clockdomain.h" | 35 | #include "clockdomain.h" |
34 | #include <plat/prcm.h> | ||
35 | 36 | ||
37 | #include "soc.h" | ||
36 | #include "pm.h" | 38 | #include "pm.h" |
37 | 39 | ||
38 | #define PWRDM_TRACE_STATES_FLAG (1<<31) | 40 | #define PWRDM_TRACE_STATES_FLAG (1<<31) |
@@ -339,8 +341,8 @@ int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm) | |||
339 | if (!pwrdm || !clkdm) | 341 | if (!pwrdm || !clkdm) |
340 | return -EINVAL; | 342 | return -EINVAL; |
341 | 343 | ||
342 | pr_debug("powerdomain: associating clockdomain %s with powerdomain " | 344 | pr_debug("powerdomain: %s: associating clockdomain %s\n", |
343 | "%s\n", clkdm->name, pwrdm->name); | 345 | pwrdm->name, clkdm->name); |
344 | 346 | ||
345 | for (i = 0; i < PWRDM_MAX_CLKDMS; i++) { | 347 | for (i = 0; i < PWRDM_MAX_CLKDMS; i++) { |
346 | if (!pwrdm->pwrdm_clkdms[i]) | 348 | if (!pwrdm->pwrdm_clkdms[i]) |
@@ -354,8 +356,8 @@ int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm) | |||
354 | } | 356 | } |
355 | 357 | ||
356 | if (i == PWRDM_MAX_CLKDMS) { | 358 | if (i == PWRDM_MAX_CLKDMS) { |
357 | pr_debug("powerdomain: increase PWRDM_MAX_CLKDMS for " | 359 | pr_debug("powerdomain: %s: increase PWRDM_MAX_CLKDMS for clkdm %s\n", |
358 | "pwrdm %s clkdm %s\n", pwrdm->name, clkdm->name); | 360 | pwrdm->name, clkdm->name); |
359 | WARN_ON(1); | 361 | WARN_ON(1); |
360 | ret = -ENOMEM; | 362 | ret = -ENOMEM; |
361 | goto pac_exit; | 363 | goto pac_exit; |
@@ -387,16 +389,16 @@ int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm) | |||
387 | if (!pwrdm || !clkdm) | 389 | if (!pwrdm || !clkdm) |
388 | return -EINVAL; | 390 | return -EINVAL; |
389 | 391 | ||
390 | pr_debug("powerdomain: dissociating clockdomain %s from powerdomain " | 392 | pr_debug("powerdomain: %s: dissociating clockdomain %s\n", |
391 | "%s\n", clkdm->name, pwrdm->name); | 393 | pwrdm->name, clkdm->name); |
392 | 394 | ||
393 | for (i = 0; i < PWRDM_MAX_CLKDMS; i++) | 395 | for (i = 0; i < PWRDM_MAX_CLKDMS; i++) |
394 | if (pwrdm->pwrdm_clkdms[i] == clkdm) | 396 | if (pwrdm->pwrdm_clkdms[i] == clkdm) |
395 | break; | 397 | break; |
396 | 398 | ||
397 | if (i == PWRDM_MAX_CLKDMS) { | 399 | if (i == PWRDM_MAX_CLKDMS) { |
398 | pr_debug("powerdomain: clkdm %s not associated with pwrdm " | 400 | pr_debug("powerdomain: %s: clkdm %s not associated?!\n", |
399 | "%s ?!\n", clkdm->name, pwrdm->name); | 401 | pwrdm->name, clkdm->name); |
400 | ret = -ENOENT; | 402 | ret = -ENOENT; |
401 | goto pdc_exit; | 403 | goto pdc_exit; |
402 | } | 404 | } |
@@ -485,7 +487,7 @@ int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) | |||
485 | if (!(pwrdm->pwrsts & (1 << pwrst))) | 487 | if (!(pwrdm->pwrsts & (1 << pwrst))) |
486 | return -EINVAL; | 488 | return -EINVAL; |
487 | 489 | ||
488 | pr_debug("powerdomain: setting next powerstate for %s to %0x\n", | 490 | pr_debug("powerdomain: %s: setting next powerstate to %0x\n", |
489 | pwrdm->name, pwrst); | 491 | pwrdm->name, pwrst); |
490 | 492 | ||
491 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) { | 493 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_next_pwrst) { |
@@ -587,7 +589,7 @@ int pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst) | |||
587 | if (!(pwrdm->pwrsts_logic_ret & (1 << pwrst))) | 589 | if (!(pwrdm->pwrsts_logic_ret & (1 << pwrst))) |
588 | return -EINVAL; | 590 | return -EINVAL; |
589 | 591 | ||
590 | pr_debug("powerdomain: setting next logic powerstate for %s to %0x\n", | 592 | pr_debug("powerdomain: %s: setting next logic powerstate to %0x\n", |
591 | pwrdm->name, pwrst); | 593 | pwrdm->name, pwrst); |
592 | 594 | ||
593 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_logic_retst) | 595 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_logic_retst) |
@@ -624,8 +626,8 @@ int pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank, u8 pwrst) | |||
624 | if (!(pwrdm->pwrsts_mem_on[bank] & (1 << pwrst))) | 626 | if (!(pwrdm->pwrsts_mem_on[bank] & (1 << pwrst))) |
625 | return -EINVAL; | 627 | return -EINVAL; |
626 | 628 | ||
627 | pr_debug("powerdomain: setting next memory powerstate for domain %s " | 629 | pr_debug("powerdomain: %s: setting next memory powerstate for bank %0x while pwrdm-ON to %0x\n", |
628 | "bank %0x while pwrdm-ON to %0x\n", pwrdm->name, bank, pwrst); | 630 | pwrdm->name, bank, pwrst); |
629 | 631 | ||
630 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_onst) | 632 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_onst) |
631 | ret = arch_pwrdm->pwrdm_set_mem_onst(pwrdm, bank, pwrst); | 633 | ret = arch_pwrdm->pwrdm_set_mem_onst(pwrdm, bank, pwrst); |
@@ -662,8 +664,8 @@ int pwrdm_set_mem_retst(struct powerdomain *pwrdm, u8 bank, u8 pwrst) | |||
662 | if (!(pwrdm->pwrsts_mem_ret[bank] & (1 << pwrst))) | 664 | if (!(pwrdm->pwrsts_mem_ret[bank] & (1 << pwrst))) |
663 | return -EINVAL; | 665 | return -EINVAL; |
664 | 666 | ||
665 | pr_debug("powerdomain: setting next memory powerstate for domain %s " | 667 | pr_debug("powerdomain: %s: setting next memory powerstate for bank %0x while pwrdm-RET to %0x\n", |
666 | "bank %0x while pwrdm-RET to %0x\n", pwrdm->name, bank, pwrst); | 668 | pwrdm->name, bank, pwrst); |
667 | 669 | ||
668 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_retst) | 670 | if (arch_pwrdm && arch_pwrdm->pwrdm_set_mem_retst) |
669 | ret = arch_pwrdm->pwrdm_set_mem_retst(pwrdm, bank, pwrst); | 671 | ret = arch_pwrdm->pwrdm_set_mem_retst(pwrdm, bank, pwrst); |
@@ -841,7 +843,7 @@ int pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm) | |||
841 | * warn & fail if it is not ON. | 843 | * warn & fail if it is not ON. |
842 | */ | 844 | */ |
843 | 845 | ||
844 | pr_debug("powerdomain: clearing previous power state reg for %s\n", | 846 | pr_debug("powerdomain: %s: clearing previous power state reg\n", |
845 | pwrdm->name); | 847 | pwrdm->name); |
846 | 848 | ||
847 | if (arch_pwrdm && arch_pwrdm->pwrdm_clear_all_prev_pwrst) | 849 | if (arch_pwrdm && arch_pwrdm->pwrdm_clear_all_prev_pwrst) |
@@ -871,8 +873,7 @@ int pwrdm_enable_hdwr_sar(struct powerdomain *pwrdm) | |||
871 | if (!(pwrdm->flags & PWRDM_HAS_HDWR_SAR)) | 873 | if (!(pwrdm->flags & PWRDM_HAS_HDWR_SAR)) |
872 | return ret; | 874 | return ret; |
873 | 875 | ||
874 | pr_debug("powerdomain: %s: setting SAVEANDRESTORE bit\n", | 876 | pr_debug("powerdomain: %s: setting SAVEANDRESTORE bit\n", pwrdm->name); |
875 | pwrdm->name); | ||
876 | 877 | ||
877 | if (arch_pwrdm && arch_pwrdm->pwrdm_enable_hdwr_sar) | 878 | if (arch_pwrdm && arch_pwrdm->pwrdm_enable_hdwr_sar) |
878 | ret = arch_pwrdm->pwrdm_enable_hdwr_sar(pwrdm); | 879 | ret = arch_pwrdm->pwrdm_enable_hdwr_sar(pwrdm); |
@@ -901,8 +902,7 @@ int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm) | |||
901 | if (!(pwrdm->flags & PWRDM_HAS_HDWR_SAR)) | 902 | if (!(pwrdm->flags & PWRDM_HAS_HDWR_SAR)) |
902 | return ret; | 903 | return ret; |
903 | 904 | ||
904 | pr_debug("powerdomain: %s: clearing SAVEANDRESTORE bit\n", | 905 | pr_debug("powerdomain: %s: clearing SAVEANDRESTORE bit\n", pwrdm->name); |
905 | pwrdm->name); | ||
906 | 906 | ||
907 | if (arch_pwrdm && arch_pwrdm->pwrdm_disable_hdwr_sar) | 907 | if (arch_pwrdm && arch_pwrdm->pwrdm_disable_hdwr_sar) |
908 | ret = arch_pwrdm->pwrdm_disable_hdwr_sar(pwrdm); | 908 | ret = arch_pwrdm->pwrdm_disable_hdwr_sar(pwrdm); |