linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Misc. DSPBridge build/boot fixes
@ 2014-06-24  5:24 Suman Anna
  2014-06-24  5:24 ` [PATCH 1/3] staging: tidspbridge: fix an erroneous removal of parentheses Suman Anna
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Suman Anna @ 2014-06-24  5:24 UTC (permalink / raw)
  To: linux-omap; +Cc: Tony Lindgren, linux-arm-kernel, Suman Anna

Hi,

The following are couple of miscellaneous patches for fixing build and
boot issues when I attempted to build TI DSP/Bridge while doing the
adaptation and validation of OMAP mailbox driver against the mailbox
framework. The DSP/Bridge driver is disabled by default, so these can
be treated as non-urgent fixes.

Suman Anna (3):
  staging: tidspbridge: fix an erroneous removal of parentheses
  ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver
  ARM: OMAP2+: create dsp device only on OMAP3 SoCs

 arch/arm/mach-omap2/cm-regbits-34xx.h         |  3 +++
 arch/arm/mach-omap2/dsp.c                     | 10 ++++++++++
 arch/arm/mach-omap2/prm-regbits-34xx.h        |  6 ++++++
 drivers/staging/tidspbridge/core/tiomap3430.c |  6 ++++--
 4 files changed, 23 insertions(+), 2 deletions(-)

-- 
2.0.0


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

* [PATCH 1/3] staging: tidspbridge: fix an erroneous removal of parentheses
  2014-06-24  5:24 [PATCH 0/3] Misc. DSPBridge build/boot fixes Suman Anna
@ 2014-06-24  5:24 ` Suman Anna
  2014-06-27  1:09   ` Greg Kroah-Hartman
  2014-06-24  5:24 ` [PATCH 2/3] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver Suman Anna
  2014-06-24  5:24 ` [PATCH 3/3] ARM: OMAP2+: create dsp device only on OMAP3 SoCs Suman Anna
  2 siblings, 1 reply; 7+ messages in thread
From: Suman Anna @ 2014-06-24  5:24 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, linux-arm-kernel, Suman Anna, Aybuke Ozdemir,
	Peter P Waskiewicz Jr, Omar Ramirez Luna, Greg Kroah-Hartman

Commit 4a9fdbb (staging: core: tiomap3430.c Fix line over 80 characters.)
erroneously removed the parentheses around the function pointer leading
to the following build error (when enabling the build of TI DSP/Bridge
driver):

drivers/staging/tidspbridge/core/tiomap3430.c: In function 'bridge_brd_monitor':
drivers/staging/tidspbridge/core/tiomap3430.c:283:10: error: invalid type argument of unary '*' (have 'u32')
make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430.o] Error 1

Fix this build error properly.

Fixes: 4a9fdbb (staging: core: tiomap3430.c Fix line over 80 characters.)
Cc: Aybuke Ozdemir <aybuke.147@gmail.com>
Cc: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Cc: Omar Ramirez Luna <omar.ramirez@copitl.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Suman Anna <s-anna@ti.com>
---
 drivers/staging/tidspbridge/core/tiomap3430.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/tidspbridge/core/tiomap3430.c b/drivers/staging/tidspbridge/core/tiomap3430.c
index 8945b4e..cb50120 100644
--- a/drivers/staging/tidspbridge/core/tiomap3430.c
+++ b/drivers/staging/tidspbridge/core/tiomap3430.c
@@ -280,8 +280,10 @@ static int bridge_brd_monitor(struct bridge_dev_context *dev_ctxt)
 					OMAP3430_IVA2_MOD, OMAP2_CM_CLKSTCTRL);
 
 		/* Wait until the state has moved to ON */
-		while (*pdata->dsp_prm_read(OMAP3430_IVA2_MOD, OMAP2_PM_PWSTST)&
-					OMAP_INTRANSITION_MASK);
+		while ((*pdata->dsp_prm_read)(OMAP3430_IVA2_MOD,
+					      OMAP2_PM_PWSTST) &
+						OMAP_INTRANSITION_MASK)
+			;
 		/* Disable Automatic transition */
 		(*pdata->dsp_cm_write)(OMAP34XX_CLKSTCTRL_DISABLE_AUTO,
 					OMAP3430_IVA2_MOD, OMAP2_CM_CLKSTCTRL);
-- 
2.0.0


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

* [PATCH 2/3] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver
  2014-06-24  5:24 [PATCH 0/3] Misc. DSPBridge build/boot fixes Suman Anna
  2014-06-24  5:24 ` [PATCH 1/3] staging: tidspbridge: fix an erroneous removal of parentheses Suman Anna
@ 2014-06-24  5:24 ` Suman Anna
  2014-06-30  9:43   ` Paul Walmsley
  2014-06-24  5:24 ` [PATCH 3/3] ARM: OMAP2+: create dsp device only on OMAP3 SoCs Suman Anna
  2 siblings, 1 reply; 7+ messages in thread
From: Suman Anna @ 2014-06-24  5:24 UTC (permalink / raw)
  To: linux-omap
  Cc: Tony Lindgren, linux-arm-kernel, Suman Anna, Rajendra Nayak,
	Paul Walmsley

The commit 7be914f {ARM: OMAP3: PRM/CM: Cleanup unused header} removed
some of the macros used by the TI DSP/Bridge driver. This fixes the
following build errors when trying to build DSP/Bridge driver (disabled
at present), otherwise results in the following build errors:

drivers/staging/tidspbridge/core/tiomap3430.c:531:31: error: 'OMAP3430_AUTO_IVA2_DPLL_SHIFT' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430.c:531:31: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430.o] Error 1
make[3]: *** Waiting for unfinished jobs....
drivers/staging/tidspbridge/core/tiomap_io.c: In function 'sm_interrupt_dsp':
drivers/staging/tidspbridge/core/tiomap_io.c:404:31: error: 'OMAP3430_AUTO_IVA2_DPLL_SHIFT' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap_io.c:404:31: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/tidspbridge/core/tiomap_io.c:414:12: error: 'OMAP3430_IVA2_DPLL_FREQSEL_SHIFT' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap_io.c:415:12: error: 'OMAP3430_EN_IVA2_DPLL_SHIFT' undeclared (first use in this function)
make[3]: *** [drivers/staging/tidspbridge/core/tiomap_io.o] Error 1
drivers/staging/tidspbridge/core/tiomap3430_pwr.c: In function 'dsp_clk_wakeup_event_ctrl':
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:442:19: error: 'OMAP3430_GRPSEL_GPT5_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:442:19: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:455:19: error: 'OMAP3430_GRPSEL_GPT6_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:468:19: error: 'OMAP3430_GRPSEL_GPT7_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:481:19: error: 'OMAP3430_GRPSEL_GPT8_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:494:19: error: 'OMAP3430_GRPSEL_MCBSP1_MASK' undeclared (first use in this function)
drivers/staging/tidspbridge/core/tiomap3430_pwr.c:546:19: error: 'OMAP3430_GRPSEL_MCBSP5_MASK' undeclared (first use in this function)
make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430_pwr.o] Error 1
make[2]: *** [drivers/staging/tidspbridge] Error 2

Fixes: 7be914f (ARM: OMAP3: PRM/CM: Cleanup unused header)
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
---
 arch/arm/mach-omap2/cm-regbits-34xx.h  | 3 +++
 arch/arm/mach-omap2/prm-regbits-34xx.h | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
index 04dab2f..ee6c784 100644
--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -26,11 +26,14 @@
 #define OMAP3430_EN_WDT3_SHIFT				12
 #define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK		(1 << 0)
 #define OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT		0
+#define OMAP3430_IVA2_DPLL_FREQSEL_SHIFT		4
 #define OMAP3430_IVA2_DPLL_FREQSEL_MASK			(0xf << 4)
 #define OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT		3
+#define OMAP3430_EN_IVA2_DPLL_SHIFT			0
 #define OMAP3430_EN_IVA2_DPLL_MASK			(0x7 << 0)
 #define OMAP3430_ST_IVA2_SHIFT				0
 #define OMAP3430_ST_IVA2_CLK_MASK			(1 << 0)
+#define OMAP3430_AUTO_IVA2_DPLL_SHIFT			0
 #define OMAP3430_AUTO_IVA2_DPLL_MASK			(0x7 << 0)
 #define OMAP3430_IVA2_CLK_SRC_SHIFT			19
 #define OMAP3430_IVA2_CLK_SRC_WIDTH			3
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
index 106132d..cbefbd7 100644
--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -35,6 +35,8 @@
 #define OMAP3430_LOGICSTATEST_MASK			(1 << 2)
 #define OMAP3430_LASTLOGICSTATEENTERED_MASK		(1 << 2)
 #define OMAP3430_LASTPOWERSTATEENTERED_MASK		(0x3 << 0)
+#define OMAP3430_GRPSEL_MCBSP5_MASK			(1 << 10)
+#define OMAP3430_GRPSEL_MCBSP1_MASK			(1 << 9)
 #define OMAP3630_GRPSEL_UART4_MASK			(1 << 18)
 #define OMAP3430_GRPSEL_GPIO6_MASK			(1 << 17)
 #define OMAP3430_GRPSEL_GPIO5_MASK			(1 << 16)
@@ -42,6 +44,10 @@
 #define OMAP3430_GRPSEL_GPIO3_MASK			(1 << 14)
 #define OMAP3430_GRPSEL_GPIO2_MASK			(1 << 13)
 #define OMAP3430_GRPSEL_UART3_MASK			(1 << 11)
+#define OMAP3430_GRPSEL_GPT8_MASK			(1 << 9)
+#define OMAP3430_GRPSEL_GPT7_MASK			(1 << 8)
+#define OMAP3430_GRPSEL_GPT6_MASK			(1 << 7)
+#define OMAP3430_GRPSEL_GPT5_MASK			(1 << 6)
 #define OMAP3430_GRPSEL_MCBSP4_MASK			(1 << 2)
 #define OMAP3430_GRPSEL_MCBSP3_MASK			(1 << 1)
 #define OMAP3430_GRPSEL_MCBSP2_MASK			(1 << 0)
-- 
2.0.0


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

* [PATCH 3/3] ARM: OMAP2+: create dsp device only on OMAP3 SoCs
  2014-06-24  5:24 [PATCH 0/3] Misc. DSPBridge build/boot fixes Suman Anna
  2014-06-24  5:24 ` [PATCH 1/3] staging: tidspbridge: fix an erroneous removal of parentheses Suman Anna
  2014-06-24  5:24 ` [PATCH 2/3] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver Suman Anna
@ 2014-06-24  5:24 ` Suman Anna
  2014-07-07 10:41   ` Tony Lindgren
  2 siblings, 1 reply; 7+ messages in thread
From: Suman Anna @ 2014-06-24  5:24 UTC (permalink / raw)
  To: linux-omap; +Cc: Tony Lindgren, linux-arm-kernel, Suman Anna

The DSP platform device for TI DSP/Bridge is currently
created unconditionally whenever CONFIG_TIDSPBRIDGE is
enabled. This device should only be created on OMAP34xx/
OMAP36xx SoCs, and not for other OMAP3 derived SoCs or when
booting multi-arch images on other SoCs. So, add a check for
the SoC family both before creating the device and allocating
the carveout memory for the device.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 arch/arm/mach-omap2/dsp.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c
index b8208b4..f7492df 100644
--- a/arch/arm/mach-omap2/dsp.c
+++ b/arch/arm/mach-omap2/dsp.c
@@ -29,6 +29,7 @@
 #ifdef CONFIG_TIDSPBRIDGE_DVFS
 #include "omap-pm.h"
 #endif
+#include "soc.h"
 
 #include <linux/platform_data/dsp-omap.h>
 
@@ -59,6 +60,9 @@ void __init omap_dsp_reserve_sdram_memblock(void)
 	phys_addr_t size = CONFIG_TIDSPBRIDGE_MEMPOOL_SIZE;
 	phys_addr_t paddr;
 
+	if (!cpu_is_omap34xx())
+		return;
+
 	if (!size)
 		return;
 
@@ -83,6 +87,9 @@ static int __init omap_dsp_init(void)
 	int err = -ENOMEM;
 	struct omap_dsp_platform_data *pdata = &omap_dsp_pdata;
 
+	if (!cpu_is_omap34xx())
+		return 0;
+
 	pdata->phys_mempool_base = omap_dsp_get_mempool_base();
 
 	if (pdata->phys_mempool_base) {
@@ -115,6 +122,9 @@ module_init(omap_dsp_init);
 
 static void __exit omap_dsp_exit(void)
 {
+	if (!cpu_is_omap34xx())
+		return;
+
 	platform_device_unregister(omap_dsp_pdev);
 }
 module_exit(omap_dsp_exit);
-- 
2.0.0


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

* Re: [PATCH 1/3] staging: tidspbridge: fix an erroneous removal of parentheses
  2014-06-24  5:24 ` [PATCH 1/3] staging: tidspbridge: fix an erroneous removal of parentheses Suman Anna
@ 2014-06-27  1:09   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-27  1:09 UTC (permalink / raw)
  To: Suman Anna
  Cc: linux-omap, Tony Lindgren, linux-arm-kernel, Aybuke Ozdemir,
	Peter P Waskiewicz Jr, Omar Ramirez Luna

On Tue, Jun 24, 2014 at 12:24:25AM -0500, Suman Anna wrote:
> Commit 4a9fdbb (staging: core: tiomap3430.c Fix line over 80 characters.)
> erroneously removed the parentheses around the function pointer leading
> to the following build error (when enabling the build of TI DSP/Bridge
> driver):
> 
> drivers/staging/tidspbridge/core/tiomap3430.c: In function 'bridge_brd_monitor':
> drivers/staging/tidspbridge/core/tiomap3430.c:283:10: error: invalid type argument of unary '*' (have 'u32')
> make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430.o] Error 1
> 
> Fix this build error properly.

This shows that no one really uses this driver :(

Can't we just delete the thing?

I'll go queue this up for 3.16-final, thanks.

greg k-h

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

* Re: [PATCH 2/3] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver
  2014-06-24  5:24 ` [PATCH 2/3] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver Suman Anna
@ 2014-06-30  9:43   ` Paul Walmsley
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Walmsley @ 2014-06-30  9:43 UTC (permalink / raw)
  To: Suman Anna; +Cc: linux-omap, Tony Lindgren, linux-arm-kernel, Rajendra Nayak

On Tue, 24 Jun 2014, Suman Anna wrote:

> The commit 7be914f {ARM: OMAP3: PRM/CM: Cleanup unused header} removed
> some of the macros used by the TI DSP/Bridge driver. This fixes the
> following build errors when trying to build DSP/Bridge driver (disabled
> at present), otherwise results in the following build errors:
> 
> drivers/staging/tidspbridge/core/tiomap3430.c:531:31: error: 'OMAP3430_AUTO_IVA2_DPLL_SHIFT' undeclared (first use in this function)
> drivers/staging/tidspbridge/core/tiomap3430.c:531:31: note: each undeclared identifier is reported only once for each function it appears in
> make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> drivers/staging/tidspbridge/core/tiomap_io.c: In function 'sm_interrupt_dsp':
> drivers/staging/tidspbridge/core/tiomap_io.c:404:31: error: 'OMAP3430_AUTO_IVA2_DPLL_SHIFT' undeclared (first use in this function)
> drivers/staging/tidspbridge/core/tiomap_io.c:404:31: note: each undeclared identifier is reported only once for each function it appears in
> drivers/staging/tidspbridge/core/tiomap_io.c:414:12: error: 'OMAP3430_IVA2_DPLL_FREQSEL_SHIFT' undeclared (first use in this function)
> drivers/staging/tidspbridge/core/tiomap_io.c:415:12: error: 'OMAP3430_EN_IVA2_DPLL_SHIFT' undeclared (first use in this function)
> make[3]: *** [drivers/staging/tidspbridge/core/tiomap_io.o] Error 1
> drivers/staging/tidspbridge/core/tiomap3430_pwr.c: In function 'dsp_clk_wakeup_event_ctrl':
> drivers/staging/tidspbridge/core/tiomap3430_pwr.c:442:19: error: 'OMAP3430_GRPSEL_GPT5_MASK' undeclared (first use in this function)
> drivers/staging/tidspbridge/core/tiomap3430_pwr.c:442:19: note: each undeclared identifier is reported only once for each function it appears in
> drivers/staging/tidspbridge/core/tiomap3430_pwr.c:455:19: error: 'OMAP3430_GRPSEL_GPT6_MASK' undeclared (first use in this function)
> drivers/staging/tidspbridge/core/tiomap3430_pwr.c:468:19: error: 'OMAP3430_GRPSEL_GPT7_MASK' undeclared (first use in this function)
> drivers/staging/tidspbridge/core/tiomap3430_pwr.c:481:19: error: 'OMAP3430_GRPSEL_GPT8_MASK' undeclared (first use in this function)
> drivers/staging/tidspbridge/core/tiomap3430_pwr.c:494:19: error: 'OMAP3430_GRPSEL_MCBSP1_MASK' undeclared (first use in this function)
> drivers/staging/tidspbridge/core/tiomap3430_pwr.c:546:19: error: 'OMAP3430_GRPSEL_MCBSP5_MASK' undeclared (first use in this function)
> make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430_pwr.o] Error 1
> make[2]: *** [drivers/staging/tidspbridge] Error 2
> 
> Fixes: 7be914f (ARM: OMAP3: PRM/CM: Cleanup unused header)
> Cc: Rajendra Nayak <rnayak@ti.com>
> Cc: Paul Walmsley <paul@pwsan.com>
> Signed-off-by: Suman Anna <s-anna@ti.com>

Thanks; queued for v3.16-rc.

- Paul

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

* Re: [PATCH 3/3] ARM: OMAP2+: create dsp device only on OMAP3 SoCs
  2014-06-24  5:24 ` [PATCH 3/3] ARM: OMAP2+: create dsp device only on OMAP3 SoCs Suman Anna
@ 2014-07-07 10:41   ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2014-07-07 10:41 UTC (permalink / raw)
  To: Suman Anna; +Cc: linux-omap, linux-arm-kernel

* Suman Anna <s-anna@ti.com> [140623 22:26]:
> The DSP platform device for TI DSP/Bridge is currently
> created unconditionally whenever CONFIG_TIDSPBRIDGE is
> enabled. This device should only be created on OMAP34xx/
> OMAP36xx SoCs, and not for other OMAP3 derived SoCs or when
> booting multi-arch images on other SoCs. So, add a check for
> the SoC family both before creating the device and allocating
> the carveout memory for the device.

Applying this one into omap-for-v3/16/fixes thanks.

Tony

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

end of thread, other threads:[~2014-07-07 10:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-24  5:24 [PATCH 0/3] Misc. DSPBridge build/boot fixes Suman Anna
2014-06-24  5:24 ` [PATCH 1/3] staging: tidspbridge: fix an erroneous removal of parentheses Suman Anna
2014-06-27  1:09   ` Greg Kroah-Hartman
2014-06-24  5:24 ` [PATCH 2/3] ARM: OMAP3: PRM/CM: Add back macros used by TI DSP/Bridge driver Suman Anna
2014-06-30  9:43   ` Paul Walmsley
2014-06-24  5:24 ` [PATCH 3/3] ARM: OMAP2+: create dsp device only on OMAP3 SoCs Suman Anna
2014-07-07 10:41   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).