aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm646x.c
diff options
context:
space:
mode:
authorChaithrika U S <chaithrika@ti.com>2009-06-05 06:28:08 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2009-08-26 03:57:00 -0400
commit25acf553aeed86f93f2cf39227b59fc6eb3e8c78 (patch)
tree39ad69bf9d160bac7e2d890fc1b4b0f82e8bcb85 /arch/arm/mach-davinci/dm646x.c
parent7a36071e7954836ba437987e5ca4ced174462b28 (diff)
davinci: ASoC: Add the platform devices for ASP
1) Registers the platform devices for ASP on dm355, dm644x and dm646x so that the machine driver can probe to get ASP related platform data. 2) Move towards definition of the asp clocks using physical name(for dm355 and dm644x) 3) Add platform data to board specific files. Signed-off-by: Naresh Medisetty <naresh@ti.com> Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm646x.c')
-rw-r--r--arch/arm/mach-davinci/dm646x.c74
1 files changed, 74 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 2c76a4d47bfb..199f288e03c4 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -27,6 +27,7 @@
27#include <mach/time.h> 27#include <mach/time.h>
28#include <mach/serial.h> 28#include <mach/serial.h>
29#include <mach/common.h> 29#include <mach/common.h>
30#include <mach/asp.h>
30 31
31#include "clock.h" 32#include "clock.h"
32#include "mux.h" 33#include "mux.h"
@@ -591,6 +592,66 @@ static struct platform_device dm646x_edma_device = {
591 .resource = edma_resources, 592 .resource = edma_resources,
592}; 593};
593 594
595static struct resource dm646x_mcasp0_resources[] = {
596 {
597 .name = "mcasp0",
598 .start = DAVINCI_DM646X_MCASP0_REG_BASE,
599 .end = DAVINCI_DM646X_MCASP0_REG_BASE + (SZ_1K << 1) - 1,
600 .flags = IORESOURCE_MEM,
601 },
602 /* first TX, then RX */
603 {
604 .start = DAVINCI_DM646X_DMA_MCASP0_AXEVT0,
605 .end = DAVINCI_DM646X_DMA_MCASP0_AXEVT0,
606 .flags = IORESOURCE_DMA,
607 },
608 {
609 .start = DAVINCI_DM646X_DMA_MCASP0_AREVT0,
610 .end = DAVINCI_DM646X_DMA_MCASP0_AREVT0,
611 .flags = IORESOURCE_DMA,
612 },
613};
614
615static struct resource dm646x_mcasp1_resources[] = {
616 {
617 .name = "mcasp1",
618 .start = DAVINCI_DM646X_MCASP1_REG_BASE,
619 .end = DAVINCI_DM646X_MCASP1_REG_BASE + (SZ_1K << 1) - 1,
620 .flags = IORESOURCE_MEM,
621 },
622 /* DIT mode, only TX event */
623 {
624 .start = DAVINCI_DM646X_DMA_MCASP1_AXEVT1,
625 .end = DAVINCI_DM646X_DMA_MCASP1_AXEVT1,
626 .flags = IORESOURCE_DMA,
627 },
628 /* DIT mode, dummy entry */
629 {
630 .start = -1,
631 .end = -1,
632 .flags = IORESOURCE_DMA,
633 },
634};
635
636static struct platform_device dm646x_mcasp0_device = {
637 .name = "davinci-mcasp",
638 .id = 0,
639 .num_resources = ARRAY_SIZE(dm646x_mcasp0_resources),
640 .resource = dm646x_mcasp0_resources,
641};
642
643static struct platform_device dm646x_mcasp1_device = {
644 .name = "davinci-mcasp",
645 .id = 1,
646 .num_resources = ARRAY_SIZE(dm646x_mcasp1_resources),
647 .resource = dm646x_mcasp1_resources,
648};
649
650static struct platform_device dm646x_dit_device = {
651 .name = "spdif-dit",
652 .id = -1,
653};
654
594/*----------------------------------------------------------------------*/ 655/*----------------------------------------------------------------------*/
595 656
596static struct map_desc dm646x_io_desc[] = { 657static struct map_desc dm646x_io_desc[] = {
@@ -700,6 +761,19 @@ static struct davinci_soc_info davinci_soc_info_dm646x = {
700 .sram_len = SZ_32K, 761 .sram_len = SZ_32K,
701}; 762};
702 763
764void __init dm646x_init_mcasp0(struct snd_platform_data *pdata)
765{
766 dm646x_mcasp0_device.dev.platform_data = pdata;
767 platform_device_register(&dm646x_mcasp0_device);
768}
769
770void __init dm646x_init_mcasp1(struct snd_platform_data *pdata)
771{
772 dm646x_mcasp1_device.dev.platform_data = pdata;
773 platform_device_register(&dm646x_mcasp1_device);
774 platform_device_register(&dm646x_dit_device);
775}
776
703void __init dm646x_init(void) 777void __init dm646x_init(void)
704{ 778{
705 davinci_common_init(&davinci_soc_info_dm646x); 779 davinci_common_init(&davinci_soc_info_dm646x);