diff options
author | Tony Lindgren <tony@atomide.com> | 2012-10-24 20:05:59 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-10-24 20:05:59 -0400 |
commit | 8634155ef41d3a035f2ea0b6c5bed2806f2788bc (patch) | |
tree | 6334a630abf196685803f17002fbf25d11babe17 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 6d02643d64b4440394ee462ea4b870c8506cd9e7 (diff) | |
parent | 2bb2a5d30abb0dc99d074877bfad2056142c730b (diff) |
Merge tag 'omap-cleanup-a-for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v3.8/cleanup-prcm
The first set of OMAP PRM/CM-related cleanup patches for 3.8.
Prepares for the future move of the PRM/CM code to drivers/. Also
includes some prcm.[ch] cleanup patches from the WDTIMER cleanup
series that don't need external acks.
Basic test logs for this branch on top of v3.7-rc2 are here:
http://www.pwsan.com/omap/testlogs/prcm_cleanup_a_3.8/20121021123719/
But due to the number of unrelated regressions present in v3.7-rc[12],
it's not particularly usable as a testing base. With reverts, fixes,
and workarounds applied as documented in:
http://www.pwsan.com/omap/testlogs/test_v3.7-rc2/20121020134755/README.txt
the following test logs were obtained:
http://www.pwsan.com/omap/testlogs/prcm_cleanup_a_3.8/20121020231757/
which indicate that the series tests cleanly.
Conflicts:
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
arch/arm/mach-omap2/pm24xx.c
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 51 |
1 files changed, 42 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 87eee3b62a3c..37eeb45612f8 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -147,10 +147,11 @@ | |||
147 | #include "common.h" | 147 | #include "common.h" |
148 | #include "clockdomain.h" | 148 | #include "clockdomain.h" |
149 | #include "powerdomain.h" | 149 | #include "powerdomain.h" |
150 | #include "cm2xxx_3xxx.h" | 150 | #include "cm2xxx.h" |
151 | #include "cm3xxx.h" | ||
151 | #include "cminst44xx.h" | 152 | #include "cminst44xx.h" |
152 | #include "cm33xx.h" | 153 | #include "cm33xx.h" |
153 | #include "prm2xxx_3xxx.h" | 154 | #include "prm3xxx.h" |
154 | #include "prm44xx.h" | 155 | #include "prm44xx.h" |
155 | #include "prm33xx.h" | 156 | #include "prm33xx.h" |
156 | #include "prminst44xx.h" | 157 | #include "prminst44xx.h" |
@@ -2668,7 +2669,7 @@ static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois) | |||
2668 | /* Static functions intended only for use in soc_ops field function pointers */ | 2669 | /* Static functions intended only for use in soc_ops field function pointers */ |
2669 | 2670 | ||
2670 | /** | 2671 | /** |
2671 | * _omap2_wait_target_ready - wait for a module to leave slave idle | 2672 | * _omap2xxx_wait_target_ready - wait for a module to leave slave idle |
2672 | * @oh: struct omap_hwmod * | 2673 | * @oh: struct omap_hwmod * |
2673 | * | 2674 | * |
2674 | * Wait for a module @oh to leave slave idle. Returns 0 if the module | 2675 | * Wait for a module @oh to leave slave idle. Returns 0 if the module |
@@ -2676,7 +2677,7 @@ static int __init _alloc_linkspace(struct omap_hwmod_ocp_if **ois) | |||
2676 | * slave idle; otherwise, pass along the return value of the | 2677 | * slave idle; otherwise, pass along the return value of the |
2677 | * appropriate *_cm*_wait_module_ready() function. | 2678 | * appropriate *_cm*_wait_module_ready() function. |
2678 | */ | 2679 | */ |
2679 | static int _omap2_wait_target_ready(struct omap_hwmod *oh) | 2680 | static int _omap2xxx_wait_target_ready(struct omap_hwmod *oh) |
2680 | { | 2681 | { |
2681 | if (!oh) | 2682 | if (!oh) |
2682 | return -EINVAL; | 2683 | return -EINVAL; |
@@ -2689,9 +2690,36 @@ static int _omap2_wait_target_ready(struct omap_hwmod *oh) | |||
2689 | 2690 | ||
2690 | /* XXX check module SIDLEMODE, hardreset status, enabled clocks */ | 2691 | /* XXX check module SIDLEMODE, hardreset status, enabled clocks */ |
2691 | 2692 | ||
2692 | return omap2_cm_wait_module_ready(oh->prcm.omap2.module_offs, | 2693 | return omap2xxx_cm_wait_module_ready(oh->prcm.omap2.module_offs, |
2693 | oh->prcm.omap2.idlest_reg_id, | 2694 | oh->prcm.omap2.idlest_reg_id, |
2694 | oh->prcm.omap2.idlest_idle_bit); | 2695 | oh->prcm.omap2.idlest_idle_bit); |
2696 | } | ||
2697 | |||
2698 | /** | ||
2699 | * _omap3xxx_wait_target_ready - wait for a module to leave slave idle | ||
2700 | * @oh: struct omap_hwmod * | ||
2701 | * | ||
2702 | * Wait for a module @oh to leave slave idle. Returns 0 if the module | ||
2703 | * does not have an IDLEST bit or if the module successfully leaves | ||
2704 | * slave idle; otherwise, pass along the return value of the | ||
2705 | * appropriate *_cm*_wait_module_ready() function. | ||
2706 | */ | ||
2707 | static int _omap3xxx_wait_target_ready(struct omap_hwmod *oh) | ||
2708 | { | ||
2709 | if (!oh) | ||
2710 | return -EINVAL; | ||
2711 | |||
2712 | if (oh->flags & HWMOD_NO_IDLEST) | ||
2713 | return 0; | ||
2714 | |||
2715 | if (!_find_mpu_rt_port(oh)) | ||
2716 | return 0; | ||
2717 | |||
2718 | /* XXX check module SIDLEMODE, hardreset status, enabled clocks */ | ||
2719 | |||
2720 | return omap3xxx_cm_wait_module_ready(oh->prcm.omap2.module_offs, | ||
2721 | oh->prcm.omap2.idlest_reg_id, | ||
2722 | oh->prcm.omap2.idlest_idle_bit); | ||
2695 | } | 2723 | } |
2696 | 2724 | ||
2697 | /** | 2725 | /** |
@@ -3959,8 +3987,13 @@ int omap_hwmod_pad_route_irq(struct omap_hwmod *oh, int pad_idx, int irq_idx) | |||
3959 | */ | 3987 | */ |
3960 | void __init omap_hwmod_init(void) | 3988 | void __init omap_hwmod_init(void) |
3961 | { | 3989 | { |
3962 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { | 3990 | if (cpu_is_omap24xx()) { |
3963 | soc_ops.wait_target_ready = _omap2_wait_target_ready; | 3991 | soc_ops.wait_target_ready = _omap2xxx_wait_target_ready; |
3992 | soc_ops.assert_hardreset = _omap2_assert_hardreset; | ||
3993 | soc_ops.deassert_hardreset = _omap2_deassert_hardreset; | ||
3994 | soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted; | ||
3995 | } else if (cpu_is_omap34xx()) { | ||
3996 | soc_ops.wait_target_ready = _omap3xxx_wait_target_ready; | ||
3964 | soc_ops.assert_hardreset = _omap2_assert_hardreset; | 3997 | soc_ops.assert_hardreset = _omap2_assert_hardreset; |
3965 | soc_ops.deassert_hardreset = _omap2_deassert_hardreset; | 3998 | soc_ops.deassert_hardreset = _omap2_deassert_hardreset; |
3966 | soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted; | 3999 | soc_ops.is_hardreset_asserted = _omap2_is_hardreset_asserted; |