diff options
author | Miguel Aguilar <miguel.aguilar@ridgerun.com> | 2010-01-21 12:41:51 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2010-02-04 16:30:09 -0500 |
commit | e89861e9b44fcd606cdade6230eb0037ad5911bf (patch) | |
tree | 36f421dc1c6438daccf9f03063f2a94029c80d99 | |
parent | 3b43cd6f2dcbf871b8cabe16ae4ac8c036c959ac (diff) |
DaVinci: DM365: Voice codec support for the DM365 SoC
This patch adds the generic Voice Codec support for the DM365 based
platforms.
Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 37 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/dm365.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-davinci/include/mach/mux.h | 2 |
3 files changed, 43 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index ec15f3d6f613..d5010567b496 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -455,7 +455,7 @@ static struct davinci_clk dm365_clks[] = { | |||
455 | CLK(NULL, "timer3", &timer3_clk), | 455 | CLK(NULL, "timer3", &timer3_clk), |
456 | CLK(NULL, "usb", &usb_clk), | 456 | CLK(NULL, "usb", &usb_clk), |
457 | CLK("davinci_emac.1", NULL, &emac_clk), | 457 | CLK("davinci_emac.1", NULL, &emac_clk), |
458 | CLK("voice_codec", NULL, &voicecodec_clk), | 458 | CLK("davinci_voicecodec", NULL, &voicecodec_clk), |
459 | CLK("davinci-asp.0", NULL, &asp0_clk), | 459 | CLK("davinci-asp.0", NULL, &asp0_clk), |
460 | CLK(NULL, "rto", &rto_clk), | 460 | CLK(NULL, "rto", &rto_clk), |
461 | CLK(NULL, "mjcp", &mjcp_clk), | 461 | CLK(NULL, "mjcp", &mjcp_clk), |
@@ -606,6 +606,8 @@ INT_CFG(DM365, INT_NSF_DISABLE, 25, 1, 0, false) | |||
606 | 606 | ||
607 | EVT_CFG(DM365, EVT2_ASP_TX, 0, 1, 0, false) | 607 | EVT_CFG(DM365, EVT2_ASP_TX, 0, 1, 0, false) |
608 | EVT_CFG(DM365, EVT3_ASP_RX, 1, 1, 0, false) | 608 | EVT_CFG(DM365, EVT3_ASP_RX, 1, 1, 0, false) |
609 | EVT_CFG(DM365, EVT2_VC_TX, 0, 1, 1, false) | ||
610 | EVT_CFG(DM365, EVT3_VC_RX, 1, 1, 1, false) | ||
609 | #endif | 611 | #endif |
610 | }; | 612 | }; |
611 | 613 | ||
@@ -835,6 +837,31 @@ static struct platform_device dm365_asp_device = { | |||
835 | .resource = dm365_asp_resources, | 837 | .resource = dm365_asp_resources, |
836 | }; | 838 | }; |
837 | 839 | ||
840 | static struct resource dm365_vc_resources[] = { | ||
841 | { | ||
842 | .start = DAVINCI_DM365_VC_BASE, | ||
843 | .end = DAVINCI_DM365_VC_BASE + SZ_1K - 1, | ||
844 | .flags = IORESOURCE_MEM, | ||
845 | }, | ||
846 | { | ||
847 | .start = DAVINCI_DMA_VC_TX, | ||
848 | .end = DAVINCI_DMA_VC_TX, | ||
849 | .flags = IORESOURCE_DMA, | ||
850 | }, | ||
851 | { | ||
852 | .start = DAVINCI_DMA_VC_RX, | ||
853 | .end = DAVINCI_DMA_VC_RX, | ||
854 | .flags = IORESOURCE_DMA, | ||
855 | }, | ||
856 | }; | ||
857 | |||
858 | static struct platform_device dm365_vc_device = { | ||
859 | .name = "davinci_voicecodec", | ||
860 | .id = -1, | ||
861 | .num_resources = ARRAY_SIZE(dm365_vc_resources), | ||
862 | .resource = dm365_vc_resources, | ||
863 | }; | ||
864 | |||
838 | static struct resource dm365_rtc_resources[] = { | 865 | static struct resource dm365_rtc_resources[] = { |
839 | { | 866 | { |
840 | .start = DM365_RTC_BASE, | 867 | .start = DM365_RTC_BASE, |
@@ -991,6 +1018,14 @@ void __init dm365_init_asp(struct snd_platform_data *pdata) | |||
991 | platform_device_register(&dm365_asp_device); | 1018 | platform_device_register(&dm365_asp_device); |
992 | } | 1019 | } |
993 | 1020 | ||
1021 | void __init dm365_init_vc(struct snd_platform_data *pdata) | ||
1022 | { | ||
1023 | davinci_cfg_reg(DM365_EVT2_VC_TX); | ||
1024 | davinci_cfg_reg(DM365_EVT3_VC_RX); | ||
1025 | dm365_vc_device.dev.platform_data = pdata; | ||
1026 | platform_device_register(&dm365_vc_device); | ||
1027 | } | ||
1028 | |||
994 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata) | 1029 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata) |
995 | { | 1030 | { |
996 | dm365_ks_device.dev.platform_data = pdata; | 1031 | dm365_ks_device.dev.platform_data = pdata; |
diff --git a/arch/arm/mach-davinci/include/mach/dm365.h b/arch/arm/mach-davinci/include/mach/dm365.h index c3610eb39869..fdf6f8507cc3 100644 --- a/arch/arm/mach-davinci/include/mach/dm365.h +++ b/arch/arm/mach-davinci/include/mach/dm365.h | |||
@@ -32,8 +32,13 @@ | |||
32 | 32 | ||
33 | #define DM365_RTC_BASE (0x01C69000) | 33 | #define DM365_RTC_BASE (0x01C69000) |
34 | 34 | ||
35 | #define DAVINCI_DM365_VC_BASE (0x01D0C000) | ||
36 | #define DAVINCI_DMA_VC_TX 2 | ||
37 | #define DAVINCI_DMA_VC_RX 3 | ||
38 | |||
35 | void __init dm365_init(void); | 39 | void __init dm365_init(void); |
36 | void __init dm365_init_asp(struct snd_platform_data *pdata); | 40 | void __init dm365_init_asp(struct snd_platform_data *pdata); |
41 | void __init dm365_init_vc(struct snd_platform_data *pdata); | ||
37 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); | 42 | void __init dm365_init_ks(struct davinci_ks_platform_data *pdata); |
38 | void __init dm365_init_rtc(void); | 43 | void __init dm365_init_rtc(void); |
39 | 44 | ||
diff --git a/arch/arm/mach-davinci/include/mach/mux.h b/arch/arm/mach-davinci/include/mach/mux.h index 137bfba51d1f..2a68c1d8a24b 100644 --- a/arch/arm/mach-davinci/include/mach/mux.h +++ b/arch/arm/mach-davinci/include/mach/mux.h | |||
@@ -327,6 +327,8 @@ enum davinci_dm365_index { | |||
327 | /* EDMA event muxing */ | 327 | /* EDMA event muxing */ |
328 | DM365_EVT2_ASP_TX, | 328 | DM365_EVT2_ASP_TX, |
329 | DM365_EVT3_ASP_RX, | 329 | DM365_EVT3_ASP_RX, |
330 | DM365_EVT2_VC_TX, | ||
331 | DM365_EVT3_VC_RX, | ||
330 | DM365_EVT26_MMC0_RX, | 332 | DM365_EVT26_MMC0_RX, |
331 | }; | 333 | }; |
332 | 334 | ||