aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/mailbox.c
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2010-02-05 18:20:26 -0500
committerTony Lindgren <tony@atomide.com>2010-02-23 18:29:22 -0500
commit4499ce42935db68debba0a2d2ab8280627e4b692 (patch)
treea7fe397ba5d7e3b5f62cd92d669bbb5e758d477a /arch/arm/mach-omap2/mailbox.c
parenta6a6022871b83ff31c34495709f53e3faef80976 (diff)
omap: mailbox: correct OMAP4 SIDLEMODE logic
OMAP4 mailbox has a different MAILBOX_SYSCONFIG register. There is now no AutoIdle. The SIDLEMODE bits have been right-shifted by 1 bit and now occupy bits 2 & 3. Signed-off-by: Suman Anna <s-anna@ti.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mailbox.c')
-rw-r--r--arch/arm/mach-omap2/mailbox.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 6519716571cb..52a981cb8fdd 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -41,6 +41,8 @@
41#define SOFTRESET (1 << 1) 41#define SOFTRESET (1 << 1)
42#define SMARTIDLE (2 << 3) 42#define SMARTIDLE (2 << 3)
43#define OMAP4_SOFTRESET (1 << 0) 43#define OMAP4_SOFTRESET (1 << 0)
44#define OMAP4_NOIDLE (1 << 2)
45#define OMAP4_SMARTIDLE (2 << 2)
44 46
45/* SYSSTATUS: register bit definition */ 47/* SYSSTATUS: register bit definition */
46#define RESETDONE (1 << 0) 48#define RESETDONE (1 << 0)
@@ -131,7 +133,10 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
131 l = mbox_read_reg(MAILBOX_REVISION); 133 l = mbox_read_reg(MAILBOX_REVISION);
132 pr_info("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f)); 134 pr_info("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f));
133 135
134 l = SMARTIDLE | AUTOIDLE; 136 if (cpu_is_omap44xx())
137 l = OMAP4_SMARTIDLE;
138 else
139 l = SMARTIDLE | AUTOIDLE;
135 mbox_write_reg(l, MAILBOX_SYSCONFIG); 140 mbox_write_reg(l, MAILBOX_SYSCONFIG);
136 141
137 omap2_mbox_enable_irq(mbox, IRQ_RX); 142 omap2_mbox_enable_irq(mbox, IRQ_RX);