Skip to content

Commit

Permalink
ARM: OMAP2+: create dsp device only on OMAP3 SoCs
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Suman Anna authored and Tony Lindgren committed Jul 7, 2014
1 parent e120fb4 commit 526570c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arm/mach-omap2/dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#ifdef CONFIG_TIDSPBRIDGE_DVFS
#include "omap-pm.h"
#endif
#include "soc.h"

#include <linux/platform_data/dsp-omap.h>

Expand Down Expand Up @@ -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;

Expand All @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 526570c

Please sign in to comment.