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 | |
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')
-rw-r--r-- | arch/arm/mach-davinci/board-dm355-evm.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm644x-evm.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-dm646x-evm.c | 33 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm355.c | 43 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm644x.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-davinci/dm646x.c | 74 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/asp.h | 35 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm355.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm644x.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm646x.h | 3 |
10 files changed, 238 insertions, 5 deletions
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index d6ab64ccd496..4ef6dbeccf3c 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -117,6 +117,10 @@ static struct davinci_i2c_platform_data i2c_pdata = { | |||
117 | .bus_delay = 0 /* usec */, | 117 | .bus_delay = 0 /* usec */, |
118 | }; | 118 | }; |
119 | 119 | ||
120 | static struct snd_platform_data dm355_evm_snd_data = { | ||
121 | .clk_name = "asp1", | ||
122 | }; | ||
123 | |||
120 | static int dm355evm_mmc_gpios = -EINVAL; | 124 | static int dm355evm_mmc_gpios = -EINVAL; |
121 | 125 | ||
122 | static void dm355evm_mmcsd_gpios(unsigned gpio) | 126 | static void dm355evm_mmcsd_gpios(unsigned gpio) |
@@ -279,6 +283,9 @@ static __init void dm355_evm_init(void) | |||
279 | 283 | ||
280 | dm355_init_spi0(BIT(0), dm355_evm_spi_info, | 284 | dm355_init_spi0(BIT(0), dm355_evm_spi_info, |
281 | ARRAY_SIZE(dm355_evm_spi_info)); | 285 | ARRAY_SIZE(dm355_evm_spi_info)); |
286 | |||
287 | /* DM335 EVM uses ASP1; line-out is a stereo mini-jack */ | ||
288 | dm355_init_asp1(ASP1_TX_EVT_EN | ASP1_RX_EVT_EN, &dm355_evm_snd_data); | ||
282 | } | 289 | } |
283 | 290 | ||
284 | static __init void dm355_evm_irq_init(void) | 291 | static __init void dm355_evm_irq_init(void) |
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 56c8cd01de9a..d37f5c204b66 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -225,6 +225,10 @@ static struct platform_device ide_dev = { | |||
225 | }, | 225 | }, |
226 | }; | 226 | }; |
227 | 227 | ||
228 | static struct snd_platform_data dm644x_evm_snd_data = { | ||
229 | .clk_name = "asp0", | ||
230 | }; | ||
231 | |||
228 | /*----------------------------------------------------------------------*/ | 232 | /*----------------------------------------------------------------------*/ |
229 | 233 | ||
230 | /* | 234 | /* |
@@ -666,6 +670,7 @@ static __init void davinci_evm_init(void) | |||
666 | davinci_setup_mmc(0, &dm6446evm_mmc_config); | 670 | davinci_setup_mmc(0, &dm6446evm_mmc_config); |
667 | 671 | ||
668 | davinci_serial_init(&uart_config); | 672 | davinci_serial_init(&uart_config); |
673 | dm644x_init_asp(&dm644x_evm_snd_data); | ||
669 | 674 | ||
670 | soc_info->emac_pdata->phy_mask = DM644X_EVM_PHY_MASK; | 675 | soc_info->emac_pdata->phy_mask = DM644X_EVM_PHY_MASK; |
671 | soc_info->emac_pdata->mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY; | 676 | soc_info->emac_pdata->mdio_max_freq = DM644X_EVM_MDIO_FREQUENCY; |
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 8657e72debc1..0aa18df4110f 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c | |||
@@ -206,6 +206,37 @@ static struct at24_platform_data eeprom_info = { | |||
206 | .context = (void *)0x7f00, | 206 | .context = (void *)0x7f00, |
207 | }; | 207 | }; |
208 | 208 | ||
209 | static u8 dm646x_iis_serializer_direction[] = { | ||
210 | TX_MODE, RX_MODE, INACTIVE_MODE, INACTIVE_MODE, | ||
211 | }; | ||
212 | |||
213 | static u8 dm646x_dit_serializer_direction[] = { | ||
214 | TX_MODE, | ||
215 | }; | ||
216 | |||
217 | static struct snd_platform_data dm646x_evm_snd_data[] = { | ||
218 | { | ||
219 | .clk_name = "mcasp0", | ||
220 | .tx_dma_offset = 0x400, | ||
221 | .rx_dma_offset = 0x400, | ||
222 | .op_mode = DAVINCI_MCASP_IIS_MODE, | ||
223 | .num_serializer = ARRAY_SIZE(dm646x_iis_serializer_direction), | ||
224 | .tdm_slots = 2, | ||
225 | .serial_dir = dm646x_iis_serializer_direction, | ||
226 | .eventq_no = EVENTQ_0, | ||
227 | }, | ||
228 | { | ||
229 | .clk_name = "mcasp1", | ||
230 | .tx_dma_offset = 0x400, | ||
231 | .rx_dma_offset = 0, | ||
232 | .op_mode = DAVINCI_MCASP_DIT_MODE, | ||
233 | .num_serializer = ARRAY_SIZE(dm646x_dit_serializer_direction), | ||
234 | .tdm_slots = 32, | ||
235 | .serial_dir = dm646x_dit_serializer_direction, | ||
236 | .eventq_no = EVENTQ_0, | ||
237 | }, | ||
238 | }; | ||
239 | |||
209 | static struct i2c_board_info __initdata i2c_info[] = { | 240 | static struct i2c_board_info __initdata i2c_info[] = { |
210 | { | 241 | { |
211 | I2C_BOARD_INFO("24c256", 0x50), | 242 | I2C_BOARD_INFO("24c256", 0x50), |
@@ -239,6 +270,8 @@ static __init void evm_init(void) | |||
239 | 270 | ||
240 | evm_init_i2c(); | 271 | evm_init_i2c(); |
241 | davinci_serial_init(&uart_config); | 272 | davinci_serial_init(&uart_config); |
273 | dm646x_init_mcasp0(&dm646x_evm_snd_data[0]); | ||
274 | dm646x_init_mcasp1(&dm646x_evm_snd_data[1]); | ||
242 | 275 | ||
243 | soc_info->emac_pdata->phy_mask = DM646X_EVM_PHY_MASK; | 276 | soc_info->emac_pdata->phy_mask = DM646X_EVM_PHY_MASK; |
244 | soc_info->emac_pdata->mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY; | 277 | soc_info->emac_pdata->mdio_max_freq = DM646X_EVM_MDIO_FREQUENCY; |
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); |
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 */ | ||
558 | static 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 | |||
576 | static 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 | ||
558 | static struct map_desc dm644x_io_desc[] = { | 585 | static 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 | ||
699 | void __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 | |||
672 | void __init dm644x_init(void) | 706 | void __init dm644x_init(void) |
673 | { | 707 | { |
674 | davinci_common_init(&davinci_soc_info_dm644x); | 708 | davinci_common_init(&davinci_soc_info_dm644x); |
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 | ||
595 | static 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 | |||
615 | static 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 | |||
636 | static 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 | |||
643 | static 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 | |||
650 | static struct platform_device dm646x_dit_device = { | ||
651 | .name = "spdif-dit", | ||
652 | .id = -1, | ||
653 | }; | ||
654 | |||
594 | /*----------------------------------------------------------------------*/ | 655 | /*----------------------------------------------------------------------*/ |
595 | 656 | ||
596 | static struct map_desc dm646x_io_desc[] = { | 657 | static 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 | ||
764 | void __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 | |||
770 | void __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 | |||
703 | void __init dm646x_init(void) | 777 | void __init dm646x_init(void) |
704 | { | 778 | { |
705 | davinci_common_init(&davinci_soc_info_dm646x); | 779 | davinci_common_init(&davinci_soc_info_dm646x); |
diff --git a/arch/arm/mach-davinci/include/mach/asp.h b/arch/arm/mach-davinci/include/mach/asp.h index e0abc437d796..038ecb7c231b 100644 --- a/arch/arm/mach-davinci/include/mach/asp.h +++ b/arch/arm/mach-davinci/include/mach/asp.h | |||
@@ -5,21 +5,52 @@ | |||
5 | #define __ASM_ARCH_DAVINCI_ASP_H | 5 | #define __ASM_ARCH_DAVINCI_ASP_H |
6 | 6 | ||
7 | #include <mach/irqs.h> | 7 | #include <mach/irqs.h> |
8 | #include <mach/edma.h> | ||
8 | 9 | ||
9 | /* Bases of register banks */ | 10 | /* Bases of dm644x and dm355 register banks */ |
10 | #define DAVINCI_ASP0_BASE 0x01E02000 | 11 | #define DAVINCI_ASP0_BASE 0x01E02000 |
11 | #define DAVINCI_ASP1_BASE 0x01E04000 | 12 | #define DAVINCI_ASP1_BASE 0x01E04000 |
12 | 13 | ||
13 | /* EDMA channels */ | 14 | /* Bases of dm646x register banks */ |
15 | #define DAVINCI_DM646X_MCASP0_REG_BASE 0x01D01000 | ||
16 | #define DAVINCI_DM646X_MCASP1_REG_BASE 0x01D01800 | ||
17 | |||
18 | /* EDMA channels of dm644x and dm355 */ | ||
14 | #define DAVINCI_DMA_ASP0_TX 2 | 19 | #define DAVINCI_DMA_ASP0_TX 2 |
15 | #define DAVINCI_DMA_ASP0_RX 3 | 20 | #define DAVINCI_DMA_ASP0_RX 3 |
16 | #define DAVINCI_DMA_ASP1_TX 8 | 21 | #define DAVINCI_DMA_ASP1_TX 8 |
17 | #define DAVINCI_DMA_ASP1_RX 9 | 22 | #define DAVINCI_DMA_ASP1_RX 9 |
18 | 23 | ||
24 | /* EDMA channels of dm646x */ | ||
25 | #define DAVINCI_DM646X_DMA_MCASP0_AXEVT0 6 | ||
26 | #define DAVINCI_DM646X_DMA_MCASP0_AREVT0 9 | ||
27 | #define DAVINCI_DM646X_DMA_MCASP1_AXEVT1 12 | ||
28 | |||
19 | /* Interrupts */ | 29 | /* Interrupts */ |
20 | #define DAVINCI_ASP0_RX_INT IRQ_MBRINT | 30 | #define DAVINCI_ASP0_RX_INT IRQ_MBRINT |
21 | #define DAVINCI_ASP0_TX_INT IRQ_MBXINT | 31 | #define DAVINCI_ASP0_TX_INT IRQ_MBXINT |
22 | #define DAVINCI_ASP1_RX_INT IRQ_MBRINT | 32 | #define DAVINCI_ASP1_RX_INT IRQ_MBRINT |
23 | #define DAVINCI_ASP1_TX_INT IRQ_MBXINT | 33 | #define DAVINCI_ASP1_TX_INT IRQ_MBXINT |
24 | 34 | ||
35 | struct snd_platform_data { | ||
36 | char *clk_name; | ||
37 | u32 tx_dma_offset; | ||
38 | u32 rx_dma_offset; | ||
39 | enum dma_event_q eventq_no; /* event queue number */ | ||
40 | unsigned int codec_fmt; | ||
41 | |||
42 | /* McASP specific fields */ | ||
43 | int tdm_slots; | ||
44 | u8 op_mode; | ||
45 | u8 num_serializer; | ||
46 | u8 *serial_dir; | ||
47 | }; | ||
48 | |||
49 | #define INACTIVE_MODE 0 | ||
50 | #define TX_MODE 1 | ||
51 | #define RX_MODE 2 | ||
52 | |||
53 | #define DAVINCI_MCASP_IIS_MODE 0 | ||
54 | #define DAVINCI_MCASP_DIT_MODE 1 | ||
55 | |||
25 | #endif /* __ASM_ARCH_DAVINCI_ASP_H */ | 56 | #endif /* __ASM_ARCH_DAVINCI_ASP_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/dm355.h b/arch/arm/mach-davinci/include/mach/dm355.h index 54903b72438e..03faaef95a9a 100644 --- a/arch/arm/mach-davinci/include/mach/dm355.h +++ b/arch/arm/mach-davinci/include/mach/dm355.h | |||
@@ -12,11 +12,16 @@ | |||
12 | #define __ASM_ARCH_DM355_H | 12 | #define __ASM_ARCH_DM355_H |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/asp.h> | ||
16 | |||
17 | #define ASP1_TX_EVT_EN 1 | ||
18 | #define ASP1_RX_EVT_EN 2 | ||
15 | 19 | ||
16 | struct spi_board_info; | 20 | struct spi_board_info; |
17 | 21 | ||
18 | void __init dm355_init(void); | 22 | void __init dm355_init(void); |
19 | void dm355_init_spi0(unsigned chipselect_mask, | 23 | void dm355_init_spi0(unsigned chipselect_mask, |
20 | struct spi_board_info *info, unsigned len); | 24 | struct spi_board_info *info, unsigned len); |
25 | void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata); | ||
21 | 26 | ||
22 | #endif /* __ASM_ARCH_DM355_H */ | 27 | #endif /* __ASM_ARCH_DM355_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/dm644x.h b/arch/arm/mach-davinci/include/mach/dm644x.h index 15d42b92a8c9..8b157ceec0ca 100644 --- a/arch/arm/mach-davinci/include/mach/dm644x.h +++ b/arch/arm/mach-davinci/include/mach/dm644x.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
27 | #include <mach/emac.h> | 27 | #include <mach/emac.h> |
28 | #include <mach/asp.h> | ||
28 | 29 | ||
29 | #define DM644X_EMAC_BASE (0x01C80000) | 30 | #define DM644X_EMAC_BASE (0x01C80000) |
30 | #define DM644X_EMAC_CNTRL_OFFSET (0x0000) | 31 | #define DM644X_EMAC_CNTRL_OFFSET (0x0000) |
@@ -34,5 +35,6 @@ | |||
34 | #define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) | 35 | #define DM644X_EMAC_CNTRL_RAM_SIZE (0x2000) |
35 | 36 | ||
36 | void __init dm644x_init(void); | 37 | void __init dm644x_init(void); |
38 | void __init dm644x_init_asp(struct snd_platform_data *pdata); | ||
37 | 39 | ||
38 | #endif /* __ASM_ARCH_DM644X_H */ | 40 | #endif /* __ASM_ARCH_DM644X_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/dm646x.h b/arch/arm/mach-davinci/include/mach/dm646x.h index 1fc764c8646e..05854846242a 100644 --- a/arch/arm/mach-davinci/include/mach/dm646x.h +++ b/arch/arm/mach-davinci/include/mach/dm646x.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <mach/hardware.h> |
15 | #include <mach/emac.h> | 15 | #include <mach/emac.h> |
16 | #include <mach/asp.h> | ||
16 | 17 | ||
17 | #define DM646X_EMAC_BASE (0x01C80000) | 18 | #define DM646X_EMAC_BASE (0x01C80000) |
18 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) | 19 | #define DM646X_EMAC_CNTRL_OFFSET (0x0000) |
@@ -22,5 +23,7 @@ | |||
22 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) | 23 | #define DM646X_EMAC_CNTRL_RAM_SIZE (0x2000) |
23 | 24 | ||
24 | void __init dm646x_init(void); | 25 | void __init dm646x_init(void); |
26 | void __init dm646x_init_mcasp0(struct snd_platform_data *pdata); | ||
27 | void __init dm646x_init_mcasp1(struct snd_platform_data *pdata); | ||
25 | 28 | ||
26 | #endif /* __ASM_ARCH_DM646X_H */ | 29 | #endif /* __ASM_ARCH_DM646X_H */ |