Skip to content

Commit

Permalink
omap: mailbox: correct OMAP4 SIDLEMODE logic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Suman Anna authored and Tony Lindgren committed Feb 23, 2010
1 parent a6a6022 commit 4499ce4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/arm/mach-omap2/mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#define SOFTRESET (1 << 1)
#define SMARTIDLE (2 << 3)
#define OMAP4_SOFTRESET (1 << 0)
#define OMAP4_NOIDLE (1 << 2)
#define OMAP4_SMARTIDLE (2 << 2)

/* SYSSTATUS: register bit definition */
#define RESETDONE (1 << 0)
Expand Down Expand Up @@ -131,7 +133,10 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
l = mbox_read_reg(MAILBOX_REVISION);
pr_info("omap mailbox rev %d.%d\n", (l & 0xf0) >> 4, (l & 0x0f));

l = SMARTIDLE | AUTOIDLE;
if (cpu_is_omap44xx())
l = OMAP4_SMARTIDLE;
else
l = SMARTIDLE | AUTOIDLE;
mbox_write_reg(l, MAILBOX_SYSCONFIG);

omap2_mbox_enable_irq(mbox, IRQ_RX);
Expand Down

0 comments on commit 4499ce4

Please sign in to comment.