All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] OMAP2420: mailbox: fix IVA vs DSP IRQ numbering
@ 2011-02-11 19:56 ` Kevin Hilman
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-02-11 19:56 UTC (permalink / raw)
  To: linux-omap, Hiroshi DOYU; +Cc: linux-arm-kernel

The IRQ numbering for the IVA and DSP mailboxes was switched due
to the wrong ordering in the OMAP2 mbox list.  Switch the ordering
so DSP is first and matches all the other SoCs.

Tested on OMAP2420/n810.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
 arch/arm/mach-omap2/mailbox.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index b4cd2aa..1ccf1d6 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -334,7 +334,7 @@ static struct omap_mbox mbox_iva_info = {
 	.priv	= &omap2_mbox_iva_priv,
 };
 
-struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL };
+struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL };
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4)
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 1/2] OMAP2420: mailbox: fix IVA vs DSP IRQ numbering
@ 2011-02-11 19:56 ` Kevin Hilman
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-02-11 19:56 UTC (permalink / raw)
  To: linux-arm-kernel

The IRQ numbering for the IVA and DSP mailboxes was switched due
to the wrong ordering in the OMAP2 mbox list.  Switch the ordering
so DSP is first and matches all the other SoCs.

Tested on OMAP2420/n810.

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
 arch/arm/mach-omap2/mailbox.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index b4cd2aa..1ccf1d6 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -334,7 +334,7 @@ static struct omap_mbox mbox_iva_info = {
 	.priv	= &omap2_mbox_iva_priv,
 };
 
-struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL };
+struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL };
 #endif
 
 #if defined(CONFIG_ARCH_OMAP4)
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] OMAP2+: mailbox: fix lookups for multiple mailboxes
  2011-02-11 19:56 ` Kevin Hilman
@ 2011-02-11 19:56   ` Kevin Hilman
  -1 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-02-11 19:56 UTC (permalink / raw)
  To: linux-omap, Hiroshi DOYU; +Cc: linux-arm-kernel

The pointer math in omap_mbox_get() is not quite right, and leads to
passing NULL to strcmp() when searching for an mbox that is not first
in the list.

Convert to using array indexing as is done in all the other functions
which walk the mbox list.

Tested on OMAP2420/n810, OMAP3630/zoom3, OMAP4430/Blaze

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
 arch/arm/plat-omap/mailbox.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 459b319..49d3208 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -322,15 +322,18 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
 
 struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb)
 {
-	struct omap_mbox *mbox;
-	int ret;
+	struct omap_mbox *_mbox, *mbox = NULL;
+	int i, ret;
 
 	if (!mboxes)
 		return ERR_PTR(-EINVAL);
 
-	for (mbox = *mboxes; mbox; mbox++)
-		if (!strcmp(mbox->name, name))
+	for (i = 0; (_mbox = mboxes[i]); i++) {
+		if (!strcmp(_mbox->name, name)) {
+			mbox = _mbox;
 			break;
+		}
+	}
 
 	if (!mbox)
 		return ERR_PTR(-ENOENT);
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] OMAP2+: mailbox: fix lookups for multiple mailboxes
@ 2011-02-11 19:56   ` Kevin Hilman
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2011-02-11 19:56 UTC (permalink / raw)
  To: linux-arm-kernel

The pointer math in omap_mbox_get() is not quite right, and leads to
passing NULL to strcmp() when searching for an mbox that is not first
in the list.

Convert to using array indexing as is done in all the other functions
which walk the mbox list.

Tested on OMAP2420/n810, OMAP3630/zoom3, OMAP4430/Blaze

Signed-off-by: Kevin Hilman <khilman@ti.com>
---
 arch/arm/plat-omap/mailbox.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 459b319..49d3208 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -322,15 +322,18 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
 
 struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb)
 {
-	struct omap_mbox *mbox;
-	int ret;
+	struct omap_mbox *_mbox, *mbox = NULL;
+	int i, ret;
 
 	if (!mboxes)
 		return ERR_PTR(-EINVAL);
 
-	for (mbox = *mboxes; mbox; mbox++)
-		if (!strcmp(mbox->name, name))
+	for (i = 0; (_mbox = mboxes[i]); i++) {
+		if (!strcmp(_mbox->name, name)) {
+			mbox = _mbox;
 			break;
+		}
+	}
 
 	if (!mbox)
 		return ERR_PTR(-ENOENT);
-- 
1.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] OMAP2420: mailbox: fix IVA vs DSP IRQ numbering
  2011-02-11 19:56 ` Kevin Hilman
@ 2011-02-14 21:20   ` Tony Lindgren
  -1 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2011-02-14 21:20 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap, Hiroshi DOYU, linux-arm-kernel

* Kevin Hilman <khilman@ti.com> [110211 11:55]:
> The IRQ numbering for the IVA and DSP mailboxes was switched due
> to the wrong ordering in the OMAP2 mbox list.  Switch the ordering
> so DSP is first and matches all the other SoCs.
> 
> Tested on OMAP2420/n810.

I'll queue both as fixes for the -rc cycle.

Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] OMAP2420: mailbox: fix IVA vs DSP IRQ numbering
@ 2011-02-14 21:20   ` Tony Lindgren
  0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2011-02-14 21:20 UTC (permalink / raw)
  To: linux-arm-kernel

* Kevin Hilman <khilman@ti.com> [110211 11:55]:
> The IRQ numbering for the IVA and DSP mailboxes was switched due
> to the wrong ordering in the OMAP2 mbox list.  Switch the ordering
> so DSP is first and matches all the other SoCs.
> 
> Tested on OMAP2420/n810.

I'll queue both as fixes for the -rc cycle.

Tony

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-14 21:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11 19:56 [PATCH 1/2] OMAP2420: mailbox: fix IVA vs DSP IRQ numbering Kevin Hilman
2011-02-11 19:56 ` Kevin Hilman
2011-02-11 19:56 ` [PATCH 2/2] OMAP2+: mailbox: fix lookups for multiple mailboxes Kevin Hilman
2011-02-11 19:56   ` Kevin Hilman
2011-02-14 21:20 ` [PATCH 1/2] OMAP2420: mailbox: fix IVA vs DSP IRQ numbering Tony Lindgren
2011-02-14 21:20   ` Tony Lindgren

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.