Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/27655/?format=api
{ "id": 27655, "url": "http://patchwork.ozlabs.org/api/patches/27655/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20090526123410.17472.15251.stgit@terra/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20090526123410.17472.15251.stgit@terra>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20090526123410.17472.15251.stgit@terra/", "date": "2009-05-26T12:34:10", "name": "[V5,3/5] AC97 driver for mpc5200", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "3f006fd0605b24ca9c3403ccc613c8ff280e1725", "submitter": { "id": 375, "url": "http://patchwork.ozlabs.org/api/people/375/?format=api", "name": "jonsmirl@gmail.com", "email": "jonsmirl@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20090526123410.17472.15251.stgit@terra/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/27655/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/27655/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org>", "X-Original-To": [ "patchwork-incoming@bilbo.ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "patchwork-incoming@ozlabs.org", "linuxppc-dev@ozlabs.org" ], "Received": [ "from ozlabs.org (ozlabs.org [203.10.76.45])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client CN \"mx.ozlabs.org\",\n\tIssuer \"CA Cert Signing Authority\" (verified OK))\n\tby bilbo.ozlabs.org (Postfix) with ESMTPS id C9382B7069\n\tfor <patchwork-incoming@bilbo.ozlabs.org>;\n\tTue, 26 May 2009 22:40:18 +1000 (EST)", "by ozlabs.org (Postfix)\n\tid 5D3C1DE5C8; Tue, 26 May 2009 22:36:04 +1000 (EST)", "from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 58F48DE2D7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 26 May 2009 22:36:04 +1000 (EST)", "from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30])\n\tby ozlabs.org (Postfix) with ESMTP id BE76BDE122\n\tfor <linuxppc-dev@ozlabs.org>; Tue, 26 May 2009 22:34:14 +1000 (EST)", "by yx-out-2324.google.com with SMTP id 8so1764131yxb.39\n\tfor <linuxppc-dev@ozlabs.org>; Tue, 26 May 2009 05:34:12 -0700 (PDT)", "by 10.90.101.7 with SMTP id y7mr7363278agb.10.1243341252617;\n\tTue, 26 May 2009 05:34:12 -0700 (PDT)", "from terra (c-76-109-159-38.hsd1.fl.comcast.net [76.109.159.38])\n\tby mx.google.com with ESMTPS id\n\t21sm16771455agb.13.2009.05.26.05.34.11\n\t(version=TLSv1/SSLv3 cipher=RC4-MD5);\n\tTue, 26 May 2009 05:34:12 -0700 (PDT)", "from localhost ([127.0.0.1] helo=[127.0.1.1])\n\tby terra with esmtp (Exim 4.69) (envelope-from <jonsmirl@gmail.com>)\n\tid 1M8vr8-0004ZV-C5; Tue, 26 May 2009 08:34:10 -0400" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; \n\th=domainkey-signature:received:received:received:subject:to:from:date\n\t:message-id:in-reply-to:references:user-agent:mime-version\n\t:content-type:content-transfer-encoding;\n\tbh=z7TEulqeICE3IM+QRAfBAhj/QzPi54EAakrKrUGMpPc=;\n\tb=KzjhAXowva2zrK/xVVn2eU4pgWz1diKKLarVl8bbpwn6OZkrrAClss97QPD/4CbSb0\n\tFfZtHaCJxHgc7wBA3WdPOT8RFT4XKLFGN1mZb/5amh3QwhR6YNyTbHw+/biFIweS2iyg\n\tCP8dXNznCV8x80catbSzoVc7Qe4TRXCtgFkKE=", "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\n\th=subject:to:from:date:message-id:in-reply-to:references:user-agent\n\t:mime-version:content-type:content-transfer-encoding;\n\tb=xJ6Gc2+gDU0KI5m3pF2lOmZqpD5B+Zzld0OiDhq9hTN/F/lvjWRFpaO87X58x3tyEe\n\twWF/e0uS1zTiNfYohTS+djc+0TfsViXFY1CwIIFliXnUcx6LDthPkfjWWueYSiP5cd2w\n\tFw78s9nV99kE7tAGbMwGK1CI+Tv7leqBtBo0o=", "Subject": "[PATCH V5 3/5] AC97 driver for mpc5200", "To": "grant.likely@secretlab.ca, linuxppc-dev@ozlabs.org,\n\talsa-devel@alsa-project.org, broonie@sirena.org.uk, timur@freescale.com", "From": "Jon Smirl <jonsmirl@gmail.com>", "Date": "Tue, 26 May 2009 08:34:10 -0400", "Message-ID": "<20090526123410.17472.15251.stgit@terra>", "In-Reply-To": "<20090526123235.17472.73912.stgit@terra>", "References": "<20090526123235.17472.73912.stgit@terra>", "User-Agent": "StGit/0.14.3.366.gf979", "MIME-Version": "1.0", "X-BeenThere": "linuxppc-dev@ozlabs.org", "X-Mailman-Version": "2.1.11", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>", "List-Unsubscribe": "<https://ozlabs.org/mailman/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://ozlabs.org/pipermail/linuxppc-dev>", "List-Post": "<mailto:linuxppc-dev@ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@ozlabs.org?subject=help>", "List-Subscribe": "<https://ozlabs.org/mailman/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org" }, "content": "AC97 driver for mpc5200\n\nI've implemented retries for when the AC97 hardware doesn't reset on\nfirst try. About 10% of the time both the Efika and pcm030 AC97 codecs\ndon't reset on first try and need to be poked multiple times. Failure\nis indicated by not having the link clock start ticking. Every once in\na while even five pokes won't get the link started and I have to power\ncycle.\n\nSigned-off-by: Jon Smirl <jonsmirl@gmail.com>\n---\n sound/soc/fsl/Kconfig | 11 +\n sound/soc/fsl/Makefile | 1 \n sound/soc/fsl/mpc5200_psc_ac97.c | 331 ++++++++++++++++++++++++++++++++++++++\n sound/soc/fsl/mpc5200_psc_ac97.h | 15 ++\n 4 files changed, 358 insertions(+), 0 deletions(-)\n create mode 100644 sound/soc/fsl/mpc5200_psc_ac97.c\n create mode 100644 sound/soc/fsl/mpc5200_psc_ac97.h", "diff": "diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig\nindex 1918c78..3bce952 100644\n--- a/sound/soc/fsl/Kconfig\n+++ b/sound/soc/fsl/Kconfig\n@@ -29,3 +29,14 @@ config SND_SOC_MPC5200_I2S\n \tselect PPC_BESTCOMM_GEN_BD\n \thelp\n \t Say Y here to support the MPC5200 PSCs in I2S mode.\n+\n+config SND_SOC_MPC5200_AC97\n+\ttristate \"Freescale MPC5200 PSC in AC97 mode driver\"\n+\tdepends on PPC_MPC52xx && PPC_BESTCOMM\n+\tselect AC97_BUS\n+\tselect SND_MPC52xx_DMA\n+\tselect PPC_BESTCOMM_GEN_BD\n+\thelp\n+\t Say Y here to support the MPC5200 PSCs in AC97 mode.\n+\n+\ndiff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile\nindex 7731ef2..14631a1 100644\n--- a/sound/soc/fsl/Makefile\n+++ b/sound/soc/fsl/Makefile\n@@ -13,4 +13,5 @@ obj-$(CONFIG_SND_SOC_MPC8610) += snd-soc-fsl-ssi.o snd-soc-fsl-dma.o\n # MPC5200 Platform Support\n obj-$(CONFIG_SND_MPC52xx_DMA) += mpc5200_dma.o\n obj-$(CONFIG_SND_SOC_MPC5200_I2S) += mpc5200_psc_i2s.o\n+obj-$(CONFIG_SND_SOC_MPC5200_AC97) += mpc5200_psc_ac97.o\n \ndiff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c\nnew file mode 100644\nindex 0000000..9f2df15\n--- /dev/null\n+++ b/sound/soc/fsl/mpc5200_psc_ac97.c\n@@ -0,0 +1,331 @@\n+/*\n+ * linux/sound/mpc5200-ac97.c -- AC97 support for the Freescale MPC52xx chip.\n+ *\n+ * Copyright (C) 2009 Jon Smirl, Digispeaker\n+ * Author: Jon Smirl <jonsmirl@gmail.com>\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License version 2 as\n+ * published by the Free Software Foundation.\n+ */\n+\n+#include <linux/module.h>\n+#include <linux/of_device.h>\n+#include <linux/of_platform.h>\n+\n+#include <sound/pcm.h>\n+#include <sound/pcm_params.h>\n+#include <sound/soc.h>\n+\n+#include <asm/time.h>\n+#include <asm/delay.h>\n+#include <asm/mpc52xx_psc.h>\n+\n+#include \"mpc5200_dma.h\"\n+#include \"mpc5200_psc_ac97.h\"\n+\n+#define DRV_NAME \"mpc5200-psc-ac97\"\n+\n+/* ALSA only supports a single AC97 device so static is recommend here */\n+static struct psc_dma *psc_dma;\n+\n+static unsigned short psc_ac97_read(struct snd_ac97 *ac97, unsigned short reg)\n+{\n+\tint rc;\n+\tunsigned int val;\n+\n+\t/* Wait for command send status zero = ready */\n+\tspin_event_timeout(!(in_be16(&psc_dma->psc_regs->sr_csr.status) &\n+\t\t\t\tMPC52xx_PSC_SR_CMDSEND), 100, 0, rc);\n+\tif (rc == 0) {\n+\t\tpr_err(\"timeout on ac97 bus (rdy)\\n\");\n+\t\treturn -ENODEV;\n+\t}\n+\t/* Send the read */\n+\tout_be32(&psc_dma->psc_regs->ac97_cmd, (1<<31) | ((reg & 0x7f) << 24));\n+\n+\t/* Wait for the answer */\n+\tspin_event_timeout((in_be16(&psc_dma->psc_regs->sr_csr.status) &\n+\t\t\t\tMPC52xx_PSC_SR_DATA_VAL), 100, 0, rc);\n+\tif (rc == 0) {\n+\t\tpr_err(\"timeout on ac97 read (val) %x\\n\",\n+\t\t\t\tin_be16(&psc_dma->psc_regs->sr_csr.status));\n+\t\treturn -ENODEV;\n+\t}\n+\t/* Get the data */\n+\tval = in_be32(&psc_dma->psc_regs->ac97_data);\n+\tif (((val >> 24) & 0x7f) != reg) {\n+\t\tpr_err(\"reg echo error on ac97 read\\n\");\n+\t\treturn -ENODEV;\n+\t}\n+\tval = (val >> 8) & 0xffff;\n+\n+\treturn (unsigned short) val;\n+}\n+\n+static void psc_ac97_write(struct snd_ac97 *ac97,\n+\t\t\t\tunsigned short reg, unsigned short val)\n+{\n+\tint rc;\n+\n+\t/* Wait for command status zero = ready */\n+\tspin_event_timeout(!(in_be16(&psc_dma->psc_regs->sr_csr.status) &\n+\t\t\t\tMPC52xx_PSC_SR_CMDSEND), 100, 0, rc);\n+\tif (rc == 0) {\n+\t\tpr_err(\"timeout on ac97 bus (write)\\n\");\n+\t\treturn;\n+\t}\n+\t/* Write data */\n+\tout_be32(&psc_dma->psc_regs->ac97_cmd,\n+\t\t\t((reg & 0x7f) << 24) | (val << 8));\n+}\n+\n+static void psc_ac97_warm_reset(struct snd_ac97 *ac97)\n+{\n+\tint rc;\n+\tstruct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;\n+\n+\tout_be32(®s->sicr, psc_dma->sicr | MPC52xx_PSC_SICR_AWR);\n+\tspin_event_timeout(0, 3, 0, rc);\n+\tout_be32(®s->sicr, psc_dma->sicr);\n+}\n+\n+static void psc_ac97_cold_reset(struct snd_ac97 *ac97)\n+{\n+\tint rc;\n+\tstruct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;\n+\n+\t/* Do a cold reset */\n+\tout_8(®s->op1, MPC52xx_PSC_OP_RES);\n+\tspin_event_timeout(0, 10, 0, rc);\n+\tout_8(®s->op0, MPC52xx_PSC_OP_RES);\n+\tspin_event_timeout(0, 50, 0, rc);\n+\tpsc_ac97_warm_reset(ac97);\n+}\n+\n+struct snd_ac97_bus_ops soc_ac97_ops = {\n+\t.read\t\t= psc_ac97_read,\n+\t.write\t\t= psc_ac97_write,\n+\t.reset\t\t= psc_ac97_cold_reset,\n+\t.warm_reset\t= psc_ac97_warm_reset,\n+};\n+EXPORT_SYMBOL_GPL(soc_ac97_ops);\n+\n+static int psc_ac97_hw_analog_params(struct snd_pcm_substream *substream,\n+\t\t\t\t struct snd_pcm_hw_params *params,\n+\t\t\t\t struct snd_soc_dai *cpu_dai)\n+{\n+\tstruct psc_dma *psc_dma = cpu_dai->private_data;\n+\n+\tdev_dbg(psc_dma->dev, \"%s(substream=%p) p_size=%i p_bytes=%i\"\n+\t\t\" periods=%i buffer_size=%i buffer_bytes=%i channels=%i\"\n+\t\t\" rate=%i format=%i\\n\",\n+\t\t__func__, substream, params_period_size(params),\n+\t\tparams_period_bytes(params), params_periods(params),\n+\t\tparams_buffer_size(params), params_buffer_bytes(params),\n+\t\tparams_channels(params), params_rate(params),\n+\t\tparams_format(params));\n+\n+\n+\tif (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) {\n+\t\tif (params_channels(params) == 1)\n+\t\t\tpsc_dma->slots |= 0x00000100;\n+\t\telse\n+\t\t\tpsc_dma->slots |= 0x00000300;\n+\t} else {\n+\t\tif (params_channels(params) == 1)\n+\t\t\tpsc_dma->slots |= 0x01000000;\n+\t\telse\n+\t\t\tpsc_dma->slots |= 0x03000000;\n+\t}\n+\tout_be32(&psc_dma->psc_regs->ac97_slots, psc_dma->slots);\n+\n+\treturn 0;\n+}\n+\n+static int psc_ac97_hw_digital_params(struct snd_pcm_substream *substream,\n+\t\t\t\t struct snd_pcm_hw_params *params,\n+\t\t\t\t struct snd_soc_dai *cpu_dai)\n+{\n+\tstruct psc_dma *psc_dma = cpu_dai->private_data;\n+\n+\tif (params_channels(params) == 1)\n+\t\tout_be32(&psc_dma->psc_regs->ac97_slots, 0x01000000);\n+\telse\n+\t\tout_be32(&psc_dma->psc_regs->ac97_slots, 0x03000000);\n+\n+\treturn 0;\n+}\n+\n+static int psc_ac97_trigger(struct snd_pcm_substream *substream, int cmd,\n+\t\t\t\t\t\t\tstruct snd_soc_dai *dai)\n+{\n+\tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n+\tstruct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data;\n+\n+\tswitch (cmd) {\n+\tcase SNDRV_PCM_TRIGGER_STOP:\n+\t\tif (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)\n+\t\t\tpsc_dma->slots &= 0xFFFF0000;\n+\t\telse\n+\t\t\tpsc_dma->slots &= 0x0000FFFF;\n+\n+\t\tout_be32(&psc_dma->psc_regs->ac97_slots, psc_dma->slots);\n+\t\tbreak;\n+\t}\n+\treturn 0;\n+}\n+\n+static int psc_ac97_probe(struct platform_device *pdev,\n+\t\t\t\t\tstruct snd_soc_dai *cpu_dai)\n+{\n+\tstruct psc_dma *psc_dma = cpu_dai->private_data;\n+\tstruct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;\n+\n+\t/* Go */\n+\tout_8(®s->command, MPC52xx_PSC_TX_ENABLE | MPC52xx_PSC_RX_ENABLE);\n+\treturn 0;\n+}\n+\n+/* ---------------------------------------------------------------------\n+ * ALSA SoC Bindings\n+ *\n+ * - Digital Audio Interface (DAI) template\n+ * - create/destroy dai hooks\n+ */\n+\n+/**\n+ * psc_ac97_dai_template: template CPU Digital Audio Interface\n+ */\n+static struct snd_soc_dai_ops psc_ac97_analog_ops = {\n+\t.hw_params\t= psc_ac97_hw_analog_params,\n+\t.trigger\t= psc_ac97_trigger,\n+};\n+\n+static struct snd_soc_dai_ops psc_ac97_digital_ops = {\n+\t.hw_params\t= psc_ac97_hw_digital_params,\n+};\n+\n+struct snd_soc_dai psc_ac97_dai[] = {\n+{\n+\t.name = \"AC97\",\n+\t.ac97_control = 1,\n+\t.probe\t= psc_ac97_probe,\n+\t.playback = {\n+\t\t.channels_min = 1,\n+\t\t.channels_max = 6,\n+\t\t.rates = SNDRV_PCM_RATE_8000_48000,\n+\t\t.formats = SNDRV_PCM_FMTBIT_S32_BE,\n+\t},\n+\t.capture = {\n+\t\t.channels_min = 1,\n+\t\t.channels_max = 2,\n+\t\t.rates = SNDRV_PCM_RATE_8000_48000,\n+\t\t.formats = SNDRV_PCM_FMTBIT_S32_BE,\n+\t},\n+\t.ops = &psc_ac97_analog_ops,\n+},\n+{\n+\t.name = \"SPDIF\",\n+\t.ac97_control = 1,\n+\t.playback = {\n+\t\t.channels_min = 1,\n+\t\t.channels_max = 2,\n+\t\t.rates = SNDRV_PCM_RATE_32000 | \\\n+\t\t\tSNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000,\n+\t\t.formats = SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE,\n+\t},\n+\t.ops = &psc_ac97_digital_ops,\n+} };\n+EXPORT_SYMBOL_GPL(psc_ac97_dai);\n+\n+\n+\n+/* ---------------------------------------------------------------------\n+ * OF platform bus binding code:\n+ * - Probe/remove operations\n+ * - OF device match table\n+ */\n+static int __devinit psc_ac97_of_probe(struct of_device *op,\n+\t\t\t\t const struct of_device_id *match)\n+{\n+\tint rc, i;\n+\tstruct snd_ac97 ac97;\n+\tstruct mpc52xx_psc __iomem *regs;\n+\n+\trc = mpc5200_audio_dma_create(op);\n+\tif (rc != 0)\n+\t\treturn rc;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(psc_ac97_dai); i++)\n+\t\tpsc_ac97_dai[i].dev = &op->dev;\n+\n+\trc = snd_soc_register_dais(psc_ac97_dai, ARRAY_SIZE(psc_ac97_dai));\n+\tif (rc != 0) {\n+\t\tdev_err(&op->dev, \"Failed to register DAI\\n\");\n+\t\treturn rc;\n+\t}\n+\n+\tpsc_dma = dev_get_drvdata(&op->dev);\n+\tregs = psc_dma->psc_regs;\n+\tac97.private_data = psc_dma;\n+\n+\tfor (i = 0; i < ARRAY_SIZE(psc_ac97_dai); i++)\n+\t\tpsc_ac97_dai[i].private_data = psc_dma;\n+\n+\tpsc_dma->imr = 0;\n+\tout_be16(&psc_dma->psc_regs->isr_imr.imr, psc_dma->imr);\n+\n+\t/* Configure the serial interface mode to AC97 */\n+\tpsc_dma->sicr = MPC52xx_PSC_SICR_SIM_AC97 | MPC52xx_PSC_SICR_ENAC97;\n+\tout_be32(®s->sicr, psc_dma->sicr);\n+\n+\t/* No slots active */\n+\tout_be32(®s->ac97_slots, 0x00000000);\n+\n+\treturn 0;\n+}\n+\n+static int __devexit psc_ac97_of_remove(struct of_device *op)\n+{\n+\treturn mpc5200_audio_dma_destroy(op);\n+}\n+\n+/* Match table for of_platform binding */\n+static struct of_device_id psc_ac97_match[] __devinitdata = {\n+\t{ .compatible = \"fsl,mpc5200-psc-ac97\", },\n+\t{ .compatible = \"fsl,mpc5200b-psc-ac97\", },\n+\t{}\n+};\n+MODULE_DEVICE_TABLE(of, psc_ac97_match);\n+\n+static struct of_platform_driver psc_ac97_driver = {\n+\t.match_table = psc_ac97_match,\n+\t.probe = psc_ac97_of_probe,\n+\t.remove = __devexit_p(psc_ac97_of_remove),\n+\t.driver = {\n+\t\t.name = \"mpc5200-psc-ac97\",\n+\t\t.owner = THIS_MODULE,\n+\t},\n+};\n+\n+/* ---------------------------------------------------------------------\n+ * Module setup and teardown; simply register the of_platform driver\n+ * for the PSC in AC97 mode.\n+ */\n+static int __init psc_ac97_init(void)\n+{\n+\treturn of_register_platform_driver(&psc_ac97_driver);\n+}\n+module_init(psc_ac97_init);\n+\n+static void __exit psc_ac97_exit(void)\n+{\n+\tof_unregister_platform_driver(&psc_ac97_driver);\n+}\n+module_exit(psc_ac97_exit);\n+\n+MODULE_AUTHOR(\"Jon Smirl <jonsmirl@gmail.com>\");\n+MODULE_DESCRIPTION(\"mpc5200 AC97 module\");\n+MODULE_LICENSE(\"GPL\");\n+\ndiff --git a/sound/soc/fsl/mpc5200_psc_ac97.h b/sound/soc/fsl/mpc5200_psc_ac97.h\nnew file mode 100644\nindex 0000000..4bc18c3\n--- /dev/null\n+++ b/sound/soc/fsl/mpc5200_psc_ac97.h\n@@ -0,0 +1,15 @@\n+/*\n+ * Freescale MPC5200 PSC in AC97 mode\n+ * ALSA SoC Digital Audio Interface (DAI) driver\n+ *\n+ */\n+\n+#ifndef __SOUND_SOC_FSL_MPC52xx_PSC_AC97_H__\n+#define __SOUND_SOC_FSL_MPC52xx_PSC_AC97_H__\n+\n+extern struct snd_soc_dai psc_ac97_dai[];\n+\n+#define MPC5200_AC97_NORMAL 0\n+#define MPC5200_AC97_SPDIF 1\n+\n+#endif /* __SOUND_SOC_FSL_MPC52xx_PSC_AC97_H__ */\n", "prefixes": [ "V5", "3/5" ] }