From: Suman Anna <s-anna@ti.com>
To: linux-omap@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>,
linux-arm-kernel@lists.infradead.org, Suman Anna <s-anna@ti.com>
Subject: [PATCH 3/3] ARM: OMAP2+: create dsp device only on OMAP3 SoCs
Date: Tue, 24 Jun 2014 00:24:27 -0500 [thread overview]
Message-ID: <1403587467-59876-4-git-send-email-s-anna@ti.com> (raw)
In-Reply-To: <1403587467-59876-1-git-send-email-s-anna@ti.com>
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
next prev parent reply other threads:[~2014-06-24 5:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Suman Anna [this message]
2014-07-07 10:41 ` [PATCH 3/3] ARM: OMAP2+: create dsp device only on OMAP3 SoCs Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403587467-59876-4-git-send-email-s-anna@ti.com \
--to=s-anna@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).