aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorGovindraj.R <govindraj.raja@ti.com>2010-09-27 10:50:25 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-09-29 15:43:00 -0400
commite586368904b737b4888927e4c869a25966e5cd05 (patch)
treeaa432e91badece35f181bbcbfd93e89f58ede87f /arch/arm/mach-omap2
parenta0edcdbe5295b7912e92ff88dd8f46646710735b (diff)
OMAP3: PRCM: Consider UART4 for 3630 chip in prcm_setup_regs
To standarize among other uarts (1 to 3), we shall now: - Enable uart4 autodile bit. - Enable uart4 wakeup in PER. - Allow uart4 to wakeup the MPU. Signed-off-by: Sergio Aguirre <saaguirre@ti.com> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/cm-regbits-34xx.h2
-rw-r--r--arch/arm/mach-omap2/pm34xx.c15
-rw-r--r--arch/arm/mach-omap2/prcm-common.h2
-rw-r--r--arch/arm/mach-omap2/prm-regbits-34xx.h1
4 files changed, 18 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
index fe82b79d5f3b..4f959a7d881c 100644
--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -649,6 +649,8 @@
649#define OMAP3430_ST_MCBSP2_MASK (1 << 0) 649#define OMAP3430_ST_MCBSP2_MASK (1 << 0)
650 650
651/* CM_AUTOIDLE_PER */ 651/* CM_AUTOIDLE_PER */
652#define OMAP3630_AUTO_UART4_MASK (1 << 18)
653#define OMAP3630_AUTO_UART4_SHIFT 18
652#define OMAP3430_AUTO_GPIO6_MASK (1 << 17) 654#define OMAP3430_AUTO_GPIO6_MASK (1 << 17)
653#define OMAP3430_AUTO_GPIO6_SHIFT 17 655#define OMAP3430_AUTO_GPIO6_SHIFT 17
654#define OMAP3430_AUTO_GPIO5_MASK (1 << 16) 656#define OMAP3430_AUTO_GPIO5_MASK (1 << 16)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index d2b940c7215d..043faaa3f3dc 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -676,6 +676,14 @@ static void __init omap3_d2d_idle(void)
676 676
677static void __init prcm_setup_regs(void) 677static void __init prcm_setup_regs(void)
678{ 678{
679 u32 omap3630_auto_uart4_mask = cpu_is_omap3630() ?
680 OMAP3630_AUTO_UART4_MASK : 0;
681 u32 omap3630_en_uart4_mask = cpu_is_omap3630() ?
682 OMAP3630_EN_UART4_MASK : 0;
683 u32 omap3630_grpsel_uart4_mask = cpu_is_omap3630() ?
684 OMAP3630_GRPSEL_UART4_MASK : 0;
685
686
679 /* XXX Reset all wkdeps. This should be done when initializing 687 /* XXX Reset all wkdeps. This should be done when initializing
680 * powerdomains */ 688 * powerdomains */
681 prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP); 689 prm_write_mod_reg(0, OMAP3430_IVA2_MOD, PM_WKDEP);
@@ -762,6 +770,7 @@ static void __init prcm_setup_regs(void)
762 CM_AUTOIDLE); 770 CM_AUTOIDLE);
763 771
764 cm_write_mod_reg( 772 cm_write_mod_reg(
773 omap3630_auto_uart4_mask |
765 OMAP3430_AUTO_GPIO6_MASK | 774 OMAP3430_AUTO_GPIO6_MASK |
766 OMAP3430_AUTO_GPIO5_MASK | 775 OMAP3430_AUTO_GPIO5_MASK |
767 OMAP3430_AUTO_GPIO4_MASK | 776 OMAP3430_AUTO_GPIO4_MASK |
@@ -838,14 +847,16 @@ static void __init prcm_setup_regs(void)
838 OMAP3430_DSS_MOD, PM_WKEN); 847 OMAP3430_DSS_MOD, PM_WKEN);
839 848
840 /* Enable wakeups in PER */ 849 /* Enable wakeups in PER */
841 prm_write_mod_reg(OMAP3430_EN_GPIO2_MASK | OMAP3430_EN_GPIO3_MASK | 850 prm_write_mod_reg(omap3630_en_uart4_mask |
851 OMAP3430_EN_GPIO2_MASK | OMAP3430_EN_GPIO3_MASK |
842 OMAP3430_EN_GPIO4_MASK | OMAP3430_EN_GPIO5_MASK | 852 OMAP3430_EN_GPIO4_MASK | OMAP3430_EN_GPIO5_MASK |
843 OMAP3430_EN_GPIO6_MASK | OMAP3430_EN_UART3_MASK | 853 OMAP3430_EN_GPIO6_MASK | OMAP3430_EN_UART3_MASK |
844 OMAP3430_EN_MCBSP2_MASK | OMAP3430_EN_MCBSP3_MASK | 854 OMAP3430_EN_MCBSP2_MASK | OMAP3430_EN_MCBSP3_MASK |
845 OMAP3430_EN_MCBSP4_MASK, 855 OMAP3430_EN_MCBSP4_MASK,
846 OMAP3430_PER_MOD, PM_WKEN); 856 OMAP3430_PER_MOD, PM_WKEN);
847 /* and allow them to wake up MPU */ 857 /* and allow them to wake up MPU */
848 prm_write_mod_reg(OMAP3430_GRPSEL_GPIO2_MASK | 858 prm_write_mod_reg(omap3630_grpsel_uart4_mask |
859 OMAP3430_GRPSEL_GPIO2_MASK |
849 OMAP3430_GRPSEL_GPIO3_MASK | 860 OMAP3430_GRPSEL_GPIO3_MASK |
850 OMAP3430_GRPSEL_GPIO4_MASK | 861 OMAP3430_GRPSEL_GPIO4_MASK |
851 OMAP3430_GRPSEL_GPIO5_MASK | 862 OMAP3430_GRPSEL_GPIO5_MASK |
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 86edcf9ada7c..298a22a754e2 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -425,6 +425,8 @@
425#define OMAP3430_EN_MCBSP2_SHIFT 0 425#define OMAP3430_EN_MCBSP2_SHIFT 0
426 426
427/* CM_IDLEST_PER, PM_WKST_PER shared bits */ 427/* CM_IDLEST_PER, PM_WKST_PER shared bits */
428#define OMAP3630_ST_UART4_SHIFT 18
429#define OMAP3630_ST_UART4_MASK (1 << 18)
428#define OMAP3430_ST_GPIO6_SHIFT 17 430#define OMAP3430_ST_GPIO6_SHIFT 17
429#define OMAP3430_ST_GPIO6_MASK (1 << 17) 431#define OMAP3430_ST_GPIO6_MASK (1 << 17)
430#define OMAP3430_ST_GPIO5_SHIFT 16 432#define OMAP3430_ST_GPIO5_SHIFT 16
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
index 7fd6023edf96..9e63cb743a97 100644
--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -122,6 +122,7 @@
122#define OMAP3430_MEMRETSTATE_MASK (1 << 8) 122#define OMAP3430_MEMRETSTATE_MASK (1 << 8)
123 123
124/* PM_MPUGRPSEL_PER, PM_IVA2GRPSEL_PER shared bits */ 124/* PM_MPUGRPSEL_PER, PM_IVA2GRPSEL_PER shared bits */
125#define OMAP3630_GRPSEL_UART4_MASK (1 << 18)
125#define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17) 126#define OMAP3430_GRPSEL_GPIO6_MASK (1 << 17)
126#define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16) 127#define OMAP3430_GRPSEL_GPIO5_MASK (1 << 16)
127#define OMAP3430_GRPSEL_GPIO4_MASK (1 << 15) 128#define OMAP3430_GRPSEL_GPIO4_MASK (1 << 15)