aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm34xx.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2010-12-21 23:05:14 -0500
committerPaul Walmsley <paul@pwsan.com>2010-12-21 23:05:14 -0500
commitc4d7e58fb52c632d8e33cd23a4917d7a7f8302ac (patch)
tree20a56db9f93ff411fc439ea1961b1e51f2ecf15b /arch/arm/mach-omap2/pm34xx.c
parentdac9a77120e2724e22696f06f3ecb4838da1e3e4 (diff)
OMAP2/3: PRM/CM: prefix OMAP2 PRM/CM functions with "omap2_"
Now that OMAP4-specific PRCM functions have been added, distinguish the existing OMAP2/3-specific PRCM functions by prefixing them with "omap2_". This patch should not result in any functional change. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Jarkko Nikula <jhnikula@gmail.com> Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r--arch/arm/mach-omap2/pm34xx.c143
1 files changed, 72 insertions, 71 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index cfff321c747e..1ca6ef4c25b3 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -105,12 +105,12 @@ static void omap3_enable_io_chain(void)
105 int timeout = 0; 105 int timeout = 0;
106 106
107 if (omap_rev() >= OMAP3430_REV_ES3_1) { 107 if (omap_rev() >= OMAP3430_REV_ES3_1) {
108 prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD, 108 omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
109 PM_WKEN); 109 PM_WKEN);
110 /* Do a readback to assure write has been done */ 110 /* Do a readback to assure write has been done */
111 prm_read_mod_reg(WKUP_MOD, PM_WKEN); 111 omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
112 112
113 while (!(prm_read_mod_reg(WKUP_MOD, PM_WKEN) & 113 while (!(omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN) &
114 OMAP3430_ST_IO_CHAIN_MASK)) { 114 OMAP3430_ST_IO_CHAIN_MASK)) {
115 timeout++; 115 timeout++;
116 if (timeout > 1000) { 116 if (timeout > 1000) {
@@ -118,7 +118,7 @@ static void omap3_enable_io_chain(void)
118 "activation failed.\n"); 118 "activation failed.\n");
119 return; 119 return;
120 } 120 }
121 prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK, 121 omap2_prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
122 WKUP_MOD, PM_WKEN); 122 WKUP_MOD, PM_WKEN);
123 } 123 }
124 } 124 }
@@ -127,7 +127,7 @@ static void omap3_enable_io_chain(void)
127static void omap3_disable_io_chain(void) 127static void omap3_disable_io_chain(void)
128{ 128{
129 if (omap_rev() >= OMAP3430_REV_ES3_1) 129 if (omap_rev() >= OMAP3430_REV_ES3_1)
130 prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD, 130 omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_CHAIN_MASK, WKUP_MOD,
131 PM_WKEN); 131 PM_WKEN);
132} 132}
133 133
@@ -221,27 +221,27 @@ static int prcm_clear_mod_irqs(s16 module, u8 regs)
221 OMAP3430ES2_PM_MPUGRPSEL3 : OMAP3430_PM_MPUGRPSEL; 221 OMAP3430ES2_PM_MPUGRPSEL3 : OMAP3430_PM_MPUGRPSEL;
222 int c = 0; 222 int c = 0;
223 223
224 wkst = prm_read_mod_reg(module, wkst_off); 224 wkst = omap2_prm_read_mod_reg(module, wkst_off);
225 wkst &= prm_read_mod_reg(module, grpsel_off); 225 wkst &= omap2_prm_read_mod_reg(module, grpsel_off);
226 if (wkst) { 226 if (wkst) {
227 iclk = cm_read_mod_reg(module, iclk_off); 227 iclk = omap2_cm_read_mod_reg(module, iclk_off);
228 fclk = cm_read_mod_reg(module, fclk_off); 228 fclk = omap2_cm_read_mod_reg(module, fclk_off);
229 while (wkst) { 229 while (wkst) {
230 clken = wkst; 230 clken = wkst;
231 cm_set_mod_reg_bits(clken, module, iclk_off); 231 omap2_cm_set_mod_reg_bits(clken, module, iclk_off);
232 /* 232 /*
233 * For USBHOST, we don't know whether HOST1 or 233 * For USBHOST, we don't know whether HOST1 or
234 * HOST2 woke us up, so enable both f-clocks 234 * HOST2 woke us up, so enable both f-clocks
235 */ 235 */
236 if (module == OMAP3430ES2_USBHOST_MOD) 236 if (module == OMAP3430ES2_USBHOST_MOD)
237 clken |= 1 << OMAP3430ES2_EN_USBHOST2_SHIFT; 237 clken |= 1 << OMAP3430ES2_EN_USBHOST2_SHIFT;
238 cm_set_mod_reg_bits(clken, module, fclk_off); 238 omap2_cm_set_mod_reg_bits(clken, module, fclk_off);
239 prm_write_mod_reg(wkst, module, wkst_off); 239 omap2_prm_write_mod_reg(wkst, module, wkst_off);
240 wkst = prm_read_mod_reg(module, wkst_off); 240 wkst = omap2_prm_read_mod_reg(module, wkst_off);
241 c++; 241 c++;
242 } 242 }
243 cm_write_mod_reg(iclk, module, iclk_off); 243 omap2_cm_write_mod_reg(iclk, module, iclk_off);
244 cm_write_mod_reg(fclk, module, fclk_off); 244 omap2_cm_write_mod_reg(fclk, module, fclk_off);
245 } 245 }
246 246
247 return c; 247 return c;
@@ -284,9 +284,9 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id)
284 u32 irqenable_mpu, irqstatus_mpu; 284 u32 irqenable_mpu, irqstatus_mpu;
285 int c = 0; 285 int c = 0;
286 286
287 irqenable_mpu = prm_read_mod_reg(OCP_MOD, 287 irqenable_mpu = omap2_prm_read_mod_reg(OCP_MOD,
288 OMAP3_PRM_IRQENABLE_MPU_OFFSET); 288 OMAP3_PRM_IRQENABLE_MPU_OFFSET);
289 irqstatus_mpu = prm_read_mod_reg(OCP_MOD, 289 irqstatus_mpu = omap2_prm_read_mod_reg(OCP_MOD,
290 OMAP3_PRM_IRQSTATUS_MPU_OFFSET); 290 OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
291 irqstatus_mpu &= irqenable_mpu; 291 irqstatus_mpu &= irqenable_mpu;
292 292
@@ -307,10 +307,10 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id)
307 "no code to handle it (%08x)\n", irqstatus_mpu); 307 "no code to handle it (%08x)\n", irqstatus_mpu);
308 } 308 }
309 309
310 prm_write_mod_reg(irqstatus_mpu, OCP_MOD, 310 omap2_prm_write_mod_reg(irqstatus_mpu, OCP_MOD,
311 OMAP3_PRM_IRQSTATUS_MPU_OFFSET); 311 OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
312 312
313 irqstatus_mpu = prm_read_mod_reg(OCP_MOD, 313 irqstatus_mpu = omap2_prm_read_mod_reg(OCP_MOD,
314 OMAP3_PRM_IRQSTATUS_MPU_OFFSET); 314 OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
315 irqstatus_mpu &= irqenable_mpu; 315 irqstatus_mpu &= irqenable_mpu;
316 316
@@ -398,7 +398,7 @@ void omap_sram_idle(void)
398 if (omap3_has_io_wakeup() && 398 if (omap3_has_io_wakeup() &&
399 (per_next_state < PWRDM_POWER_ON || 399 (per_next_state < PWRDM_POWER_ON ||
400 core_next_state < PWRDM_POWER_ON)) { 400 core_next_state < PWRDM_POWER_ON)) {
401 prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); 401 omap2_prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
402 omap3_enable_io_chain(); 402 omap3_enable_io_chain();
403 } 403 }
404 404
@@ -471,7 +471,7 @@ void omap_sram_idle(void)
471 omap_uart_resume_idle(0); 471 omap_uart_resume_idle(0);
472 omap_uart_resume_idle(1); 472 omap_uart_resume_idle(1);
473 if (core_next_state == PWRDM_POWER_OFF) 473 if (core_next_state == PWRDM_POWER_OFF)
474 prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK, 474 omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK,
475 OMAP3430_GR_MOD, 475 OMAP3430_GR_MOD,
476 OMAP3_PRM_VOLTCTRL_OFFSET); 476 OMAP3_PRM_VOLTCTRL_OFFSET);
477 } 477 }
@@ -495,7 +495,8 @@ console_still_active:
495 if (omap3_has_io_wakeup() && 495 if (omap3_has_io_wakeup() &&
496 (per_next_state < PWRDM_POWER_ON || 496 (per_next_state < PWRDM_POWER_ON ||
497 core_next_state < PWRDM_POWER_ON)) { 497 core_next_state < PWRDM_POWER_ON)) {
498 prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN); 498 omap2_prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD,
499 PM_WKEN);
499 omap3_disable_io_chain(); 500 omap3_disable_io_chain();
500 } 501 }
501 502
@@ -633,21 +634,21 @@ static struct platform_suspend_ops omap_pm_ops = {
633static void __init omap3_iva_idle(void) 634static void __init omap3_iva_idle(void)
634{ 635{
635 /* ensure IVA2 clock is disabled */ 636 /* ensure IVA2 clock is disabled */
636 cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN); 637 omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);
637 638
638 /* if no clock activity, nothing else to do */ 639 /* if no clock activity, nothing else to do */
639 if (!(cm_read_mod_reg(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSTST) & 640 if (!(omap2_cm_read_mod_reg(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSTST) &
640 OMAP3430_CLKACTIVITY_IVA2_MASK)) 641 OMAP3430_CLKACTIVITY_IVA2_MASK))
641 return; 642 return;
642 643
643 /* Reset IVA2 */ 644 /* Reset IVA2 */
644 prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK | 645 omap2_prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK |
645 OMAP3430_RST2_IVA2_MASK | 646 OMAP3430_RST2_IVA2_MASK |
646 OMAP3430_RST3_IVA2_MASK, 647 OMAP3430_RST3_IVA2_MASK,
647 OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL); 648 OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
648 649
649 /* Enable IVA2 clock */ 650 /* Enable IVA2 clock */
650 cm_write_mod_reg(OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK, 651 omap2_cm_write_mod_reg(OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK,
651 OMAP3430_IVA2_MOD, CM_FCLKEN); 652 OMAP3430_IVA2_MOD, CM_FCLKEN);
652 653
653 /* Set IVA2 boot mode to 'idle' */ 654 /* Set IVA2 boot mode to 'idle' */
@@ -655,13 +656,13 @@ static void __init omap3_iva_idle(void)
655 OMAP343X_CONTROL_IVA2_BOOTMOD); 656 OMAP343X_CONTROL_IVA2_BOOTMOD);
656 657
657 /* Un-reset IVA2 */ 658 /* Un-reset IVA2 */
658 prm_write_mod_reg(0, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL); 659 omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
659 660
660 /* Disable IVA2 clock */ 661 /* Disable IVA2 clock */
661 cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN); 662 omap2_cm_write_mod_reg(0, OMAP3430_IVA2_MOD, CM_FCLKEN);
662 663
663 /* Reset IVA2 */ 664 /* Reset IVA2 */
664 prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK | 665 omap2_prm_write_mod_reg(OMAP3430_RST1_IVA2_MASK |
665 OMAP3430_RST2_IVA2_MASK | 666 OMAP3430_RST2_IVA2_MASK |
666 OMAP3430_RST3_IVA2_MASK, 667 OMAP3430_RST3_IVA2_MASK,
667 OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL); 668 OMAP3430_IVA2_MOD, OMAP2_RM_RSTCTRL);
@@ -685,10 +686,10 @@ static void __init omap3_d2d_idle(void)
685 omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK); 686 omap_ctrl_writew(padconf, OMAP3_PADCONF_SAD2D_IDLEACK);
686 687
687 /* reset modem */ 688 /* reset modem */
688 prm_write_mod_reg(OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK | 689 omap2_prm_write_mod_reg(OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RSTPWRON_MASK |
689 OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK, 690 OMAP3430_RM_RSTCTRL_CORE_MODEM_SW_RST_MASK,
690 CORE_MOD, OMAP2_RM_RSTCTRL); 691 CORE_MOD, OMAP2_RM_RSTCTRL);
691 prm_write_mod_reg(0, CORE_MOD, OMAP2_RM_RSTCTRL); 692 omap2_prm_write_mod_reg(0, CORE_MOD, OMAP2_RM_RSTCTRL);
692} 693}
693 694
694static void __init prcm_setup_regs(void) 695static void __init prcm_setup_regs(void)
@@ -703,23 +704,23 @@ static void __init prcm_setup_regs(void)
703 704
704 /* XXX Reset all wkdeps. This should be done when initializing 705 /* XXX Reset all wkdeps. This should be done when initializing
705 * powerdomains */ 706 * powerdomains */
706 prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP); 707 omap2_prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP);
707 prm_write_mod_reg(0, MPU_MOD, PM_WKDEP); 708 omap2_prm_write_mod_reg(0, MPU_MOD, PM_WKDEP);
708 prm_write_mod_reg(0, OMAP3430_DSS_MOD, PM_WKDEP); 709 omap2_prm_write_mod_reg(0, OMAP3430_DSS_MOD, PM_WKDEP);
709 prm_write_mod_reg(0, OMAP3430_NEON_MOD, PM_WKDEP); 710 omap2_prm_write_mod_reg(0, OMAP3430_NEON_MOD, PM_WKDEP);
710 prm_write_mod_reg(0, OMAP3430_CAM_MOD, PM_WKDEP); 711 omap2_prm_write_mod_reg(0, OMAP3430_CAM_MOD, PM_WKDEP);
711 prm_write_mod_reg(0, OMAP3430_PER_MOD, PM_WKDEP); 712 omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD, PM_WKDEP);
712 if (omap_rev() > OMAP3430_REV_ES1_0) { 713 if (omap_rev() > OMAP3430_REV_ES1_0) {
713 prm_write_mod_reg(0, OMAP3430ES2_SGX_MOD, PM_WKDEP); 714 omap2_prm_write_mod_reg(0, OMAP3430ES2_SGX_MOD, PM_WKDEP);
714 prm_write_mod_reg(0, OMAP3430ES2_USBHOST_MOD, PM_WKDEP); 715 omap2_prm_write_mod_reg(0, OMAP3430ES2_USBHOST_MOD, PM_WKDEP);
715 } else 716 } else
716 prm_write_mod_reg(0, GFX_MOD, PM_WKDEP); 717 omap2_prm_write_mod_reg(0, GFX_MOD, PM_WKDEP);
717 718
718 /* 719 /*
719 * Enable interface clock autoidle for all modules. 720 * Enable interface clock autoidle for all modules.
720 * Note that in the long run this should be done by clockfw 721 * Note that in the long run this should be done by clockfw
721 */ 722 */
722 cm_write_mod_reg( 723 omap2_cm_write_mod_reg(
723 OMAP3430_AUTO_MODEM_MASK | 724 OMAP3430_AUTO_MODEM_MASK |
724 OMAP3430ES2_AUTO_MMC3_MASK | 725 OMAP3430ES2_AUTO_MMC3_MASK |
725 OMAP3430ES2_AUTO_ICR_MASK | 726 OMAP3430ES2_AUTO_ICR_MASK |
@@ -752,7 +753,7 @@ static void __init prcm_setup_regs(void)
752 OMAP3430_AUTO_SSI_MASK, 753 OMAP3430_AUTO_SSI_MASK,
753 CORE_MOD, CM_AUTOIDLE1); 754 CORE_MOD, CM_AUTOIDLE1);
754 755
755 cm_write_mod_reg( 756 omap2_cm_write_mod_reg(
756 OMAP3430_AUTO_PKA_MASK | 757 OMAP3430_AUTO_PKA_MASK |
757 OMAP3430_AUTO_AES1_MASK | 758 OMAP3430_AUTO_AES1_MASK |
758 OMAP3430_AUTO_RNG_MASK | 759 OMAP3430_AUTO_RNG_MASK |
@@ -761,13 +762,13 @@ static void __init prcm_setup_regs(void)
761 CORE_MOD, CM_AUTOIDLE2); 762 CORE_MOD, CM_AUTOIDLE2);
762 763
763 if (omap_rev() > OMAP3430_REV_ES1_0) { 764 if (omap_rev() > OMAP3430_REV_ES1_0) {
764 cm_write_mod_reg( 765 omap2_cm_write_mod_reg(
765 OMAP3430_AUTO_MAD2D_MASK | 766 OMAP3430_AUTO_MAD2D_MASK |
766 OMAP3430ES2_AUTO_USBTLL_MASK, 767 OMAP3430ES2_AUTO_USBTLL_MASK,
767 CORE_MOD, CM_AUTOIDLE3); 768 CORE_MOD, CM_AUTOIDLE3);
768 } 769 }
769 770
770 cm_write_mod_reg( 771 omap2_cm_write_mod_reg(
771 OMAP3430_AUTO_WDT2_MASK | 772 OMAP3430_AUTO_WDT2_MASK |
772 OMAP3430_AUTO_WDT1_MASK | 773 OMAP3430_AUTO_WDT1_MASK |
773 OMAP3430_AUTO_GPIO1_MASK | 774 OMAP3430_AUTO_GPIO1_MASK |
@@ -776,17 +777,17 @@ static void __init prcm_setup_regs(void)
776 OMAP3430_AUTO_GPT1_MASK, 777 OMAP3430_AUTO_GPT1_MASK,
777 WKUP_MOD, CM_AUTOIDLE); 778 WKUP_MOD, CM_AUTOIDLE);
778 779
779 cm_write_mod_reg( 780 omap2_cm_write_mod_reg(
780 OMAP3430_AUTO_DSS_MASK, 781 OMAP3430_AUTO_DSS_MASK,
781 OMAP3430_DSS_MOD, 782 OMAP3430_DSS_MOD,
782 CM_AUTOIDLE); 783 CM_AUTOIDLE);
783 784
784 cm_write_mod_reg( 785 omap2_cm_write_mod_reg(
785 OMAP3430_AUTO_CAM_MASK, 786 OMAP3430_AUTO_CAM_MASK,
786 OMAP3430_CAM_MOD, 787 OMAP3430_CAM_MOD,
787 CM_AUTOIDLE); 788 CM_AUTOIDLE);
788 789
789 cm_write_mod_reg( 790 omap2_cm_write_mod_reg(
790 omap3630_auto_uart4_mask | 791 omap3630_auto_uart4_mask |
791 OMAP3430_AUTO_GPIO6_MASK | 792 OMAP3430_AUTO_GPIO6_MASK |
792 OMAP3430_AUTO_GPIO5_MASK | 793 OMAP3430_AUTO_GPIO5_MASK |
@@ -810,7 +811,7 @@ static void __init prcm_setup_regs(void)
810 CM_AUTOIDLE); 811 CM_AUTOIDLE);
811 812
812 if (omap_rev() > OMAP3430_REV_ES1_0) { 813 if (omap_rev() > OMAP3430_REV_ES1_0) {
813 cm_write_mod_reg( 814 omap2_cm_write_mod_reg(
814 OMAP3430ES2_AUTO_USBHOST_MASK, 815 OMAP3430ES2_AUTO_USBHOST_MASK,
815 OMAP3430ES2_USBHOST_MOD, 816 OMAP3430ES2_USBHOST_MOD,
816 CM_AUTOIDLE); 817 CM_AUTOIDLE);
@@ -822,16 +823,16 @@ static void __init prcm_setup_regs(void)
822 * Set all plls to autoidle. This is needed until autoidle is 823 * Set all plls to autoidle. This is needed until autoidle is
823 * enabled by clockfw 824 * enabled by clockfw
824 */ 825 */
825 cm_write_mod_reg(1 << OMAP3430_AUTO_IVA2_DPLL_SHIFT, 826 omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_IVA2_DPLL_SHIFT,
826 OMAP3430_IVA2_MOD, CM_AUTOIDLE2); 827 OMAP3430_IVA2_MOD, CM_AUTOIDLE2);
827 cm_write_mod_reg(1 << OMAP3430_AUTO_MPU_DPLL_SHIFT, 828 omap2_cm_write_mod_reg(1 << OMAP3430_AUTO_MPU_DPLL_SHIFT,
828 MPU_MOD, 829 MPU_MOD,
829 CM_AUTOIDLE2); 830 CM_AUTOIDLE2);
830 cm_write_mod_reg((1 << OMAP3430_AUTO_PERIPH_DPLL_SHIFT) | 831 omap2_cm_write_mod_reg((1 << OMAP3430_AUTO_PERIPH_DPLL_SHIFT) |
831 (1 << OMAP3430_AUTO_CORE_DPLL_SHIFT), 832 (1 << OMAP3430_AUTO_CORE_DPLL_SHIFT),
832 PLL_MOD, 833 PLL_MOD,
833 CM_AUTOIDLE); 834 CM_AUTOIDLE);
834 cm_write_mod_reg(1 << OMAP3430ES2_AUTO_PERIPH2_DPLL_SHIFT, 835 omap2_cm_write_mod_reg(1 << OMAP3430ES2_AUTO_PERIPH2_DPLL_SHIFT,
835 PLL_MOD, 836 PLL_MOD,
836 CM_AUTOIDLE2); 837 CM_AUTOIDLE2);
837 838
@@ -840,31 +841,31 @@ static void __init prcm_setup_regs(void)
840 * sys_clkreq. In the long run clock framework should 841 * sys_clkreq. In the long run clock framework should
841 * take care of this. 842 * take care of this.
842 */ 843 */
843 prm_rmw_mod_reg_bits(OMAP_AUTOEXTCLKMODE_MASK, 844 omap2_prm_rmw_mod_reg_bits(OMAP_AUTOEXTCLKMODE_MASK,
844 1 << OMAP_AUTOEXTCLKMODE_SHIFT, 845 1 << OMAP_AUTOEXTCLKMODE_SHIFT,
845 OMAP3430_GR_MOD, 846 OMAP3430_GR_MOD,
846 OMAP3_PRM_CLKSRC_CTRL_OFFSET); 847 OMAP3_PRM_CLKSRC_CTRL_OFFSET);
847 848
848 /* setup wakup source */ 849 /* setup wakup source */
849 prm_write_mod_reg(OMAP3430_EN_IO_MASK | OMAP3430_EN_GPIO1_MASK | 850 omap2_prm_write_mod_reg(OMAP3430_EN_IO_MASK | OMAP3430_EN_GPIO1_MASK |
850 OMAP3430_EN_GPT1_MASK | OMAP3430_EN_GPT12_MASK, 851 OMAP3430_EN_GPT1_MASK | OMAP3430_EN_GPT12_MASK,
851 WKUP_MOD, PM_WKEN); 852 WKUP_MOD, PM_WKEN);
852 /* No need to write EN_IO, that is always enabled */ 853 /* No need to write EN_IO, that is always enabled */
853 prm_write_mod_reg(OMAP3430_GRPSEL_GPIO1_MASK | 854 omap2_prm_write_mod_reg(OMAP3430_GRPSEL_GPIO1_MASK |
854 OMAP3430_GRPSEL_GPT1_MASK | 855 OMAP3430_GRPSEL_GPT1_MASK |
855 OMAP3430_GRPSEL_GPT12_MASK, 856 OMAP3430_GRPSEL_GPT12_MASK,
856 WKUP_MOD, OMAP3430_PM_MPUGRPSEL); 857 WKUP_MOD, OMAP3430_PM_MPUGRPSEL);
857 /* For some reason IO doesn't generate wakeup event even if 858 /* For some reason IO doesn't generate wakeup event even if
858 * it is selected to mpu wakeup goup */ 859 * it is selected to mpu wakeup goup */
859 prm_write_mod_reg(OMAP3430_IO_EN_MASK | OMAP3430_WKUP_EN_MASK, 860 omap2_prm_write_mod_reg(OMAP3430_IO_EN_MASK | OMAP3430_WKUP_EN_MASK,
860 OCP_MOD, OMAP3_PRM_IRQENABLE_MPU_OFFSET); 861 OCP_MOD, OMAP3_PRM_IRQENABLE_MPU_OFFSET);
861 862
862 /* Enable PM_WKEN to support DSS LPR */ 863 /* Enable PM_WKEN to support DSS LPR */
863 prm_write_mod_reg(OMAP3430_PM_WKEN_DSS_EN_DSS_MASK, 864 omap2_prm_write_mod_reg(OMAP3430_PM_WKEN_DSS_EN_DSS_MASK,
864 OMAP3430_DSS_MOD, PM_WKEN); 865 OMAP3430_DSS_MOD, PM_WKEN);
865 866
866 /* Enable wakeups in PER */ 867 /* Enable wakeups in PER */
867 prm_write_mod_reg(omap3630_en_uart4_mask | 868 omap2_prm_write_mod_reg(omap3630_en_uart4_mask |
868 OMAP3430_EN_GPIO2_MASK | OMAP3430_EN_GPIO3_MASK | 869 OMAP3430_EN_GPIO2_MASK | OMAP3430_EN_GPIO3_MASK |
869 OMAP3430_EN_GPIO4_MASK | OMAP3430_EN_GPIO5_MASK | 870 OMAP3430_EN_GPIO4_MASK | OMAP3430_EN_GPIO5_MASK |
870 OMAP3430_EN_GPIO6_MASK | OMAP3430_EN_UART3_MASK | 871 OMAP3430_EN_GPIO6_MASK | OMAP3430_EN_UART3_MASK |
@@ -872,7 +873,7 @@ static void __init prcm_setup_regs(void)
872 OMAP3430_EN_MCBSP4_MASK, 873 OMAP3430_EN_MCBSP4_MASK,
873 OMAP3430_PER_MOD, PM_WKEN); 874 OMAP3430_PER_MOD, PM_WKEN);
874 /* and allow them to wake up MPU */ 875 /* and allow them to wake up MPU */
875 prm_write_mod_reg(omap3630_grpsel_uart4_mask | 876 omap2_prm_write_mod_reg(omap3630_grpsel_uart4_mask |
876 OMAP3430_GRPSEL_GPIO2_MASK | 877 OMAP3430_GRPSEL_GPIO2_MASK |
877 OMAP3430_GRPSEL_GPIO3_MASK | 878 OMAP3430_GRPSEL_GPIO3_MASK |
878 OMAP3430_GRPSEL_GPIO4_MASK | 879 OMAP3430_GRPSEL_GPIO4_MASK |
@@ -885,22 +886,22 @@ static void __init prcm_setup_regs(void)
885 OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL); 886 OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL);
886 887
887 /* Don't attach IVA interrupts */ 888 /* Don't attach IVA interrupts */
888 prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL); 889 omap2_prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL);
889 prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1); 890 omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1);
890 prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3); 891 omap2_prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3);
891 prm_write_mod_reg(0, OMAP3430_PER_MOD, OMAP3430_PM_IVAGRPSEL); 892 omap2_prm_write_mod_reg(0, OMAP3430_PER_MOD, OMAP3430_PM_IVAGRPSEL);
892 893
893 /* Clear any pending 'reset' flags */ 894 /* Clear any pending 'reset' flags */
894 prm_write_mod_reg(0xffffffff, MPU_MOD, OMAP2_RM_RSTST); 895 omap2_prm_write_mod_reg(0xffffffff, MPU_MOD, OMAP2_RM_RSTST);
895 prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP2_RM_RSTST); 896 omap2_prm_write_mod_reg(0xffffffff, CORE_MOD, OMAP2_RM_RSTST);
896 prm_write_mod_reg(0xffffffff, OMAP3430_PER_MOD, OMAP2_RM_RSTST); 897 omap2_prm_write_mod_reg(0xffffffff, OMAP3430_PER_MOD, OMAP2_RM_RSTST);
897 prm_write_mod_reg(0xffffffff, OMAP3430_EMU_MOD, OMAP2_RM_RSTST); 898 omap2_prm_write_mod_reg(0xffffffff, OMAP3430_EMU_MOD, OMAP2_RM_RSTST);
898 prm_write_mod_reg(0xffffffff, OMAP3430_NEON_MOD, OMAP2_RM_RSTST); 899 omap2_prm_write_mod_reg(0xffffffff, OMAP3430_NEON_MOD, OMAP2_RM_RSTST);
899 prm_write_mod_reg(0xffffffff, OMAP3430_DSS_MOD, OMAP2_RM_RSTST); 900 omap2_prm_write_mod_reg(0xffffffff, OMAP3430_DSS_MOD, OMAP2_RM_RSTST);
900 prm_write_mod_reg(0xffffffff, OMAP3430ES2_USBHOST_MOD, OMAP2_RM_RSTST); 901 omap2_prm_write_mod_reg(0xffffffff, OMAP3430ES2_USBHOST_MOD, OMAP2_RM_RSTST);
901 902
902 /* Clear any pending PRCM interrupts */ 903 /* Clear any pending PRCM interrupts */
903 prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); 904 omap2_prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET);
904 905
905 omap3_iva_idle(); 906 omap3_iva_idle();
906 omap3_d2d_idle(); 907 omap3_d2d_idle();