diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2010-06-11 11:51:47 -0400 |
---|---|---|
committer | Hiroshi DOYU <Hiroshi.DOYU@nokia.com> | 2010-08-04 08:50:19 -0400 |
commit | 14476bd9373ed76858eaeb038eff8790ba36030e (patch) | |
tree | 283ef4916edbf7ab9d24aeb3369aace11ed8045d /arch/arm/mach-omap2/mailbox.c | |
parent | 9c80c8cd740f802eed27ed1c1334262b205bb8f5 (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.c | 15 |
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 = { | |||
284 | 284 | ||
285 | /* FIXME: the following structs should be filled automatically by the user id */ | 285 | /* FIXME: the following structs should be filled automatically by the user id */ |
286 | 286 | ||
287 | #if defined(CONFIG_ARCH_OMAP3430) || defined(CONFIG_ARCH_OMAP2420) | ||
287 | /* DSP */ | 288 | /* DSP */ |
288 | static struct omap_mbox2_priv omap2_mbox_dsp_priv = { | 289 | static struct omap_mbox2_priv omap2_mbox_dsp_priv = { |
289 | .tx_fifo = { | 290 | .tx_fifo = { |
@@ -306,11 +307,13 @@ struct omap_mbox mbox_dsp_info = { | |||
306 | .ops = &omap2_mbox_ops, | 307 | .ops = &omap2_mbox_ops, |
307 | .priv = &omap2_mbox_dsp_priv, | 308 | .priv = &omap2_mbox_dsp_priv, |
308 | }; | 309 | }; |
310 | #endif | ||
309 | 311 | ||
312 | #if defined(CONFIG_ARCH_OMAP3430) | ||
310 | struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL }; | 313 | struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL }; |
314 | #endif | ||
311 | 315 | ||
312 | #if defined(CONFIG_ARCH_OMAP2420) | 316 | #if defined(CONFIG_ARCH_OMAP2420) |
313 | |||
314 | /* IVA */ | 317 | /* IVA */ |
315 | static struct omap_mbox2_priv omap2_mbox_iva_priv = { | 318 | static struct omap_mbox2_priv omap2_mbox_iva_priv = { |
316 | .tx_fifo = { | 319 | .tx_fifo = { |
@@ -337,6 +340,7 @@ static struct omap_mbox mbox_iva_info = { | |||
337 | struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL }; | 340 | struct omap_mbox *omap2_mboxes[] = { &mbox_iva_info, &mbox_dsp_info, NULL }; |
338 | #endif | 341 | #endif |
339 | 342 | ||
343 | #if defined(CONFIG_ARCH_OMAP4) | ||
340 | /* OMAP4 */ | 344 | /* OMAP4 */ |
341 | static struct omap_mbox2_priv omap2_mbox_1_priv = { | 345 | static struct omap_mbox2_priv omap2_mbox_1_priv = { |
342 | .tx_fifo = { | 346 | .tx_fifo = { |
@@ -383,6 +387,7 @@ struct omap_mbox mbox_2_info = { | |||
383 | }; | 387 | }; |
384 | 388 | ||
385 | struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL }; | 389 | struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL }; |
390 | #endif | ||
386 | 391 | ||
387 | static int __devinit omap2_mbox_probe(struct platform_device *pdev) | 392 | static int __devinit omap2_mbox_probe(struct platform_device *pdev) |
388 | { | 393 | { |
@@ -390,11 +395,15 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) | |||
390 | int ret; | 395 | int ret; |
391 | struct omap_mbox **list; | 396 | struct omap_mbox **list; |
392 | 397 | ||
393 | if (cpu_is_omap3430()) { | 398 | if (false) |
399 | ; | ||
400 | #if defined(CONFIG_ARCH_OMAP3430) | ||
401 | else if (cpu_is_omap3430()) { | ||
394 | list = omap3_mboxes; | 402 | list = omap3_mboxes; |
395 | 403 | ||
396 | list[0]->irq = platform_get_irq_byname(pdev, "dsp"); | 404 | list[0]->irq = platform_get_irq_byname(pdev, "dsp"); |
397 | } | 405 | } |
406 | #endif | ||
398 | #if defined(CONFIG_ARCH_OMAP2420) | 407 | #if defined(CONFIG_ARCH_OMAP2420) |
399 | else if (cpu_is_omap2420()) { | 408 | else if (cpu_is_omap2420()) { |
400 | list = omap2_mboxes; | 409 | list = omap2_mboxes; |
@@ -403,12 +412,14 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) | |||
403 | list[1]->irq = platform_get_irq_byname(pdev, "iva"); | 412 | list[1]->irq = platform_get_irq_byname(pdev, "iva"); |
404 | } | 413 | } |
405 | #endif | 414 | #endif |
415 | #if defined(CONFIG_ARCH_OMAP4) | ||
406 | else if (cpu_is_omap44xx()) { | 416 | else if (cpu_is_omap44xx()) { |
407 | list = omap4_mboxes; | 417 | list = omap4_mboxes; |
408 | 418 | ||
409 | list[0]->irq = list[1]->irq = | 419 | list[0]->irq = list[1]->irq = |
410 | platform_get_irq_byname(pdev, "mbox"); | 420 | platform_get_irq_byname(pdev, "mbox"); |
411 | } | 421 | } |
422 | #endif | ||
412 | else { | 423 | else { |
413 | pr_err("%s: platform not supported\n", __func__); | 424 | pr_err("%s: platform not supported\n", __func__); |
414 | return -ENODEV; | 425 | return -ENODEV; |