summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/devices-da8xx.c
diff options
context:
space:
mode:
authorChaithrika U S <chaithrika@ti.com>2009-08-11 23:03:25 +0200
committerKevin Hilman <khilman@deeprootsystems.com>2009-08-26 10:55:53 +0200
commit491214e1f8129844289869bb6c231dc4542b11e3 (patch)
tree44b52d050a3d34fc7281ff304840ee782224a10c /arch/arm/mach-davinci/devices-da8xx.c
parentdavinci: Audio support for DA830 EVM (diff)
downloadlinux-491214e1f8129844289869bb6c231dc4542b11e3.tar.xz
linux-491214e1f8129844289869bb6c231dc4542b11e3.zip
davinci: Audio support for DA850/OMAP-L138 EVM
Define resources for McASP used on DA850/OMAP-L138 EVM, add platform device defintion and Pin Mux configurations. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/devices-da8xx.c')
-rw-r--r--arch/arm/mach-davinci/devices-da8xx.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index fe0baafcf610..1882eef3aead 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -309,6 +309,34 @@ static struct platform_device da830_mcasp1_device = {
.resource = da830_mcasp1_resources,
};
+static struct resource da850_mcasp_resources[] = {
+ {
+ .name = "mcasp",
+ .start = DAVINCI_DA8XX_MCASP0_REG_BASE,
+ .end = DAVINCI_DA8XX_MCASP0_REG_BASE + (SZ_1K * 12) - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ /* TX event */
+ {
+ .start = DAVINCI_DA8XX_DMA_MCASP0_AXEVT,
+ .end = DAVINCI_DA8XX_DMA_MCASP0_AXEVT,
+ .flags = IORESOURCE_DMA,
+ },
+ /* RX event */
+ {
+ .start = DAVINCI_DA8XX_DMA_MCASP0_AREVT,
+ .end = DAVINCI_DA8XX_DMA_MCASP0_AREVT,
+ .flags = IORESOURCE_DMA,
+ },
+};
+
+static struct platform_device da850_mcasp_device = {
+ .name = "davinci-mcasp",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(da850_mcasp_resources),
+ .resource = da850_mcasp_resources,
+};
+
int __init da8xx_register_emac(void)
{
return platform_device_register(&da8xx_emac_device);
@@ -316,8 +344,12 @@ int __init da8xx_register_emac(void)
void __init da8xx_init_mcasp(int id, struct snd_platform_data *pdata)
{
- if (id == 1) { /* DA830/OMAP-L137 has 3 instances of McASP */
+ /* DA830/OMAP-L137 has 3 instances of McASP */
+ if (cpu_is_davinci_da830() && id == 1) {
da830_mcasp1_device.dev.platform_data = pdata;
platform_device_register(&da830_mcasp1_device);
+ } else if (cpu_is_davinci_da850()) {
+ da850_mcasp_device.dev.platform_data = pdata;
+ platform_device_register(&da850_mcasp_device);
}
}