summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/mailbox.c
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2010-06-11 15:51:47 +0000
committerHiroshi DOYU <Hiroshi.DOYU@nokia.com>2010-08-04 15:50:19 +0300
commit14476bd9373ed76858eaeb038eff8790ba36030e (patch)
tree283ef4916edbf7ab9d24aeb3369aace11ed8045d /arch/arm/mach-omap2/mailbox.c
parent9c80c8cd740f802eed27ed1c1334262b205bb8f5 (diff)
omap: mailbox: only compile for configured archs
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Diffstat (limited to 'arch/arm/mach-omap2/mailbox.c')
-rw-r--r--arch/arm/mach-omap2/mailbox.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 55d8b77f0fc0..4c0c1124e8c8 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -284,6 +284,7 @@ static struct omap_mbox_ops omap2_mbox_ops = {
/* FIXME: the following structs should be filled automatically by the user id */
+#if defined(CONFIG_ARCH_OMAP3430) || defined(CONFIG_ARCH_OMAP2420)
/* DSP */
static struct omap_mbox2_priv omap2_mbox_dsp_priv = {
.tx_fifo = {
@@ -306,11 +307,13 @@ struct omap_mbox mbox_dsp_info = {
.ops = &omap2_mbox_ops,
.priv = &omap2_mbox_dsp_priv,
};
+#endif
+#if defined(CONFIG_ARCH_OMAP3430)
struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL };
+#endif
#if defined(CONFIG_ARCH_OMAP2420)
-
/* IVA */
static struct omap_mbox2_priv omap2_mbox_iva_priv = {
.tx_fifo = {
@@ -337,6 +340,7 @@ static struct omap_mbox mbox_iva_info = {
struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL };
#endif
+#if defined(CONFIG_ARCH_OMAP4)
/* OMAP4 */
static struct omap_mbox2_priv omap2_mbox_1_priv = {
.tx_fifo = {
@@ -383,6 +387,7 @@ struct omap_mbox mbox_2_info = {
};
struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL };
+#endif
static int __devinit omap2_mbox_probe(struct platform_device *pdev)
{
@@ -390,11 +395,15 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
int ret;
struct omap_mbox **list;
- if (cpu_is_omap3430()) {
+ if (false)
+ ;
+#if defined(CONFIG_ARCH_OMAP3430)
+ else if (cpu_is_omap3430()) {
list = omap3_mboxes;
list[0]->irq = platform_get_irq_byname(pdev, "dsp");
}
+#endif
#if defined(CONFIG_ARCH_OMAP2420)
else if (cpu_is_omap2420()) {
list = omap2_mboxes;
@@ -403,12 +412,14 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
list[1]->irq = platform_get_irq_byname(pdev, "iva");
}
#endif
+#if defined(CONFIG_ARCH_OMAP4)
else if (cpu_is_omap44xx()) {
list = omap4_mboxes;
list[0]->irq = list[1]->irq =
platform_get_irq_byname(pdev, "mbox");
}
+#endif
else {
pr_err("%s: platform not supported\n", __func__);
return -ENODEV;