diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2015-03-12 04:06:27 -0400 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2015-03-18 06:22:04 -0400 |
commit | c96aacb1329d5632980ad8b91be197b509a2e778 (patch) | |
tree | c005eeccb804e46b256fe58f9400cb1a4f6f637f | |
parent | 80f7d0e03e759d19925608a9d4d395187b1f2006 (diff) |
ARM: davinci: devices-da8xx: Clean up and correct the McASP device creation
Both DA830 and DA850 has McASP0 module, so do not restrict the use of
McASP0 for da850 only.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index e15e046c5438..fdc3219ba684 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c | |||
@@ -526,14 +526,25 @@ static struct platform_device da850_mcasp_device = { | |||
526 | 526 | ||
527 | void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata) | 527 | void __init da8xx_register_mcasp(int id, struct snd_platform_data *pdata) |
528 | { | 528 | { |
529 | /* DA830/OMAP-L137 has 3 instances of McASP */ | 529 | struct platform_device *pdev; |
530 | if (cpu_is_davinci_da830() && id == 1) { | 530 | |
531 | da830_mcasp1_device.dev.platform_data = pdata; | 531 | switch (id) { |
532 | platform_device_register(&da830_mcasp1_device); | 532 | case 0: |
533 | } else if (cpu_is_davinci_da850()) { | 533 | /* Valid for DA830/OMAP-L137 or DA850/OMAP-L138 */ |
534 | da850_mcasp_device.dev.platform_data = pdata; | 534 | pdev = &da850_mcasp_device; |
535 | platform_device_register(&da850_mcasp_device); | 535 | break; |
536 | case 1: | ||
537 | /* Valid for DA830/OMAP-L137 only */ | ||
538 | if (!cpu_is_davinci_da830()) | ||
539 | return; | ||
540 | pdev = &da830_mcasp1_device; | ||
541 | break; | ||
542 | default: | ||
543 | return; | ||
536 | } | 544 | } |
545 | |||
546 | pdev->dev.platform_data = pdata; | ||
547 | platform_device_register(pdev); | ||
537 | } | 548 | } |
538 | 549 | ||
539 | static struct resource da8xx_pruss_resources[] = { | 550 | static struct resource da8xx_pruss_resources[] = { |