sh_eth: fix EESIPR values for SH77{34|63}
[linux/fpc-iii.git] / sound / soc / fsl / efika-audio-fabric.c
blobf200d1cfc4bd4d854b425f220c5b8e3bb49b22b1
1 /*
2 * Efika driver for the PSC of the Freescale MPC52xx
3 * configured as AC97 interface
5 * Copyright 2008 Jon Smirl, Digispeaker
6 * Author: Jon Smirl <jonsmirl@gmail.com>
8 * This file is licensed under the terms of the GNU General Public License
9 * version 2. This program is licensed "as is" without any warranty of any
10 * kind, whether express or implied.
13 #include <linux/init.h>
14 #include <linux/module.h>
15 #include <linux/interrupt.h>
16 #include <linux/device.h>
17 #include <linux/delay.h>
18 #include <linux/of_device.h>
19 #include <linux/of_platform.h>
20 #include <linux/dma-mapping.h>
22 #include <sound/core.h>
23 #include <sound/pcm.h>
24 #include <sound/pcm_params.h>
25 #include <sound/initval.h>
26 #include <sound/soc.h>
28 #include "mpc5200_dma.h"
29 #include "mpc5200_psc_ac97.h"
31 #define DRV_NAME "efika-audio-fabric"
33 static struct snd_soc_dai_link efika_fabric_dai[] = {
35 .name = "AC97",
36 .stream_name = "AC97 Analog",
37 .codec_dai_name = "stac9766-hifi-analog",
38 .cpu_dai_name = "mpc5200-psc-ac97.0",
39 .platform_name = "mpc5200-pcm-audio",
40 .codec_name = "stac9766-codec",
43 .name = "AC97",
44 .stream_name = "AC97 IEC958",
45 .codec_dai_name = "stac9766-hifi-IEC958",
46 .cpu_dai_name = "mpc5200-psc-ac97.1",
47 .platform_name = "mpc5200-pcm-audio",
48 .codec_name = "stac9766-codec",
52 static struct snd_soc_card card = {
53 .name = "Efika",
54 .owner = THIS_MODULE,
55 .dai_link = efika_fabric_dai,
56 .num_links = ARRAY_SIZE(efika_fabric_dai),
59 static __init int efika_fabric_init(void)
61 struct platform_device *pdev;
62 int rc;
64 if (!of_machine_is_compatible("bplan,efika"))
65 return -ENODEV;
67 pdev = platform_device_alloc("soc-audio", 1);
68 if (!pdev) {
69 pr_err("efika_fabric_init: platform_device_alloc() failed\n");
70 return -ENODEV;
73 platform_set_drvdata(pdev, &card);
75 rc = platform_device_add(pdev);
76 if (rc) {
77 pr_err("efika_fabric_init: platform_device_add() failed\n");
78 platform_device_put(pdev);
79 return -ENODEV;
81 return 0;
84 module_init(efika_fabric_init);
87 MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>");
88 MODULE_DESCRIPTION(DRV_NAME ": mpc5200 Efika fabric driver");
89 MODULE_LICENSE("GPL");