diff options
author | Chaithrika U S <chaithrika@ti.com> | 2009-06-05 06:28:08 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-08-26 03:57:00 -0400 |
commit | 25acf553aeed86f93f2cf39227b59fc6eb3e8c78 (patch) | |
tree | 39ad69bf9d160bac7e2d890fc1b4b0f82e8bcb85 /arch/arm/mach-davinci/dm355.c | |
parent | 7a36071e7954836ba437987e5ca4ced174462b28 (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/dm355.c')
-rw-r--r-- | arch/arm/mach-davinci/dm355.c | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index 48f33e420517..b4d709a8612a 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <mach/time.h> | 30 | #include <mach/time.h> |
31 | #include <mach/serial.h> | 31 | #include <mach/serial.h> |
32 | #include <mach/common.h> | 32 | #include <mach/common.h> |
33 | #include <mach/asp.h> | ||
33 | 34 | ||
34 | #include "clock.h" | 35 | #include "clock.h" |
35 | #include "mux.h" | 36 | #include "mux.h" |
@@ -360,8 +361,8 @@ static struct davinci_clk dm355_clks[] = { | |||
360 | CLK(NULL, "uart1", &uart1_clk), | 361 | CLK(NULL, "uart1", &uart1_clk), |
361 | CLK(NULL, "uart2", &uart2_clk), | 362 | CLK(NULL, "uart2", &uart2_clk), |
362 | CLK("i2c_davinci.1", NULL, &i2c_clk), | 363 | CLK("i2c_davinci.1", NULL, &i2c_clk), |
363 | CLK("soc-audio.0", NULL, &asp0_clk), | 364 | CLK(NULL, "asp0", &asp0_clk), |
364 | CLK("soc-audio.1", NULL, &asp1_clk), | 365 | CLK(NULL, "asp1", &asp1_clk), |
365 | CLK("davinci_mmc.0", NULL, &mmcsd0_clk), | 366 | CLK("davinci_mmc.0", NULL, &mmcsd0_clk), |
366 | CLK("davinci_mmc.1", NULL, &mmcsd1_clk), | 367 | CLK("davinci_mmc.1", NULL, &mmcsd1_clk), |
367 | CLK(NULL, "spi0", &spi0_clk), | 368 | CLK(NULL, "spi0", &spi0_clk), |
@@ -627,6 +628,31 @@ static struct platform_device dm355_edma_device = { | |||
627 | .resource = edma_resources, | 628 | .resource = edma_resources, |
628 | }; | 629 | }; |
629 | 630 | ||
631 | static struct resource dm355_asp1_resources[] = { | ||
632 | { | ||
633 | .start = DAVINCI_ASP1_BASE, | ||
634 | .end = DAVINCI_ASP1_BASE + SZ_8K - 1, | ||
635 | .flags = IORESOURCE_MEM, | ||
636 | }, | ||
637 | { | ||
638 | .start = DAVINCI_DMA_ASP1_TX, | ||
639 | .end = DAVINCI_DMA_ASP1_TX, | ||
640 | .flags = IORESOURCE_DMA, | ||
641 | }, | ||
642 | { | ||
643 | .start = DAVINCI_DMA_ASP1_RX, | ||
644 | .end = DAVINCI_DMA_ASP1_RX, | ||
645 | .flags = IORESOURCE_DMA, | ||
646 | }, | ||
647 | }; | ||
648 | |||
649 | static struct platform_device dm355_asp1_device = { | ||
650 | .name = "davinci-asp", | ||
651 | .id = -1, | ||
652 | .num_resources = ARRAY_SIZE(dm355_asp1_resources), | ||
653 | .resource = dm355_asp1_resources, | ||
654 | }; | ||
655 | |||
630 | /*----------------------------------------------------------------------*/ | 656 | /*----------------------------------------------------------------------*/ |
631 | 657 | ||
632 | static struct map_desc dm355_io_desc[] = { | 658 | static struct map_desc dm355_io_desc[] = { |
@@ -735,6 +761,19 @@ static struct davinci_soc_info davinci_soc_info_dm355 = { | |||
735 | .sram_len = SZ_32K, | 761 | .sram_len = SZ_32K, |
736 | }; | 762 | }; |
737 | 763 | ||
764 | void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata) | ||
765 | { | ||
766 | /* we don't use ASP1 IRQs, or we'd need to mux them ... */ | ||
767 | if (evt_enable & ASP1_TX_EVT_EN) | ||
768 | davinci_cfg_reg(DM355_EVT8_ASP1_TX); | ||
769 | |||
770 | if (evt_enable & ASP1_RX_EVT_EN) | ||
771 | davinci_cfg_reg(DM355_EVT9_ASP1_RX); | ||
772 | |||
773 | dm355_asp1_device.dev.platform_data = pdata; | ||
774 | platform_device_register(&dm355_asp1_device); | ||
775 | } | ||
776 | |||
738 | void __init dm355_init(void) | 777 | void __init dm355_init(void) |
739 | { | 778 | { |
740 | davinci_common_init(&davinci_soc_info_dm355); | 779 | davinci_common_init(&davinci_soc_info_dm355); |