aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm644x.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/dm644x.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/dm644x.c')
-rw-r--r--arch/arm/mach-davinci/dm644x.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index d20e447a8b4f..55317b1cf865 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.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"
@@ -303,7 +304,7 @@ struct davinci_clk dm644x_clks[] = {
303 CLK("davinci_emac.1", NULL, &emac_clk), 304 CLK("davinci_emac.1", NULL, &emac_clk),
304 CLK("i2c_davinci.1", NULL, &i2c_clk), 305 CLK("i2c_davinci.1", NULL, &i2c_clk),
305 CLK("palm_bk3710", NULL, &ide_clk), 306 CLK("palm_bk3710", NULL, &ide_clk),
306 CLK("soc-audio.0", NULL, &asp_clk), 307 CLK(NULL, "asp0", &asp_clk),
307 CLK("davinci_mmc.0", NULL, &mmcsd_clk), 308 CLK("davinci_mmc.0", NULL, &mmcsd_clk),
308 CLK(NULL, "spi", &spi_clk), 309 CLK(NULL, "spi", &spi_clk),
309 CLK(NULL, "gpio", &gpio_clk), 310 CLK(NULL, "gpio", &gpio_clk),
@@ -553,6 +554,32 @@ static struct platform_device dm644x_edma_device = {
553 .resource = edma_resources, 554 .resource = edma_resources,
554}; 555};
555 556
557/* DM6446 EVM uses ASP0; line-out is a pair of RCA jacks */
558static struct resource dm644x_asp_resources[] = {
559 {
560 .start = DAVINCI_ASP0_BASE,
561 .end = DAVINCI_ASP0_BASE + SZ_8K - 1,
562 .flags = IORESOURCE_MEM,
563 },
564 {
565 .start = DAVINCI_DMA_ASP0_TX,
566 .end = DAVINCI_DMA_ASP0_TX,
567 .flags = IORESOURCE_DMA,
568 },
569 {
570 .start = DAVINCI_DMA_ASP0_RX,
571 .end = DAVINCI_DMA_ASP0_RX,
572 .flags = IORESOURCE_DMA,
573 },
574};
575
576static struct platform_device dm644x_asp_device = {
577 .name = "davinci-asp",
578 .id = -1,
579 .num_resources = ARRAY_SIZE(dm644x_asp_resources),
580 .resource = dm644x_asp_resources,
581};
582
556/*----------------------------------------------------------------------*/ 583/*----------------------------------------------------------------------*/
557 584
558static struct map_desc dm644x_io_desc[] = { 585static struct map_desc dm644x_io_desc[] = {
@@ -669,6 +696,13 @@ static struct davinci_soc_info davinci_soc_info_dm644x = {
669 .sram_len = SZ_16K, 696 .sram_len = SZ_16K,
670}; 697};
671 698
699void __init dm644x_init_asp(struct snd_platform_data *pdata)
700{
701 davinci_cfg_reg(DM644X_MCBSP);
702 dm644x_asp_device.dev.platform_data = pdata;
703 platform_device_register(&dm644x_asp_device);
704}
705
672void __init dm644x_init(void) 706void __init dm644x_init(void)
673{ 707{
674 davinci_common_init(&davinci_soc_info_dm644x); 708 davinci_common_init(&davinci_soc_info_dm644x);