2 * Header for OMAP mailbox driver
4 * Copyright (C) 2006 Nokia Corporation. All rights reserved.
6 * Contact: Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 #include <asm/hardware.h>
26 #if defined(CONFIG_ARCH_OMAP1)
28 #define MAILBOX_BASE (0xfffcf000)
29 #define MAILBOX_ARM2DSP1 (MAILBOX_BASE + 0x00)
30 #define MAILBOX_ARM2DSP1b (MAILBOX_BASE + 0x04)
31 #define MAILBOX_DSP2ARM1 (MAILBOX_BASE + 0x08)
32 #define MAILBOX_DSP2ARM1b (MAILBOX_BASE + 0x0c)
33 #define MAILBOX_DSP2ARM2 (MAILBOX_BASE + 0x10)
34 #define MAILBOX_DSP2ARM2b (MAILBOX_BASE + 0x14)
35 #define MAILBOX_ARM2DSP1_Flag (MAILBOX_BASE + 0x18)
36 #define MAILBOX_DSP2ARM1_Flag (MAILBOX_BASE + 0x1c)
37 #define MAILBOX_DSP2ARM2_Flag (MAILBOX_BASE + 0x20)
39 #elif defined(CONFIG_ARCH_OMAP2)
42 * Mailbox: L4 peripheral -- use omap_readX(), omap_writeX()
44 #define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000)
46 #define MAILBOX_REVISION (OMAP24XX_MAILBOX_BASE + 0x00)
47 #define MAILBOX_SYSCONFIG (OMAP24XX_MAILBOX_BASE + 0x10)
48 #define MAILBOX_SYSSTATUS (OMAP24XX_MAILBOX_BASE + 0x14)
49 #define MAILBOX_MESSAGE_0 (OMAP24XX_MAILBOX_BASE + 0x40)
50 #define MAILBOX_MESSAGE_1 (OMAP24XX_MAILBOX_BASE + 0x44)
51 #define MAILBOX_MESSAGE_2 (OMAP24XX_MAILBOX_BASE + 0x48)
52 #define MAILBOX_MESSAGE_3 (OMAP24XX_MAILBOX_BASE + 0x4c)
53 #define MAILBOX_MESSAGE_4 (OMAP24XX_MAILBOX_BASE + 0x50)
54 #define MAILBOX_MESSAGE_5 (OMAP24XX_MAILBOX_BASE + 0x54)
55 #define MAILBOX_FIFOSTATUS_0 (OMAP24XX_MAILBOX_BASE + 0x80)
56 #define MAILBOX_FIFOSTATUS_1 (OMAP24XX_MAILBOX_BASE + 0x84)
57 #define MAILBOX_FIFOSTATUS_2 (OMAP24XX_MAILBOX_BASE + 0x88)
58 #define MAILBOX_FIFOSTATUS_3 (OMAP24XX_MAILBOX_BASE + 0x8c)
59 #define MAILBOX_FIFOSTATUS_4 (OMAP24XX_MAILBOX_BASE + 0x90)
60 #define MAILBOX_FIFOSTATUS_5 (OMAP24XX_MAILBOX_BASE + 0x94)
61 #define MAILBOX_MSGSTATUS_0 (OMAP24XX_MAILBOX_BASE + 0xc0)
62 #define MAILBOX_MSGSTATUS_1 (OMAP24XX_MAILBOX_BASE + 0xc4)
63 #define MAILBOX_MSGSTATUS_2 (OMAP24XX_MAILBOX_BASE + 0xc8)
64 #define MAILBOX_MSGSTATUS_3 (OMAP24XX_MAILBOX_BASE + 0xcc)
65 #define MAILBOX_MSGSTATUS_4 (OMAP24XX_MAILBOX_BASE + 0xd0)
66 #define MAILBOX_MSGSTATUS_5 (OMAP24XX_MAILBOX_BASE + 0xd4)
67 #define MAILBOX_IRQSTATUS_0 (OMAP24XX_MAILBOX_BASE + 0x100)
68 #define MAILBOX_IRQENABLE_0 (OMAP24XX_MAILBOX_BASE + 0x104)
69 #define MAILBOX_IRQSTATUS_1 (OMAP24XX_MAILBOX_BASE + 0x108)
70 #define MAILBOX_IRQENABLE_1 (OMAP24XX_MAILBOX_BASE + 0x10c)
71 #define MAILBOX_IRQSTATUS_2 (OMAP24XX_MAILBOX_BASE + 0x110)
72 #define MAILBOX_IRQENABLE_2 (OMAP24XX_MAILBOX_BASE + 0x114)
73 #define MAILBOX_IRQSTATUS_3 (OMAP24XX_MAILBOX_BASE + 0x118)
74 #define MAILBOX_IRQENABLE_3 (OMAP24XX_MAILBOX_BASE + 0x11c)
76 #define MAILBOX_IRQ_NOTFULL(n) (1<<(2*(n)+1))
77 #define MAILBOX_IRQ_NEWMSG(n) (1<<(2*(n)))
79 #endif /* CONFIG_ARCH_OMAP2 */