Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 1 | /** |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 2 | * Freescale MPC8610HPCD ALSA SoC Machine driver |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 3 | * |
| 4 | * Author: Timur Tabi <timur@freescale.com> |
| 5 | * |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 6 | * Copyright 2007-2010 Freescale Semiconductor, Inc. |
| 7 | * |
| 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. |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 11 | */ |
| 12 | |
| 13 | #include <linux/module.h> |
| 14 | #include <linux/interrupt.h> |
| 15 | #include <linux/of_device.h> |
Timur Tabi | 38fec72 | 2010-08-19 15:26:58 -0500 | [diff] [blame] | 16 | #include <linux/slab.h> |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 17 | #include <sound/soc.h> |
Timur Tabi | 6e6f662 | 2010-07-22 11:33:30 -0500 | [diff] [blame] | 18 | #include <asm/fsl_guts.h> |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 19 | |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 20 | #include "fsl_dma.h" |
| 21 | #include "fsl_ssi.h" |
| 22 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 23 | /* There's only one global utilities register */ |
| 24 | static phys_addr_t guts_phys; |
| 25 | |
| 26 | #define DAI_NAME_SIZE 32 |
| 27 | |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 28 | /** |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 29 | * mpc8610_hpcd_data: machine-specific ASoC device data |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 30 | * |
| 31 | * This structure contains data for a single sound platform device on an |
| 32 | * MPC8610 HPCD. Some of the data is taken from the device tree. |
| 33 | */ |
| 34 | struct mpc8610_hpcd_data { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 35 | struct snd_soc_dai_link dai[2]; |
| 36 | struct snd_soc_card card; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 37 | unsigned int dai_format; |
| 38 | unsigned int codec_clk_direction; |
| 39 | unsigned int cpu_clk_direction; |
| 40 | unsigned int clk_frequency; |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 41 | unsigned int ssi_id; /* 0 = SSI1, 1 = SSI2, etc */ |
| 42 | unsigned int dma_id[2]; /* 0 = DMA1, 1 = DMA2, etc */ |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 43 | unsigned int dma_channel_id[2]; /* 0 = ch 0, 1 = ch 1, etc*/ |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 44 | char codec_dai_name[DAI_NAME_SIZE]; |
| 45 | char codec_name[DAI_NAME_SIZE]; |
| 46 | char platform_name[2][DAI_NAME_SIZE]; /* One for each DMA channel */ |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | /** |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 50 | * mpc8610_hpcd_machine_probe: initialize the board |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 51 | * |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 52 | * This function is used to initialize the board-specific hardware. |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 53 | * |
| 54 | * Here we program the DMACR and PMUXCR registers. |
| 55 | */ |
Mark Brown | e7361ec | 2011-01-26 14:17:20 +0000 | [diff] [blame] | 56 | static int mpc8610_hpcd_machine_probe(struct snd_soc_card *card) |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 57 | { |
| 58 | struct mpc8610_hpcd_data *machine_data = |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 59 | container_of(card, struct mpc8610_hpcd_data, card); |
Timur Tabi | 6e6f662 | 2010-07-22 11:33:30 -0500 | [diff] [blame] | 60 | struct ccsr_guts_86xx __iomem *guts; |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 61 | |
Timur Tabi | 6e6f662 | 2010-07-22 11:33:30 -0500 | [diff] [blame] | 62 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 63 | if (!guts) { |
| 64 | dev_err(card->dev, "could not map global utilities\n"); |
| 65 | return -ENOMEM; |
| 66 | } |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 67 | |
| 68 | /* Program the signal routing between the SSI and the DMA */ |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 69 | guts_set_dmacr(guts, machine_data->dma_id[0], |
| 70 | machine_data->dma_channel_id[0], |
| 71 | CCSR_GUTS_DMACR_DEV_SSI); |
| 72 | guts_set_dmacr(guts, machine_data->dma_id[1], |
| 73 | machine_data->dma_channel_id[1], |
| 74 | CCSR_GUTS_DMACR_DEV_SSI); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 75 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 76 | guts_set_pmuxcr_dma(guts, machine_data->dma_id[0], |
| 77 | machine_data->dma_channel_id[0], 0); |
| 78 | guts_set_pmuxcr_dma(guts, machine_data->dma_id[1], |
| 79 | machine_data->dma_channel_id[1], 0); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 80 | |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 81 | switch (machine_data->ssi_id) { |
| 82 | case 0: |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 83 | clrsetbits_be32(&guts->pmuxcr, |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 84 | CCSR_GUTS_PMUXCR_SSI1_MASK, CCSR_GUTS_PMUXCR_SSI1_SSI); |
| 85 | break; |
| 86 | case 1: |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 87 | clrsetbits_be32(&guts->pmuxcr, |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 88 | CCSR_GUTS_PMUXCR_SSI2_MASK, CCSR_GUTS_PMUXCR_SSI2_SSI); |
| 89 | break; |
| 90 | } |
| 91 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 92 | iounmap(guts); |
| 93 | |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 94 | return 0; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * mpc8610_hpcd_startup: program the board with various hardware parameters |
| 99 | * |
| 100 | * This function takes board-specific information, like clock frequencies |
| 101 | * and serial data formats, and passes that information to the codec and |
| 102 | * transport drivers. |
| 103 | */ |
| 104 | static int mpc8610_hpcd_startup(struct snd_pcm_substream *substream) |
| 105 | { |
| 106 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 107 | struct mpc8610_hpcd_data *machine_data = |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 108 | container_of(rtd->card, struct mpc8610_hpcd_data, card); |
| 109 | struct device *dev = rtd->card->dev; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 110 | int ret = 0; |
| 111 | |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 112 | /* Tell the codec driver what the serial protocol is. */ |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 113 | ret = snd_soc_dai_set_fmt(rtd->codec_dai, machine_data->dai_format); |
Liam Girdwood | 64105cf | 2008-07-08 13:19:18 +0100 | [diff] [blame] | 114 | if (ret < 0) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 115 | dev_err(dev, "could not set codec driver audio format\n"); |
Liam Girdwood | 64105cf | 2008-07-08 13:19:18 +0100 | [diff] [blame] | 116 | return ret; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 117 | } |
| 118 | |
| 119 | /* |
| 120 | * Tell the codec driver what the MCLK frequency is, and whether it's |
| 121 | * a slave or master. |
| 122 | */ |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 123 | ret = snd_soc_dai_set_sysclk(rtd->codec_dai, 0, |
| 124 | machine_data->clk_frequency, |
| 125 | machine_data->codec_clk_direction); |
Liam Girdwood | 64105cf | 2008-07-08 13:19:18 +0100 | [diff] [blame] | 126 | if (ret < 0) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 127 | dev_err(dev, "could not set codec driver clock params\n"); |
Liam Girdwood | 64105cf | 2008-07-08 13:19:18 +0100 | [diff] [blame] | 128 | return ret; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | return 0; |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * mpc8610_hpcd_machine_remove: Remove the sound device |
| 136 | * |
| 137 | * This function is called to remove the sound device for one SSI. We |
| 138 | * de-program the DMACR and PMUXCR register. |
| 139 | */ |
Mark Brown | e7361ec | 2011-01-26 14:17:20 +0000 | [diff] [blame] | 140 | static int mpc8610_hpcd_machine_remove(struct snd_soc_card *card) |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 141 | { |
| 142 | struct mpc8610_hpcd_data *machine_data = |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 143 | container_of(card, struct mpc8610_hpcd_data, card); |
Timur Tabi | 6e6f662 | 2010-07-22 11:33:30 -0500 | [diff] [blame] | 144 | struct ccsr_guts_86xx __iomem *guts; |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 145 | |
Timur Tabi | 6e6f662 | 2010-07-22 11:33:30 -0500 | [diff] [blame] | 146 | guts = ioremap(guts_phys, sizeof(struct ccsr_guts_86xx)); |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 147 | if (!guts) { |
| 148 | dev_err(card->dev, "could not map global utilities\n"); |
| 149 | return -ENOMEM; |
| 150 | } |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 151 | |
| 152 | /* Restore the signal routing */ |
| 153 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 154 | guts_set_dmacr(guts, machine_data->dma_id[0], |
| 155 | machine_data->dma_channel_id[0], 0); |
| 156 | guts_set_dmacr(guts, machine_data->dma_id[1], |
| 157 | machine_data->dma_channel_id[1], 0); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 158 | |
| 159 | switch (machine_data->ssi_id) { |
| 160 | case 0: |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 161 | clrsetbits_be32(&guts->pmuxcr, |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 162 | CCSR_GUTS_PMUXCR_SSI1_MASK, CCSR_GUTS_PMUXCR_SSI1_LA); |
| 163 | break; |
| 164 | case 1: |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 165 | clrsetbits_be32(&guts->pmuxcr, |
Timur Tabi | 8354499 | 2008-06-13 14:02:31 -0500 | [diff] [blame] | 166 | CCSR_GUTS_PMUXCR_SSI2_MASK, CCSR_GUTS_PMUXCR_SSI2_LA); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 167 | break; |
| 168 | } |
| 169 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 170 | iounmap(guts); |
| 171 | |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 172 | return 0; |
| 173 | } |
| 174 | |
| 175 | /** |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 176 | * mpc8610_hpcd_ops: ASoC machine driver operations |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 177 | */ |
| 178 | static struct snd_soc_ops mpc8610_hpcd_ops = { |
| 179 | .startup = mpc8610_hpcd_startup, |
| 180 | }; |
| 181 | |
| 182 | /** |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 183 | * get_node_by_phandle_name - get a node by its phandle name |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 184 | * |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 185 | * This function takes a node, the name of a property in that node, and a |
| 186 | * compatible string. Assuming the property is a phandle to another node, |
| 187 | * it returns that node, (optionally) if that node is compatible. |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 188 | * |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 189 | * If the property is not a phandle, or the node it points to is not compatible |
| 190 | * with the specific string, then NULL is returned. |
| 191 | */ |
| 192 | static struct device_node *get_node_by_phandle_name(struct device_node *np, |
| 193 | const char *name, |
| 194 | const char *compatible) |
| 195 | { |
| 196 | const phandle *ph; |
| 197 | int len; |
| 198 | |
| 199 | ph = of_get_property(np, name, &len); |
| 200 | if (!ph || (len != sizeof(phandle))) |
| 201 | return NULL; |
| 202 | |
| 203 | np = of_find_node_by_phandle(*ph); |
| 204 | if (!np) |
| 205 | return NULL; |
| 206 | |
| 207 | if (compatible && !of_device_is_compatible(np, compatible)) { |
| 208 | of_node_put(np); |
| 209 | return NULL; |
| 210 | } |
| 211 | |
| 212 | return np; |
| 213 | } |
| 214 | |
| 215 | /** |
| 216 | * get_parent_cell_index -- return the cell-index of the parent of a node |
| 217 | * |
| 218 | * Return the value of the cell-index property of the parent of the given |
| 219 | * node. This is used for DMA channel nodes that need to know the DMA ID |
| 220 | * of the controller they are on. |
| 221 | */ |
| 222 | static int get_parent_cell_index(struct device_node *np) |
| 223 | { |
| 224 | struct device_node *parent = of_get_parent(np); |
| 225 | const u32 *iprop; |
| 226 | |
| 227 | if (!parent) |
| 228 | return -1; |
| 229 | |
| 230 | iprop = of_get_property(parent, "cell-index", NULL); |
| 231 | of_node_put(parent); |
| 232 | |
| 233 | if (!iprop) |
| 234 | return -1; |
| 235 | |
Timur Tabi | 147dfe9 | 2011-06-08 15:02:55 -0500 | [diff] [blame] | 236 | return be32_to_cpup(iprop); |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | /** |
| 240 | * codec_node_dev_name - determine the dev_name for a codec node |
| 241 | * |
| 242 | * This function determines the dev_name for an I2C node. This is the name |
| 243 | * that would be returned by dev_name() if this device_node were part of a |
| 244 | * 'struct device' It's ugly and hackish, but it works. |
| 245 | * |
| 246 | * The dev_name for such devices include the bus number and I2C address. For |
| 247 | * example, "cs4270-codec.0-004f". |
| 248 | */ |
| 249 | static int codec_node_dev_name(struct device_node *np, char *buf, size_t len) |
| 250 | { |
| 251 | const u32 *iprop; |
| 252 | int bus, addr; |
| 253 | char temp[DAI_NAME_SIZE]; |
| 254 | |
| 255 | of_modalias_node(np, temp, DAI_NAME_SIZE); |
| 256 | |
| 257 | iprop = of_get_property(np, "reg", NULL); |
| 258 | if (!iprop) |
| 259 | return -EINVAL; |
| 260 | |
Timur Tabi | 147dfe9 | 2011-06-08 15:02:55 -0500 | [diff] [blame] | 261 | addr = be32_to_cpup(iprop); |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 262 | |
| 263 | bus = get_parent_cell_index(np); |
| 264 | if (bus < 0) |
| 265 | return bus; |
| 266 | |
| 267 | snprintf(buf, len, "%s-codec.%u-%04x", temp, bus, addr); |
| 268 | |
| 269 | return 0; |
| 270 | } |
| 271 | |
| 272 | static int get_dma_channel(struct device_node *ssi_np, |
| 273 | const char *compatible, |
| 274 | struct snd_soc_dai_link *dai, |
| 275 | unsigned int *dma_channel_id, |
| 276 | unsigned int *dma_id) |
| 277 | { |
| 278 | struct resource res; |
| 279 | struct device_node *dma_channel_np; |
| 280 | const u32 *iprop; |
| 281 | int ret; |
| 282 | |
| 283 | dma_channel_np = get_node_by_phandle_name(ssi_np, compatible, |
| 284 | "fsl,ssi-dma-channel"); |
| 285 | if (!dma_channel_np) |
| 286 | return -EINVAL; |
| 287 | |
| 288 | /* Determine the dev_name for the device_node. This code mimics the |
| 289 | * behavior of of_device_make_bus_id(). We need this because ASoC uses |
| 290 | * the dev_name() of the device to match the platform (DMA) device with |
| 291 | * the CPU (SSI) device. It's all ugly and hackish, but it works (for |
| 292 | * now). |
| 293 | * |
| 294 | * dai->platform name should already point to an allocated buffer. |
| 295 | */ |
| 296 | ret = of_address_to_resource(dma_channel_np, 0, &res); |
| 297 | if (ret) |
| 298 | return ret; |
| 299 | snprintf((char *)dai->platform_name, DAI_NAME_SIZE, "%llx.%s", |
| 300 | (unsigned long long) res.start, dma_channel_np->name); |
| 301 | |
| 302 | iprop = of_get_property(dma_channel_np, "cell-index", NULL); |
| 303 | if (!iprop) { |
| 304 | of_node_put(dma_channel_np); |
| 305 | return -EINVAL; |
| 306 | } |
| 307 | |
Timur Tabi | 147dfe9 | 2011-06-08 15:02:55 -0500 | [diff] [blame] | 308 | *dma_channel_id = be32_to_cpup(iprop); |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 309 | *dma_id = get_parent_cell_index(dma_channel_np); |
| 310 | of_node_put(dma_channel_np); |
| 311 | |
| 312 | return 0; |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * mpc8610_hpcd_probe: platform probe function for the machine driver |
| 317 | * |
| 318 | * Although this is a machine driver, the SSI node is the "master" node with |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 319 | * respect to audio hardware connections. Therefore, we create a new ASoC |
| 320 | * device for each new SSI node that has a codec attached. |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 321 | */ |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 322 | static int mpc8610_hpcd_probe(struct platform_device *pdev) |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 323 | { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 324 | struct device *dev = pdev->dev.parent; |
Timur Tabi | 38fec72 | 2010-08-19 15:26:58 -0500 | [diff] [blame] | 325 | /* ssi_pdev is the platform device for the SSI node that probed us */ |
| 326 | struct platform_device *ssi_pdev = |
| 327 | container_of(dev, struct platform_device, dev); |
| 328 | struct device_node *np = ssi_pdev->dev.of_node; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 329 | struct device_node *codec_np = NULL; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 330 | struct platform_device *sound_device = NULL; |
| 331 | struct mpc8610_hpcd_data *machine_data; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 332 | int ret = -ENODEV; |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 333 | const char *sprop; |
| 334 | const u32 *iprop; |
| 335 | |
| 336 | /* We are only interested in SSIs with a codec phandle in them, |
| 337 | * so let's make sure this SSI has one. The MPC8610 HPCD only |
| 338 | * knows about the CS4270 codec, so reject anything else. |
| 339 | */ |
| 340 | codec_np = get_node_by_phandle_name(np, "codec-handle", |
| 341 | "cirrus,cs4270"); |
| 342 | if (!codec_np) { |
| 343 | dev_err(dev, "invalid codec node\n"); |
| 344 | return -EINVAL; |
| 345 | } |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 346 | |
| 347 | machine_data = kzalloc(sizeof(struct mpc8610_hpcd_data), GFP_KERNEL); |
Julia Lawall | c09f5ca | 2011-08-20 09:02:01 +0200 | [diff] [blame] | 348 | if (!machine_data) { |
| 349 | ret = -ENOMEM; |
| 350 | goto error_alloc; |
| 351 | } |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 352 | |
Timur Tabi | 38fec72 | 2010-08-19 15:26:58 -0500 | [diff] [blame] | 353 | machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 354 | machine_data->dai[0].ops = &mpc8610_hpcd_ops; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 355 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 356 | /* Determine the codec name, it will be used as the codec DAI name */ |
| 357 | ret = codec_node_dev_name(codec_np, machine_data->codec_name, |
| 358 | DAI_NAME_SIZE); |
| 359 | if (ret) { |
| 360 | dev_err(&pdev->dev, "invalid codec node %s\n", |
| 361 | codec_np->full_name); |
| 362 | ret = -EINVAL; |
| 363 | goto error; |
| 364 | } |
| 365 | machine_data->dai[0].codec_name = machine_data->codec_name; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 366 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 367 | /* The DAI name from the codec (snd_soc_dai_driver.name) */ |
| 368 | machine_data->dai[0].codec_dai_name = "cs4270-hifi"; |
| 369 | |
| 370 | /* We register two DAIs per SSI, one for playback and the other for |
| 371 | * capture. Currently, we only support codecs that have one DAI for |
| 372 | * both playback and capture. |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 373 | */ |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 374 | memcpy(&machine_data->dai[1], &machine_data->dai[0], |
| 375 | sizeof(struct snd_soc_dai_link)); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 376 | |
| 377 | /* Get the device ID */ |
| 378 | iprop = of_get_property(np, "cell-index", NULL); |
| 379 | if (!iprop) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 380 | dev_err(&pdev->dev, "cell-index property not found\n"); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 381 | ret = -EINVAL; |
| 382 | goto error; |
| 383 | } |
Timur Tabi | 147dfe9 | 2011-06-08 15:02:55 -0500 | [diff] [blame] | 384 | machine_data->ssi_id = be32_to_cpup(iprop); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 385 | |
| 386 | /* Get the serial format and clock direction. */ |
| 387 | sprop = of_get_property(np, "fsl,mode", NULL); |
| 388 | if (!sprop) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 389 | dev_err(&pdev->dev, "fsl,mode property not found\n"); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 390 | ret = -EINVAL; |
| 391 | goto error; |
| 392 | } |
| 393 | |
| 394 | if (strcasecmp(sprop, "i2s-slave") == 0) { |
Timur Tabi | 380c883 | 2011-11-22 14:38:59 -0600 | [diff] [blame] | 395 | machine_data->dai_format = |
| 396 | SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 397 | machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT; |
| 398 | machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN; |
| 399 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 400 | /* In i2s-slave mode, the codec has its own clock source, so we |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 401 | * need to get the frequency from the device tree and pass it to |
| 402 | * the codec driver. |
| 403 | */ |
| 404 | iprop = of_get_property(codec_np, "clock-frequency", NULL); |
| 405 | if (!iprop || !*iprop) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 406 | dev_err(&pdev->dev, "codec bus-frequency " |
| 407 | "property is missing or invalid\n"); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 408 | ret = -EINVAL; |
| 409 | goto error; |
| 410 | } |
Timur Tabi | 147dfe9 | 2011-06-08 15:02:55 -0500 | [diff] [blame] | 411 | machine_data->clk_frequency = be32_to_cpup(iprop); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 412 | } else if (strcasecmp(sprop, "i2s-master") == 0) { |
Timur Tabi | 380c883 | 2011-11-22 14:38:59 -0600 | [diff] [blame] | 413 | machine_data->dai_format = |
| 414 | SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 415 | machine_data->codec_clk_direction = SND_SOC_CLOCK_IN; |
| 416 | machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT; |
| 417 | } else if (strcasecmp(sprop, "lj-slave") == 0) { |
Timur Tabi | 380c883 | 2011-11-22 14:38:59 -0600 | [diff] [blame] | 418 | machine_data->dai_format = |
| 419 | SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 420 | machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT; |
| 421 | machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN; |
| 422 | } else if (strcasecmp(sprop, "lj-master") == 0) { |
Timur Tabi | 380c883 | 2011-11-22 14:38:59 -0600 | [diff] [blame] | 423 | machine_data->dai_format = |
| 424 | SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBS_CFS; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 425 | machine_data->codec_clk_direction = SND_SOC_CLOCK_IN; |
| 426 | machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT; |
Roel Kluin | e5c2157 | 2008-02-22 18:41:41 +0100 | [diff] [blame] | 427 | } else if (strcasecmp(sprop, "rj-slave") == 0) { |
Timur Tabi | 380c883 | 2011-11-22 14:38:59 -0600 | [diff] [blame] | 428 | machine_data->dai_format = |
| 429 | SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBM_CFM; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 430 | machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT; |
| 431 | machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN; |
| 432 | } else if (strcasecmp(sprop, "rj-master") == 0) { |
Timur Tabi | 380c883 | 2011-11-22 14:38:59 -0600 | [diff] [blame] | 433 | machine_data->dai_format = |
| 434 | SND_SOC_DAIFMT_RIGHT_J | SND_SOC_DAIFMT_CBS_CFS; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 435 | machine_data->codec_clk_direction = SND_SOC_CLOCK_IN; |
| 436 | machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT; |
| 437 | } else if (strcasecmp(sprop, "ac97-slave") == 0) { |
Timur Tabi | 380c883 | 2011-11-22 14:38:59 -0600 | [diff] [blame] | 438 | machine_data->dai_format = |
| 439 | SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBM_CFM; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 440 | machine_data->codec_clk_direction = SND_SOC_CLOCK_OUT; |
| 441 | machine_data->cpu_clk_direction = SND_SOC_CLOCK_IN; |
| 442 | } else if (strcasecmp(sprop, "ac97-master") == 0) { |
Timur Tabi | 380c883 | 2011-11-22 14:38:59 -0600 | [diff] [blame] | 443 | machine_data->dai_format = |
| 444 | SND_SOC_DAIFMT_AC97 | SND_SOC_DAIFMT_CBS_CFS; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 445 | machine_data->codec_clk_direction = SND_SOC_CLOCK_IN; |
| 446 | machine_data->cpu_clk_direction = SND_SOC_CLOCK_OUT; |
| 447 | } else { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 448 | dev_err(&pdev->dev, |
| 449 | "unrecognized fsl,mode property '%s'\n", sprop); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 450 | ret = -EINVAL; |
| 451 | goto error; |
| 452 | } |
| 453 | |
| 454 | if (!machine_data->clk_frequency) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 455 | dev_err(&pdev->dev, "unknown clock frequency\n"); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 456 | ret = -EINVAL; |
| 457 | goto error; |
| 458 | } |
| 459 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 460 | /* Find the playback DMA channel to use. */ |
| 461 | machine_data->dai[0].platform_name = machine_data->platform_name[0]; |
| 462 | ret = get_dma_channel(np, "fsl,playback-dma", &machine_data->dai[0], |
| 463 | &machine_data->dma_channel_id[0], |
| 464 | &machine_data->dma_id[0]); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 465 | if (ret) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 466 | dev_err(&pdev->dev, "missing/invalid playback DMA phandle\n"); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 467 | goto error; |
| 468 | } |
| 469 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 470 | /* Find the capture DMA channel to use. */ |
| 471 | machine_data->dai[1].platform_name = machine_data->platform_name[1]; |
| 472 | ret = get_dma_channel(np, "fsl,capture-dma", &machine_data->dai[1], |
| 473 | &machine_data->dma_channel_id[1], |
| 474 | &machine_data->dma_id[1]); |
| 475 | if (ret) { |
| 476 | dev_err(&pdev->dev, "missing/invalid capture DMA phandle\n"); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 477 | goto error; |
| 478 | } |
| 479 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 480 | /* Initialize our DAI data structure. */ |
| 481 | machine_data->dai[0].stream_name = "playback"; |
| 482 | machine_data->dai[1].stream_name = "capture"; |
| 483 | machine_data->dai[0].name = machine_data->dai[0].stream_name; |
| 484 | machine_data->dai[1].name = machine_data->dai[1].stream_name; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 485 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 486 | machine_data->card.probe = mpc8610_hpcd_machine_probe; |
| 487 | machine_data->card.remove = mpc8610_hpcd_machine_remove; |
| 488 | machine_data->card.name = pdev->name; /* The platform driver name */ |
| 489 | machine_data->card.num_links = 2; |
| 490 | machine_data->card.dai_link = machine_data->dai; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 491 | |
| 492 | /* Allocate a new audio platform device structure */ |
| 493 | sound_device = platform_device_alloc("soc-audio", -1); |
| 494 | if (!sound_device) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 495 | dev_err(&pdev->dev, "platform device alloc failed\n"); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 496 | ret = -ENOMEM; |
| 497 | goto error; |
| 498 | } |
| 499 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 500 | /* Associate the card data with the sound device */ |
| 501 | platform_set_drvdata(sound_device, &machine_data->card); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 502 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 503 | /* Register with ASoC */ |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 504 | ret = platform_device_add(sound_device); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 505 | if (ret) { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 506 | dev_err(&pdev->dev, "platform device add failed\n"); |
Julia Lawall | c09f5ca | 2011-08-20 09:02:01 +0200 | [diff] [blame] | 507 | goto error_sound; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 508 | } |
Axel Lin | 67bd489 | 2010-11-29 14:54:58 +0800 | [diff] [blame] | 509 | dev_set_drvdata(&pdev->dev, sound_device); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 510 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 511 | of_node_put(codec_np); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 512 | |
| 513 | return 0; |
| 514 | |
Julia Lawall | c09f5ca | 2011-08-20 09:02:01 +0200 | [diff] [blame] | 515 | error_sound: |
Axel Lin | d890a1a | 2011-09-20 15:09:00 +0800 | [diff] [blame] | 516 | platform_device_put(sound_device); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 517 | error: |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 518 | kfree(machine_data); |
Julia Lawall | c09f5ca | 2011-08-20 09:02:01 +0200 | [diff] [blame] | 519 | error_alloc: |
| 520 | of_node_put(codec_np); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 521 | return ret; |
| 522 | } |
| 523 | |
| 524 | /** |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 525 | * mpc8610_hpcd_remove: remove the platform device |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 526 | * |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 527 | * This function is called when the platform device is removed. |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 528 | */ |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 529 | static int __devexit mpc8610_hpcd_remove(struct platform_device *pdev) |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 530 | { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 531 | struct platform_device *sound_device = dev_get_drvdata(&pdev->dev); |
| 532 | struct snd_soc_card *card = platform_get_drvdata(sound_device); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 533 | struct mpc8610_hpcd_data *machine_data = |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 534 | container_of(card, struct mpc8610_hpcd_data, card); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 535 | |
| 536 | platform_device_unregister(sound_device); |
| 537 | |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 538 | kfree(machine_data); |
| 539 | sound_device->dev.platform_data = NULL; |
| 540 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 541 | dev_set_drvdata(&pdev->dev, NULL); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 542 | |
| 543 | return 0; |
| 544 | } |
| 545 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 546 | static struct platform_driver mpc8610_hpcd_driver = { |
| 547 | .probe = mpc8610_hpcd_probe, |
| 548 | .remove = __devexit_p(mpc8610_hpcd_remove), |
Grant Likely | 4018294 | 2010-04-13 16:13:02 -0700 | [diff] [blame] | 549 | .driver = { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 550 | /* The name must match the 'model' property in the device tree, |
| 551 | * in lowercase letters. |
| 552 | */ |
| 553 | .name = "snd-soc-mpc8610hpcd", |
Grant Likely | 4018294 | 2010-04-13 16:13:02 -0700 | [diff] [blame] | 554 | .owner = THIS_MODULE, |
Grant Likely | 4018294 | 2010-04-13 16:13:02 -0700 | [diff] [blame] | 555 | }, |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 556 | }; |
| 557 | |
| 558 | /** |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 559 | * mpc8610_hpcd_init: machine driver initialization. |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 560 | * |
| 561 | * This function is called when this module is loaded. |
| 562 | */ |
| 563 | static int __init mpc8610_hpcd_init(void) |
| 564 | { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 565 | struct device_node *guts_np; |
| 566 | struct resource res; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 567 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 568 | pr_info("Freescale MPC8610 HPCD ALSA SoC machine driver\n"); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 569 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 570 | /* Get the physical address of the global utilities registers */ |
| 571 | guts_np = of_find_compatible_node(NULL, NULL, "fsl,mpc8610-guts"); |
| 572 | if (of_address_to_resource(guts_np, 0, &res)) { |
| 573 | pr_err("mpc8610-hpcd: missing/invalid global utilities node\n"); |
| 574 | return -EINVAL; |
| 575 | } |
| 576 | guts_phys = res.start; |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 577 | |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 578 | return platform_driver_register(&mpc8610_hpcd_driver); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 579 | } |
| 580 | |
| 581 | /** |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 582 | * mpc8610_hpcd_exit: machine driver exit |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 583 | * |
| 584 | * This function is called when this driver is unloaded. |
| 585 | */ |
| 586 | static void __exit mpc8610_hpcd_exit(void) |
| 587 | { |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 588 | platform_driver_unregister(&mpc8610_hpcd_driver); |
Timur Tabi | 17467f2 | 2008-01-11 18:15:26 +0100 | [diff] [blame] | 589 | } |
| 590 | |
| 591 | module_init(mpc8610_hpcd_init); |
| 592 | module_exit(mpc8610_hpcd_exit); |
| 593 | |
| 594 | MODULE_AUTHOR("Timur Tabi <timur@freescale.com>"); |
Liam Girdwood | f0fba2a | 2010-03-17 20:15:21 +0000 | [diff] [blame] | 595 | MODULE_DESCRIPTION("Freescale MPC8610 HPCD ALSA SoC machine driver"); |
| 596 | MODULE_LICENSE("GPL v2"); |