From: "ext C.A, Subramaniam" <subramaniam.ca@xxxxxx> Subject: [PATCH 8/10 v2] omap mailbox: OMAP4-Mailbox - Adds code changes to support OMAP4 mailbox. Date: Tue, 17 Nov 2009 15:51:14 +0100 > Hi Tony, > Following is the version 2 of Patch 8/10 (removing all #fidefs) > > Regards > Subbu > > From 775dde65217785f519efe2a202489a791460f861 Mon Sep 17 00:00:00 2001 > From: C A Subramaniam <subramaniam.ca@xxxxxx> > Date: Fri, 13 Nov 2009 16:42:40 +0530 > Subject: [PATCH 8/10 v2] omap mailbox: OMAP4-Mailbox - Adds code changes to support OMAP4 mailbox. > > This patch adds code changes in the mailbox driver module to > add support for OMAP4 mailbox. > Removed #ifdef CONFIG_ARCH_OMAP4 > > Signed-off-by: Hari Kanigeri <h-kanigeri2@xxxxxx> > Signed-off-by: C A Subramaniam <subramaniam.ca@xxxxxx> > Signed-off-by: Ramesh Gupta G <grgupta@xxxxxx> > --- > arch/arm/mach-omap2/mailbox.c | 140 ++++++++++++++++++++++++++++++++++------- > arch/arm/plat-omap/mailbox.c | 25 ++++++-- > 2 files changed, 136 insertions(+), 29 deletions(-) > > diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c > index 5ba3aa6..d20550f 100644 > --- a/arch/arm/mach-omap2/mailbox.c > +++ b/arch/arm/mach-omap2/mailbox.c > @@ -18,6 +18,8 @@ > #include <plat/mailbox.h> > #include <mach/irqs.h> > > +#define DRV_NAME "omap2-mailbox" > + > #define MAILBOX_REVISION 0x000 > #define MAILBOX_SYSCONFIG 0x010 > #define MAILBOX_SYSSTATUS 0x014 > @@ -27,8 +29,12 @@ > #define MAILBOX_IRQSTATUS(u) (0x100 + 8 * (u)) > #define MAILBOX_IRQENABLE(u) (0x104 + 8 * (u)) > > -#define MAILBOX_IRQ_NEWMSG(u) (1 << (2 * (u))) > -#define MAILBOX_IRQ_NOTFULL(u) (1 << (2 * (u) + 1)) > +#define OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 10 * (u)) > +#define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 10 * (u)) > +#define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 10 * (u)) > + > +#define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m))) > +#define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1)) > > /* SYSCONFIG: register bit definition */ > #define AUTOIDLE (1 << 0) > @@ -39,7 +45,11 @@ > #define RESETDONE (1 << 0) > > #define MBOX_REG_SIZE 0x120 > + > +#define OMAP4_MBOX_REG_SIZE 0x130 > + > #define MBOX_NR_REGS (MBOX_REG_SIZE / sizeof(u32)) > +#define OMAP4_MBOX_NR_REGS (OMAP4_MBOX_REG_SIZE / sizeof(u32)) Doesn't this modification break other OMAP arch support? We need to support OMAP2/3/4 mailbox with this file. > > static void __iomem *mbox_base; > > @@ -56,7 +66,8 @@ struct omap_mbox2_priv { > unsigned long irqstatus; > u32 newmsg_bit; > u32 notfull_bit; > - u32 ctx[MBOX_NR_REGS]; > + u32 ctx[OMAP4_MBOX_REG_SIZE]; Is this only valid for OMAP4? -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html