* Incorrect Register Offsets in OMAP Mailbox
@ 2012-02-07 17:57 Henry Chan
2012-03-05 19:34 ` Tony Lindgren
0 siblings, 1 reply; 9+ messages in thread
From: Henry Chan @ 2012-02-07 17:57 UTC (permalink / raw)
To: linux-omap
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
Hi,
Looks like the register offsets are incorrect in the OMAP mailbox code
(arch/arm/mach-omap2/mailbox.c) for the OMAP4_MAILBOX_IRQ* macros. The
discrepancy is with p.224 of TI document SPRUGX9 and p3891 of SWPU231K.
Patch attached.
My hardware hasn't come in yet, so I would appreciate it if anyone can
share their experience using this code.
Thanks.
-H
--
Henry Chan
[-- Attachment #2: 0001-Fix-mailbox-IRQ-offsets.patch --]
[-- Type: text/x-patch, Size: 841 bytes --]
arch/arm/mach-omap2/mailbox.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 609ea2d..4801e01 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -26,9 +26,9 @@
#define MAILBOX_IRQSTATUS(u) (0x100 + 8 * (u))
#define MAILBOX_IRQENABLE(u) (0x104 + 8 * (u))
-#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 OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 0x10 * (u))
+#define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 0x10 * (u))
+#define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 0x10 * (u))
#define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
#define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
[-- Attachment #3: enli_chan.vcf --]
[-- Type: text/x-vcard, Size: 142 bytes --]
begin:vcard
fn:Henry Chan
n:Chan;Henry
email;internet:enli.chan@gmail.com
tel;cell:(315) 834-2426
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: Incorrect Register Offsets in OMAP Mailbox
2012-02-07 17:57 Incorrect Register Offsets in OMAP Mailbox Henry Chan
@ 2012-03-05 19:34 ` Tony Lindgren
2012-03-08 8:04 ` Henry Chan
0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2012-03-05 19:34 UTC (permalink / raw)
To: Henry Chan; +Cc: linux-omap
Hi Henry,
* Henry Chan <enli.chan@gmail.com> [120207 09:25]:
> Hi,
>
> Looks like the register offsets are incorrect in the OMAP mailbox code
> (arch/arm/mach-omap2/mailbox.c) for the OMAP4_MAILBOX_IRQ* macros. The
> discrepancy is with p.224 of TI document SPRUGX9 and p3891 of SWPU231K.
> Patch attached.
>
> My hardware hasn't come in yet, so I would appreciate it if anyone can
> share their experience using this code.
Can you please reply with your Signed-off-by, it's missing from the
patch.
Thanks,
Tony
> --- a/arch/arm/mach-omap2/mailbox.c
> +++ b/arch/arm/mach-omap2/mailbox.c
> @@ -26,9 +26,9 @@
> #define MAILBOX_IRQSTATUS(u) (0x100 + 8 * (u))
> #define MAILBOX_IRQENABLE(u) (0x104 + 8 * (u))
>
> -#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 OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 0x10 * (u))
> +#define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 0x10 * (u))
> +#define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 0x10 * (u))
>
> #define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
> #define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Incorrect Register Offsets in OMAP Mailbox
2012-03-05 19:34 ` Tony Lindgren
@ 2012-03-08 8:04 ` Henry Chan
2012-05-04 18:07 ` Tony Lindgren
0 siblings, 1 reply; 9+ messages in thread
From: Henry Chan @ 2012-03-08 8:04 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap
Sorry about that. Kind of new at this.
-H
Signed-off-by: Henry Chan <enli.chan@gmail.com>
On 03/05/12 11:34, Tony Lindgren wrote:
> Hi Henry,
>
> * Henry Chan <enli.chan@gmail.com> [120207 09:25]:
>> Hi,
>>
>> Looks like the register offsets are incorrect in the OMAP mailbox code
>> (arch/arm/mach-omap2/mailbox.c) for the OMAP4_MAILBOX_IRQ* macros. The
>> discrepancy is with p.224 of TI document SPRUGX9 and p3891 of SWPU231K.
>> Patch attached.
>>
>> My hardware hasn't come in yet, so I would appreciate it if anyone can
>> share their experience using this code.
>
> Can you please reply with your Signed-off-by, it's missing from the
> patch.
>
> Thanks,
>
> Tony
>
>> --- a/arch/arm/mach-omap2/mailbox.c
>> +++ b/arch/arm/mach-omap2/mailbox.c
>> @@ -26,9 +26,9 @@
>> #define MAILBOX_IRQSTATUS(u) (0x100 + 8 * (u))
>> #define MAILBOX_IRQENABLE(u) (0x104 + 8 * (u))
>>
>> -#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 OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 0x10 * (u))
>> +#define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 0x10 * (u))
>> +#define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 0x10 * (u))
>>
>> #define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
>> #define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
>>
>
--
Henry Chan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Incorrect Register Offsets in OMAP Mailbox
2012-03-08 8:04 ` Henry Chan
@ 2012-05-04 18:07 ` Tony Lindgren
0 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2012-05-04 18:07 UTC (permalink / raw)
To: Henry Chan; +Cc: linux-omap
* Henry Chan <enli.chan@gmail.com> [120307 23:33]:
> Sorry about that. Kind of new at this.
> -H
>
> Signed-off-by: Henry Chan <enli.chan@gmail.com>
Thanks, applying this finally into fixes-non-critical.
Tony
> On 03/05/12 11:34, Tony Lindgren wrote:
> > Hi Henry,
> >
> > * Henry Chan <enli.chan@gmail.com> [120207 09:25]:
> >> Hi,
> >>
> >> Looks like the register offsets are incorrect in the OMAP mailbox code
> >> (arch/arm/mach-omap2/mailbox.c) for the OMAP4_MAILBOX_IRQ* macros. The
> >> discrepancy is with p.224 of TI document SPRUGX9 and p3891 of SWPU231K.
> >> Patch attached.
> >>
> >> My hardware hasn't come in yet, so I would appreciate it if anyone can
> >> share their experience using this code.
> >
> > Can you please reply with your Signed-off-by, it's missing from the
> > patch.
> >
> > Thanks,
> >
> > Tony
> >
> >> --- a/arch/arm/mach-omap2/mailbox.c
> >> +++ b/arch/arm/mach-omap2/mailbox.c
> >> @@ -26,9 +26,9 @@
> >> #define MAILBOX_IRQSTATUS(u) (0x100 + 8 * (u))
> >> #define MAILBOX_IRQENABLE(u) (0x104 + 8 * (u))
> >>
> >> -#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 OMAP4_MAILBOX_IRQSTATUS(u) (0x104 + 0x10 * (u))
> >> +#define OMAP4_MAILBOX_IRQENABLE(u) (0x108 + 0x10 * (u))
> >> +#define OMAP4_MAILBOX_IRQENABLE_CLR(u) (0x10c + 0x10 * (u))
> >>
> >> #define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
> >> #define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
> >>
> >
> --
> Henry Chan
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Incorrect Register Offsets in OMAP Mailbox
2012-02-10 1:14 ` Tony Lindgren
@ 2012-02-10 4:25 ` Bedia, Vaibhav
0 siblings, 0 replies; 9+ messages in thread
From: Bedia, Vaibhav @ 2012-02-10 4:25 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, enli.chan
Hi Tony,
On Fri, Feb 10, 2012 at 06:44:47, Tony Lindgren wrote:
> * Bedia, Vaibhav <vaibhav.bedia@ti.com> [120209 09:27]:
> > On Thu, Feb 09, 2012 at 23:17:10, Tony Lindgren wrote:
> > > Care to reply with Acked-by/Tested-by so I can queue this into fixes?
> > >
> >
> > Acked-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
>
> Is the mailbox now actually usable on this hardware with this patch?
>
I am using this fix to make use of the mailbox on AM335x which has the same IP
as OMAP4. With a couple of patches to add AM335x support I have been able to make
use of the mailbox for one-way communication between the A8 and Cortex-M3.
I don't have an OMAP4 board with me to test this out.
Regards,
Vaibhav
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Incorrect Register Offsets in OMAP Mailbox
2012-02-09 17:58 ` Bedia, Vaibhav
@ 2012-02-10 1:14 ` Tony Lindgren
2012-02-10 4:25 ` Bedia, Vaibhav
0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2012-02-10 1:14 UTC (permalink / raw)
To: Bedia, Vaibhav; +Cc: linux-omap, enli.chan
* Bedia, Vaibhav <vaibhav.bedia@ti.com> [120209 09:27]:
> On Thu, Feb 09, 2012 at 23:17:10, Tony Lindgren wrote:
> > Care to reply with Acked-by/Tested-by so I can queue this into fixes?
> >
>
> Acked-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Is the mailbox now actually usable on this hardware with this patch?
Regards,
Tony
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Incorrect Register Offsets in OMAP Mailbox
2012-02-09 17:47 ` Tony Lindgren
@ 2012-02-09 17:58 ` Bedia, Vaibhav
2012-02-10 1:14 ` Tony Lindgren
0 siblings, 1 reply; 9+ messages in thread
From: Bedia, Vaibhav @ 2012-02-09 17:58 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, enli.chan
On Thu, Feb 09, 2012 at 23:17:10, Tony Lindgren wrote:
> Care to reply with Acked-by/Tested-by so I can queue this into fixes?
>
Acked-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Incorrect Register Offsets in OMAP Mailbox
2012-02-09 11:25 ` Bedia, Vaibhav
@ 2012-02-09 17:47 ` Tony Lindgren
2012-02-09 17:58 ` Bedia, Vaibhav
0 siblings, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2012-02-09 17:47 UTC (permalink / raw)
To: Bedia, Vaibhav; +Cc: linux-omap, enli.chan
* Bedia, Vaibhav <vaibhav.bedia@ti.com> [120209 02:54]:
> > -----Original Message-----
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Henry Chan
> > Sent: Tuesday, February 07, 2012 11:27 PM
> > To: linux-omap@vger.kernel.org
> > Subject: Incorrect Register Offsets in OMAP Mailbox
> >
> > Hi,
> >
> > Looks like the register offsets are incorrect in the OMAP mailbox code
> > (arch/arm/mach-omap2/mailbox.c) for the OMAP4_MAILBOX_IRQ* macros. The
> > discrepancy is with p.224 of TI document SPRUGX9 and p3891 of SWPU231K.
> > Patch attached.
> >
> > My hardware hasn't come in yet, so I would appreciate it if anyone can
> > share their experience using this code.
> >
>
> Yes, this change is required. Other than this fix the code is fine IMO.
>
> I guess the address calculation macros can be simplified to match with the
> terminology used in the TRM. I'll submit a patch for that once I manage to
> get some time for doing it right.
Care to reply with Acked-by/Tested-by so I can queue this into fixes?
Regards,
Tony
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Incorrect Register Offsets in OMAP Mailbox
[not found] <331ABD5ECB02734CA317220B2BBEABC1317897C8@DBDE01.ent.ti.com>
@ 2012-02-09 11:25 ` Bedia, Vaibhav
2012-02-09 17:47 ` Tony Lindgren
0 siblings, 1 reply; 9+ messages in thread
From: Bedia, Vaibhav @ 2012-02-09 11:25 UTC (permalink / raw)
To: linux-omap, enli.chan
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Henry Chan
> Sent: Tuesday, February 07, 2012 11:27 PM
> To: linux-omap@vger.kernel.org
> Subject: Incorrect Register Offsets in OMAP Mailbox
>
> Hi,
>
> Looks like the register offsets are incorrect in the OMAP mailbox code
> (arch/arm/mach-omap2/mailbox.c) for the OMAP4_MAILBOX_IRQ* macros. The
> discrepancy is with p.224 of TI document SPRUGX9 and p3891 of SWPU231K.
> Patch attached.
>
> My hardware hasn't come in yet, so I would appreciate it if anyone can
> share their experience using this code.
>
Yes, this change is required. Other than this fix the code is fine IMO.
I guess the address calculation macros can be simplified to match with the
terminology used in the TRM. I'll submit a patch for that once I manage to
get some time for doing it right.
Regards,
Vaibhav
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-05-04 18:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-07 17:57 Incorrect Register Offsets in OMAP Mailbox Henry Chan
2012-03-05 19:34 ` Tony Lindgren
2012-03-08 8:04 ` Henry Chan
2012-05-04 18:07 ` Tony Lindgren
[not found] <331ABD5ECB02734CA317220B2BBEABC1317897C8@DBDE01.ent.ti.com>
2012-02-09 11:25 ` Bedia, Vaibhav
2012-02-09 17:47 ` Tony Lindgren
2012-02-09 17:58 ` Bedia, Vaibhav
2012-02-10 1:14 ` Tony Lindgren
2012-02-10 4:25 ` Bedia, Vaibhav
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.