ARM: OMAP: Fix 1510 compilation with DSP != m
Subsystems (3)
PATCH 1/1 ARM: OMAP: Fix 1510 compilation with DSP != m
Looks like recent changes have broken OMAP1510 compilation; I hit this because I'm not using the DSP at present but during testing my fix discovered that setting CONFIG_OMAP_DSP to Y didn't compile either; only M worked. Patch below makes all 3 compile.
-----
arch/arm/mach-omap1/devices.c +1 -1
@@ -63,7 +63,7 @@ #endif#if defined(CONFIG_OMAP_DSP ) -#if defined(CONFIG_ARCH_OMAP1510 ) +#if defined(CONFIG_ARCH_OMAP15XX )# define OMAP1_MBOX_SIZE 0x23# define INT_DSP_MAILBOX1 INT_1510_DSP_MAILBOX1#elif defined(CONFIG_ARCH_OMAP16XX )
arch/arm/plat-omap/mcbsp.c +3 -3
@@ -193,7 +193,7 @@ static int omap_mcbsp_check(unsigned intreturn -1 ; } -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )static void omap_mcbsp_dsp_request (void ) {if (cpu_is_omap15xx () ||cpu_is_omap16xx ()) {
@@ -266,7 +266,7 @@ int omap_mcbsp_request(unsigned int id)if (omap_mcbsp_check (id) <0 )return -EINVAL ; -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )/* * On 1510, 1610 and 1710, McBSP1 and McBSP3 * are DSP public peripherals.
@@ -333,7 +333,7 @@ void omap_mcbsp_free(unsigned int id)if (omap_mcbsp_check (id) <0 )return ; -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )if (cpu_class_is_omap1 ()) {if (id ==OMAP_MCBSP1 || id ==OMAP_MCBSP3 )omap_mcbsp_dsp_free ();
-----
J.
Signature · 3 lines
jid: [email protected] 101 things you can't have too much of : 44 - Fame.
Tony Lindgren
reviewerHi,
Quoted 44 lines · Jonathan McDowell
Looks like recent changes have broken OMAP1510 compilation; I hit this because I'm not using the DSP at present but during testing my fix discovered that setting
CONFIG_OMAP_DSPto Y didn't compile either; only M worked. Patch below makes all 3 compile.Signed-off-by Jonathan McDowell <[email protected]>-----
arch/arm/mach-omap1/devices.c +1
-1@@ -63,7 +63,7 @@ #endif#if defined(CONFIG_OMAP_DSP ) -#if defined(CONFIG_ARCH_OMAP1510 ) +#if defined(CONFIG_ARCH_OMAP15XX )# define OMAP1_MBOX_SIZE 0x23# define INT_DSP_MAILBOX1 INT_1510_DSP_MAILBOX1#elif defined(CONFIG_ARCH_OMAP16XX )arch/arm/plat-omap/mcbsp.c +2
-2@@ -193,7 +193,7 @@ static int omap_mcbsp_check(unsigned intreturn -1 ; } -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )static void omap_mcbsp_dsp_request (void ) {if (cpu_is_omap15xx () ||cpu_is_omap16xx ()) {@@ -266,7 +266,7 @@ int omap_mcbsp_request(unsigned int id)if (omap_mcbsp_check (id) <0 )return -EINVAL ; -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )/* * On 1510, 1610 and 1710, McBSP1 and McBSP3 * are DSP public peripherals.
arch/arm/plat-omap/mcbsp.c void omap_mcbsp_free(unsigned int id)
Quoted 9 lines
arch/arm/plat-omap/mcbsp.c +1
-2@@ -333,7 +333,7 @@ void omap_mcbsp_free(unsigned int id)if (omap_mcbsp_check (id) <0 )return ; -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )if (cpu_class_is_omap1 ()) {if (id ==OMAP_MCBSP1 || id ==OMAP_MCBSP3 )omap_mcbsp_dsp_free (); -----
I guess originally the idea was that McBSP would work even without CONFIG_OMAP_DSP.
Note that arch/arm/plat_omap/dsp/dsp_common.c is compiled even without CONFIG_OMAP_DSP. Maybe the compilation problem really is some other issue?
Regards,
Tony
Quoted 60 lines · Tony Lindgren
Hi,
Quoted 44 lines · Jonathan McDowell
Looks like recent changes have broken OMAP1510 compilation; I hit this because I'm not using the DSP at present but during testing my fix discovered that setting
CONFIG_OMAP_DSPto Y didn't compile either; only M worked. Patch below makes all 3 compile.Signed-off-by Jonathan McDowell <[email protected]>-----
arch/arm/mach-omap1/devices.c +1
-1@@ -63,7 +63,7 @@ #endif#if defined(CONFIG_OMAP_DSP ) -#if defined(CONFIG_ARCH_OMAP1510 ) +#if defined(CONFIG_ARCH_OMAP15XX )# define OMAP1_MBOX_SIZE 0x23# define INT_DSP_MAILBOX1 INT_1510_DSP_MAILBOX1#elif defined(CONFIG_ARCH_OMAP16XX )arch/arm/plat-omap/mcbsp.c +2
-2@@ -193,7 +193,7 @@ static int omap_mcbsp_check(unsigned intreturn -1 ; } -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )static void omap_mcbsp_dsp_request (void ) {if (cpu_is_omap15xx () ||cpu_is_omap16xx ()) {@@ -266,7 +266,7 @@ int omap_mcbsp_request(unsigned int id)if (omap_mcbsp_check (id) <0 )return -EINVAL ; -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )/* * On 1510, 1610 and 1710, McBSP1 and McBSP3 * are DSP public peripherals. arch/arm/plat-omap/mcbsp.c void omap_mcbsp_free(unsigned int id)
Quoted 9 lines
arch/arm/plat-omap/mcbsp.c +1
-2@@ -333,7 +333,7 @@ void omap_mcbsp_free(unsigned int id)if (omap_mcbsp_check (id) <0 )return ; -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )if (cpu_class_is_omap1 ()) {if (id ==OMAP_MCBSP1 || id ==OMAP_MCBSP3 )omap_mcbsp_dsp_free (); -----I guess originally the idea was that McBSP would work even without
CONFIG_OMAP_DSP.
Quoted 2 lines
Note that
arch/arm/plat_omap/dsp/dsp_common.cis compiled even withoutCONFIG_OMAP_DSP.
dsp_common.c will always be compiled if dsp/ is entered.
However arch/arm/plat-omap/dsp is only entered when CONFIG_OMAP_DSP is set; arch/arm/plat-omap/Makefile has:
# DSP subsystem
obj-$(CONFIG_OMAP_DSP) += dsp/ mailbox.o
J.
Signature · 4 lines
/------------------------------------\
| noodles is to go out and eat them |
| http://www.blackcatnetworks.co.uk/ |
\------------------------------------/Tony Lindgren
reviewerQuoted 64 lines · Jonathan McDowell
Quoted 60 lines · Tony Lindgren
Hi,
Quoted 44 lines · Jonathan McDowell
Looks like recent changes have broken OMAP1510 compilation; I hit this because I'm not using the DSP at present but during testing my fix discovered that setting
CONFIG_OMAP_DSPto Y didn't compile either; only M worked. Patch below makes all 3 compile.Signed-off-by Jonathan McDowell <[email protected]>-----
arch/arm/mach-omap1/devices.c +1
-1@@ -63,7 +63,7 @@ #endif#if defined(CONFIG_OMAP_DSP ) -#if defined(CONFIG_ARCH_OMAP1510 ) +#if defined(CONFIG_ARCH_OMAP15XX )# define OMAP1_MBOX_SIZE 0x23# define INT_DSP_MAILBOX1 INT_1510_DSP_MAILBOX1#elif defined(CONFIG_ARCH_OMAP16XX )arch/arm/plat-omap/mcbsp.c +2
-2@@ -193,7 +193,7 @@ static int omap_mcbsp_check(unsigned intreturn -1 ; } -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )static void omap_mcbsp_dsp_request (void ) {if (cpu_is_omap15xx () ||cpu_is_omap16xx ()) {@@ -266,7 +266,7 @@ int omap_mcbsp_request(unsigned int id)if (omap_mcbsp_check (id) <0 )return -EINVAL ; -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )/* * On 1510, 1610 and 1710, McBSP1 and McBSP3 * are DSP public peripherals. arch/arm/plat-omap/mcbsp.c void omap_mcbsp_free(unsigned int id)
Quoted 9 lines
arch/arm/plat-omap/mcbsp.c +1
-2@@ -333,7 +333,7 @@ void omap_mcbsp_free(unsigned int id)if (omap_mcbsp_check (id) <0 )return ; -#ifdef CONFIG_ARCH_OMAP1 +#if defined(CONFIG_ARCH_OMAP1 ) && defined(CONFIG_OMAP_DSP )if (cpu_class_is_omap1 ()) {if (id ==OMAP_MCBSP1 || id ==OMAP_MCBSP3 )omap_mcbsp_dsp_free (); -----I guess originally the idea was that McBSP would work even without
CONFIG_OMAP_DSP.Quoted 2 lines
Note that
arch/arm/plat_omap/dsp/dsp_common.cis compiled even withoutCONFIG_OMAP_DSP.
Quoted 7 lines
dsp_common.cwill always be compiled if dsp/ is entered.However
arch/arm/plat-omap/dspis only entered whenCONFIG_OMAP_DSPis set;arch/arm/plat-omap/Makefilehas:# DSP subsystem
obj-$(CONFIG_OMAP_DSP) += dsp/ mailbox.o
Oh yeah, that's true. Does the attached patch work for you?
I guess the right solution would be to move dsp_common.c out of dsp directory to plat-omap and always have it compile. Toshihiro & Hiroshi, do you have any better ideas?
Tony
arch/arm/plat-omap/Makefile +2 -1
@@ -26,4 +26,5 @@ obj-$(CONFIG_OMAP_COMPONENT_VERSION) += obj-$(CONFIG_OMAP_GPIO_SWITCH) += gpio-switch.o # DSP subsystem -obj-$(CONFIG_OMAP_DSP) += dsp/ mailbox.o +obj-y += dsp/ +obj-$(CONFIG_OMAP_DSP) += mailbox.o
arch/arm/plat-omap/dsp/dsp_common.c +6 -2
@@ -43,6 +43,8 @@ #elif defined(CONFIG_ARCH_OMAP2)#define dsp_boot_config (mode) writel((mode), DSP_IPI_DSPBOOTCONFIG)#endif +struct omap_dsp *omap_dsp; +#if defined(CONFIG_ARCH_OMAP1 )struct clk *dsp_ck_handle;struct clk *api_ck_handle;
@@ -371,7 +373,8 @@ #elif defined(CONFIG_ARCH_OMAP2)__dsp_core_enable ();#endif cpustat.stat =CPUSTAT_RUN ; -enable_irq (omap_dsp->mmu_irq); +if (omap_dsp !=NULL ) +enable_irq (omap_dsp->mmu_irq); }return ; }
@@ -379,7 +382,8 @@ #endif/* cpustat.req < CPUSTAT_RUN */ if (cpustat.stat ==CPUSTAT_RUN ) { -disable_irq (omap_dsp->mmu_irq); +if (omap_dsp !=NULL ) +disable_irq (omap_dsp->mmu_irq);#ifdef CONFIG_ARCH_OMAP1 clk_disable (api_ck_handle);#endif
arch/arm/plat-omap/dsp/dsp_core.c +0 -1
@@ -40,7 +40,6 @@ MODULE_AUTHOR("Toshihiro Kobayashi <toshMODULE_DESCRIPTION ("OMAP DSP driver module" );MODULE_LICENSE ("GPL" ); -struct omap_dsp *omap_dsp;static struct sync_seq *mbseq;static u16 mbseq_expect_tmp;static u16 *mbseq_expect = &mbseq_expect_tmp;
Quoted 26 lines · Tony Lindgren
Quoted 25 lines · Jonathan McDowell
Quoted 24 lines · Tony Lindgren
Hi,
Quoted 21 lines · Jonathan McDowell
Looks like recent changes have broken OMAP1510 compilation; I hit this because I'm not using the DSP at present but during testing my fix discovered that setting
CONFIG_OMAP_DSPto Y didn't compile either; only M worked. Patch below makes all 3 compile.Signed-off-by Jonathan McDowell <[email protected]>-----
arch/arm/mach-omap1/devices.c +1
-1@@ -63,7 +63,7 @@ #endif#if defined(CONFIG_OMAP_DSP ) -#if defined(CONFIG_ARCH_OMAP1510 ) +#if defined(CONFIG_ARCH_OMAP15XX )# define OMAP1_MBOX_SIZE 0x23# define INT_DSP_MAILBOX1 INT_1510_DSP_MAILBOX1#elif defined(CONFIG_ARCH_OMAP16XX )
...
Quoted 8 lines
Quoted 8 lines
Quoted 5 lines
I guess originally the idea was that McBSP would work even without
CONFIG_OMAP_DSP.Note that
arch/arm/plat_omap/dsp/dsp_common.cis compiled even withoutCONFIG_OMAP_DSP.
dsp_common.cwill always be compiled if dsp/ is entered.
Quoted 7 lines
Quoted 5 lines
However
arch/arm/plat-omap/dspis only entered whenCONFIG_OMAP_DSPis set;arch/arm/plat-omap/Makefilehas:# DSP subsystem
obj-$(CONFIG_OMAP_DSP) += dsp/ mailbox.oOh yeah, that's true. Does the attached patch work for you?
Confirmed as compiling and booting on the Amstrad Delta (OMAP1510) with CONFIG_OMAP_DSP=n.
The first part of my patch (against arch/arm/mach-omap1/devices.c) is still needed for CONFIG_OMAP_DSP=y to compile.
J.
Signature · 1 line
"Bother," said Pooh, as Piglet stamped on his bollocks.
Tony Lindgren
reviewerQuoted 42 lines · Jonathan McDowell
Quoted 26 lines · Tony Lindgren
Quoted 25 lines · Jonathan McDowell
Quoted 24 lines · Tony Lindgren
Hi,
Quoted 21 lines · Jonathan McDowell
Looks like recent changes have broken OMAP1510 compilation; I hit this because I'm not using the DSP at present but during testing my fix discovered that setting
CONFIG_OMAP_DSPto Y didn't compile either; only M worked. Patch below makes all 3 compile.Signed-off-by Jonathan McDowell <[email protected]>-----
arch/arm/mach-omap1/devices.c +1
-1@@ -63,7 +63,7 @@ #endif#if defined(CONFIG_OMAP_DSP ) -#if defined(CONFIG_ARCH_OMAP1510 ) +#if defined(CONFIG_ARCH_OMAP15XX )# define OMAP1_MBOX_SIZE 0x23# define INT_DSP_MAILBOX1 INT_1510_DSP_MAILBOX1#elif defined(CONFIG_ARCH_OMAP16XX )...
Quoted 14 lines
Quoted 13 lines
Quoted 5 lines
I guess originally the idea was that McBSP would work even without
CONFIG_OMAP_DSP.Note that
arch/arm/plat_omap/dsp/dsp_common.cis compiled even withoutCONFIG_OMAP_DSP.
dsp_common.cwill always be compiled if dsp/ is entered.However
arch/arm/plat-omap/dspis only entered whenCONFIG_OMAP_DSPis set;arch/arm/plat-omap/Makefilehas:# DSP subsystem
obj-$(CONFIG_OMAP_DSP) += dsp/ mailbox.o
Quoted 7 lines
Quoted 1 line
Oh yeah, that's true. Does the attached patch work for you?
Confirmed as compiling and booting on the Amstrad Delta (OMAP1510) with
CONFIG_OMAP_DSP=n.The first part of my patch (against
arch/arm/mach-omap1/devices.c) is still needed forCONFIG_OMAP_DSP=yto compile.
OK, I've pushed that part too and tagged 2.6.18-omap1.
Tony