Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/27570/?format=api
{ "id": 27570, "url": "http://patchwork.ozlabs.org/api/patches/27570/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20090523231301.17919.88294.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": "<20090523231301.17919.88294.stgit@terra>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20090523231301.17919.88294.stgit@terra/", "date": "2009-05-23T23:13:01", "name": "[V2,3/9] Rename the PSC functions to DMA", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7c63599a0af4b18ff9bc1450d7be44ec2554a4a1", "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/20090523231301.17919.88294.stgit@terra/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/27570/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/27570/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 63FBBB6F44\n\tfor <patchwork-incoming@bilbo.ozlabs.org>;\n\tSun, 24 May 2009 09:18:04 +1000 (EST)", "by ozlabs.org (Postfix)\n\tid 578CADEB84; Sun, 24 May 2009 09:15:06 +1000 (EST)", "from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 542DBDEB83\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 24 May 2009 09:15:06 +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 CD808DE136\n\tfor <linuxppc-dev@ozlabs.org>; Sun, 24 May 2009 09:13:02 +1000 (EST)", "by yx-out-2324.google.com with SMTP id 8so1216733yxb.39\n\tfor <linuxppc-dev@ozlabs.org>; Sat, 23 May 2009 16:13:02 -0700 (PDT)", "by 10.90.89.8 with SMTP id m8mr4658345agb.23.1243120382299;\n\tSat, 23 May 2009 16:13:02 -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\t18sm10865874agb.10.2009.05.23.16.13.01\n\t(version=TLSv1/SSLv3 cipher=RC4-MD5);\n\tSat, 23 May 2009 16:13:01 -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 1M80Oj-0004hH-Kv; Sat, 23 May 2009 19:13:01 -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=aXkEwkKF+7olshEzfLoDS0++awlNvwAwg4EJcw9lkLA=;\n\tb=KMaoEEh9Pl7ODLyFBerYeLiXUCvTljwda7vvsACQg39vdM0xgRFwDw/46UmJ+FFIh5\n\t84uOVFVRv0LCAXJOzwk23mXX9EZGSUADY5dE4DhhmEtmK+zK7dvnDIf3zkZ8vq53cOTO\n\tXWZn4oeHwRlyhc29MEe+tFHCHRwx3W5reV6e0=", "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=TNpgxkZusy6XyA05DCpJ0r7odZL5PuCd/BPtvMk1BC+87y6wxSxzXlPalbqbVoCt8g\n\txUIhSsevhT+Pg/200YoqlSfD2c3Iwz5fMzwp16jsf4PY+9aMxDkcK1kj/euLysfZuVQh\n\t8LsDRTkEJwn+K9egwjjfWWkXpAfjP543RQAZM=", "Subject": "[PATCH V2 3/9] Rename the PSC functions to DMA", "To": "grant.likely@secretlab.ca, linuxppc-dev@ozlabs.org,\n\talsa-devel@alsa-project.org, broonie@sirena.org.uk", "From": "Jon Smirl <jonsmirl@gmail.com>", "Date": "Sat, 23 May 2009 19:13:01 -0400", "Message-ID": "<20090523231301.17919.88294.stgit@terra>", "In-Reply-To": "<20090523231148.17919.46103.stgit@terra>", "References": "<20090523231148.17919.46103.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": "Rename the functions in the mpc5200 DMA file from i2s based names to dma ones to reflect the file they are in.\n\nSigned-off-by: Jon Smirl <jonsmirl@gmail.com>\n---\n sound/soc/fsl/mpc5200_dma.c | 194 ++++++++++++++++++++-------------------\n sound/soc/fsl/mpc5200_dma.h | 26 +++--\n sound/soc/fsl/mpc5200_psc_i2s.c | 160 ++++++++++++++++----------------\n 3 files changed, 190 insertions(+), 190 deletions(-)", "diff": "diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c\nindex 4bae8d6..6850392 100644\n--- a/sound/soc/fsl/mpc5200_dma.c\n+++ b/sound/soc/fsl/mpc5200_dma.c\n@@ -34,21 +34,21 @@ MODULE_LICENSE(\"GPL\");\n /*\n * Interrupt handlers\n */\n-static irqreturn_t psc_i2s_status_irq(int irq, void *_psc_i2s)\n+static irqreturn_t psc_dma_status_irq(int irq, void *_psc_dma)\n {\n-\tstruct psc_i2s *psc_i2s = _psc_i2s;\n-\tstruct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;\n+\tstruct psc_dma *psc_dma = _psc_dma;\n+\tstruct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;\n \tu16 isr;\n \n \tisr = in_be16(®s->mpc52xx_psc_isr);\n \n \t/* Playback underrun error */\n-\tif (psc_i2s->playback.active && (isr & MPC52xx_PSC_IMR_TXEMP))\n-\t\tpsc_i2s->stats.underrun_count++;\n+\tif (psc_dma->playback.active && (isr & MPC52xx_PSC_IMR_TXEMP))\n+\t\tpsc_dma->stats.underrun_count++;\n \n \t/* Capture overrun error */\n-\tif (psc_i2s->capture.active && (isr & MPC52xx_PSC_IMR_ORERR))\n-\t\tpsc_i2s->stats.overrun_count++;\n+\tif (psc_dma->capture.active && (isr & MPC52xx_PSC_IMR_ORERR))\n+\t\tpsc_dma->stats.overrun_count++;\n \n \tout_8(®s->command, 4 << 4);\t/* reset the error status */\n \n@@ -56,7 +56,7 @@ static irqreturn_t psc_i2s_status_irq(int irq, void *_psc_i2s)\n }\n \n /**\n- * psc_i2s_bcom_enqueue_next_buffer - Enqueue another audio buffer\n+ * psc_dma_bcom_enqueue_next_buffer - Enqueue another audio buffer\n * @s: pointer to stream private data structure\n *\n * Enqueues another audio period buffer into the bestcomm queue.\n@@ -65,7 +65,7 @@ static irqreturn_t psc_i2s_status_irq(int irq, void *_psc_i2s)\n * the queue. Otherwise the enqueue will fail and the audio ring buffer\n * will get out of sync\n */\n-static void psc_i2s_bcom_enqueue_next_buffer(struct psc_i2s_stream *s)\n+static void psc_dma_bcom_enqueue_next_buffer(struct psc_dma_stream *s)\n {\n \tstruct bcom_bd *bd;\n \n@@ -82,9 +82,9 @@ static void psc_i2s_bcom_enqueue_next_buffer(struct psc_i2s_stream *s)\n }\n \n /* Bestcomm DMA irq handler */\n-static irqreturn_t psc_i2s_bcom_irq(int irq, void *_psc_i2s_stream)\n+static irqreturn_t psc_dma_bcom_irq(int irq, void *_psc_dma_stream)\n {\n-\tstruct psc_i2s_stream *s = _psc_i2s_stream;\n+\tstruct psc_dma_stream *s = _psc_dma_stream;\n \n \t/* For each finished period, dequeue the completed period buffer\n \t * and enqueue a new one in it's place. */\n@@ -93,7 +93,7 @@ static irqreturn_t psc_i2s_bcom_irq(int irq, void *_psc_i2s_stream)\n \t\ts->period_current_pt += s->period_bytes;\n \t\tif (s->period_current_pt >= s->period_end)\n \t\t\ts->period_current_pt = s->period_start;\n-\t\tpsc_i2s_bcom_enqueue_next_buffer(s);\n+\t\tpsc_dma_bcom_enqueue_next_buffer(s);\n \t\tbcom_enable(s->bcom_task);\n \t}\n \n@@ -106,39 +106,39 @@ static irqreturn_t psc_i2s_bcom_irq(int irq, void *_psc_i2s_stream)\n }\n \n /**\n- * psc_i2s_startup: create a new substream\n+ * psc_dma_startup: create a new substream\n *\n * This is the first function called when a stream is opened.\n *\n * If this is the first stream open, then grab the IRQ and program most of\n * the PSC registers.\n */\n-int psc_i2s_startup(struct snd_pcm_substream *substream,\n+int psc_dma_startup(struct snd_pcm_substream *substream,\n \t\t\t struct snd_soc_dai *dai)\n {\n \tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n-\tstruct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;\n+\tstruct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data;\n \tint rc;\n \n-\tdev_dbg(psc_i2s->dev, \"psc_i2s_startup(substream=%p)\\n\", substream);\n+\tdev_dbg(psc_dma->dev, \"psc_dma_startup(substream=%p)\\n\", substream);\n \n-\tif (!psc_i2s->playback.active &&\n-\t !psc_i2s->capture.active) {\n+\tif (!psc_dma->playback.active &&\n+\t !psc_dma->capture.active) {\n \t\t/* Setup the IRQs */\n-\t\trc = request_irq(psc_i2s->irq, &psc_i2s_status_irq, IRQF_SHARED,\n-\t\t\t\t \"psc-i2s-status\", psc_i2s);\n-\t\trc |= request_irq(psc_i2s->capture.irq,\n-\t\t\t\t &psc_i2s_bcom_irq, IRQF_SHARED,\n-\t\t\t\t \"psc-i2s-capture\", &psc_i2s->capture);\n-\t\trc |= request_irq(psc_i2s->playback.irq,\n-\t\t\t\t &psc_i2s_bcom_irq, IRQF_SHARED,\n-\t\t\t\t \"psc-i2s-playback\", &psc_i2s->playback);\n+\t\trc = request_irq(psc_dma->irq, &psc_dma_status_irq, IRQF_SHARED,\n+\t\t\t\t \"psc-dma-status\", psc_dma);\n+\t\trc |= request_irq(psc_dma->capture.irq,\n+\t\t\t\t &psc_dma_bcom_irq, IRQF_SHARED,\n+\t\t\t\t \"psc-dma-capture\", &psc_dma->capture);\n+\t\trc |= request_irq(psc_dma->playback.irq,\n+\t\t\t\t &psc_dma_bcom_irq, IRQF_SHARED,\n+\t\t\t\t \"psc-dma-playback\", &psc_dma->playback);\n \t\tif (rc) {\n-\t\t\tfree_irq(psc_i2s->irq, psc_i2s);\n-\t\t\tfree_irq(psc_i2s->capture.irq,\n-\t\t\t\t &psc_i2s->capture);\n-\t\t\tfree_irq(psc_i2s->playback.irq,\n-\t\t\t\t &psc_i2s->playback);\n+\t\t\tfree_irq(psc_dma->irq, psc_dma);\n+\t\t\tfree_irq(psc_dma->capture.irq,\n+\t\t\t\t &psc_dma->capture);\n+\t\t\tfree_irq(psc_dma->playback.irq,\n+\t\t\t\t &psc_dma->playback);\n \t\t\treturn -ENODEV;\n \t\t}\n \t}\n@@ -146,7 +146,7 @@ int psc_i2s_startup(struct snd_pcm_substream *substream,\n \treturn 0;\n }\n \n-int psc_i2s_hw_free(struct snd_pcm_substream *substream,\n+int psc_dma_hw_free(struct snd_pcm_substream *substream,\n \t\t\t struct snd_soc_dai *dai)\n {\n \tsnd_pcm_set_runtime_buffer(substream, NULL);\n@@ -154,29 +154,29 @@ int psc_i2s_hw_free(struct snd_pcm_substream *substream,\n }\n \n /**\n- * psc_i2s_trigger: start and stop the DMA transfer.\n+ * psc_dma_trigger: start and stop the DMA transfer.\n *\n * This function is called by ALSA to start, stop, pause, and resume the DMA\n * transfer of data.\n */\n-int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,\n+int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd,\n \t\t\t struct snd_soc_dai *dai)\n {\n \tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n-\tstruct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;\n+\tstruct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data;\n \tstruct snd_pcm_runtime *runtime = substream->runtime;\n-\tstruct psc_i2s_stream *s;\n-\tstruct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;\n+\tstruct psc_dma_stream *s;\n+\tstruct mpc52xx_psc __iomem *regs = psc_dma->psc_regs;\n \tu16 imr;\n \tu8 psc_cmd;\n \tunsigned long flags;\n \n \tif (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)\n-\t\ts = &psc_i2s->capture;\n+\t\ts = &psc_dma->capture;\n \telse\n-\t\ts = &psc_i2s->playback;\n+\t\ts = &psc_dma->playback;\n \n-\tdev_dbg(psc_i2s->dev, \"psc_i2s_trigger(substream=%p, cmd=%i)\"\n+\tdev_dbg(psc_dma->dev, \"psc_dma_trigger(substream=%p, cmd=%i)\"\n \t\t\" stream_id=%i\\n\",\n \t\tsubstream, cmd, substream->pstr->stream);\n \n@@ -207,14 +207,14 @@ int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,\n \t\telse\n \t\t\tbcom_gen_bd_tx_reset(s->bcom_task);\n \t\twhile (!bcom_queue_full(s->bcom_task))\n-\t\t\tpsc_i2s_bcom_enqueue_next_buffer(s);\n+\t\t\tpsc_dma_bcom_enqueue_next_buffer(s);\n \t\tbcom_enable(s->bcom_task);\n \n-\t\t/* Due to errata in the i2s mode; need to line up enabling\n+\t\t/* Due to errata in the dma mode; need to line up enabling\n \t\t * the transmitter with a transition on the frame sync\n \t\t * line */\n \n-\t\tspin_lock_irqsave(&psc_i2s->lock, flags);\n+\t\tspin_lock_irqsave(&psc_dma->lock, flags);\n \t\t/* first make sure it is low */\n \t\twhile ((in_8(®s->ipcr_acr.ipcr) & 0x80) != 0)\n \t\t\t;\n@@ -228,7 +228,7 @@ int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,\n \t\tif (substream->pstr->stream == SNDRV_PCM_STREAM_PLAYBACK)\n \t\t\tpsc_cmd |= MPC52xx_PSC_TX_ENABLE;\n \t\tout_8(®s->command, psc_cmd);\n-\t\tspin_unlock_irqrestore(&psc_i2s->lock, flags);\n+\t\tspin_unlock_irqrestore(&psc_dma->lock, flags);\n \n \t\tbreak;\n \n@@ -236,7 +236,7 @@ int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,\n \t\t/* Turn off the PSC */\n \t\ts->active = 0;\n \t\tif (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE) {\n-\t\t\tif (!psc_i2s->playback.active) {\n+\t\t\tif (!psc_dma->playback.active) {\n \t\t\t\tout_8(®s->command, 2 << 4);\t/* reset rx */\n \t\t\t\tout_8(®s->command, 3 << 4);\t/* reset tx */\n \t\t\t\tout_8(®s->command, 4 << 4);\t/* reset err */\n@@ -244,7 +244,7 @@ int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,\n \t\t} else {\n \t\t\tout_8(®s->command, 3 << 4);\t/* reset tx */\n \t\t\tout_8(®s->command, 4 << 4);\t/* reset err */\n-\t\t\tif (!psc_i2s->capture.active)\n+\t\t\tif (!psc_dma->capture.active)\n \t\t\t\tout_8(®s->command, 2 << 4);\t/* reset rx */\n \t\t}\n \n@@ -255,15 +255,15 @@ int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,\n \t\tbreak;\n \n \tdefault:\n-\t\tdev_dbg(psc_i2s->dev, \"invalid command\\n\");\n+\t\tdev_dbg(psc_dma->dev, \"invalid command\\n\");\n \t\treturn -EINVAL;\n \t}\n \n \t/* Update interrupt enable settings */\n \timr = 0;\n-\tif (psc_i2s->playback.active)\n+\tif (psc_dma->playback.active)\n \t\timr |= MPC52xx_PSC_IMR_TXEMP;\n-\tif (psc_i2s->capture.active)\n+\tif (psc_dma->capture.active)\n \t\timr |= MPC52xx_PSC_IMR_ORERR;\n \tout_be16(®s->isr_imr.imr, imr);\n \n@@ -271,36 +271,36 @@ int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,\n }\n \n /**\n- * psc_i2s_shutdown: shutdown the data transfer on a stream\n+ * psc_dma_shutdown: shutdown the data transfer on a stream\n *\n * Shutdown the PSC if there are no other substreams open.\n */\n-void psc_i2s_shutdown(struct snd_pcm_substream *substream,\n+void psc_dma_shutdown(struct snd_pcm_substream *substream,\n \t\t\t struct snd_soc_dai *dai)\n {\n \tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n-\tstruct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;\n+\tstruct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data;\n \n-\tdev_dbg(psc_i2s->dev, \"psc_i2s_shutdown(substream=%p)\\n\", substream);\n+\tdev_dbg(psc_dma->dev, \"psc_dma_shutdown(substream=%p)\\n\", substream);\n \n \t/*\n \t * If this is the last active substream, disable the PSC and release\n \t * the IRQ.\n \t */\n-\tif (!psc_i2s->playback.active &&\n-\t !psc_i2s->capture.active) {\n+\tif (!psc_dma->playback.active &&\n+\t !psc_dma->capture.active) {\n \n \t\t/* Disable all interrupts and reset the PSC */\n-\t\tout_be16(&psc_i2s->psc_regs->isr_imr.imr, 0);\n-\t\tout_8(&psc_i2s->psc_regs->command, 3 << 4); /* reset tx */\n-\t\tout_8(&psc_i2s->psc_regs->command, 2 << 4); /* reset rx */\n-\t\tout_8(&psc_i2s->psc_regs->command, 1 << 4); /* reset mode */\n-\t\tout_8(&psc_i2s->psc_regs->command, 4 << 4); /* reset error */\n+\t\tout_be16(&psc_dma->psc_regs->isr_imr.imr, 0);\n+\t\tout_8(&psc_dma->psc_regs->command, 3 << 4); /* reset tx */\n+\t\tout_8(&psc_dma->psc_regs->command, 2 << 4); /* reset rx */\n+\t\tout_8(&psc_dma->psc_regs->command, 1 << 4); /* reset mode */\n+\t\tout_8(&psc_dma->psc_regs->command, 4 << 4); /* reset error */\n \n \t\t/* Release irqs */\n-\t\tfree_irq(psc_i2s->irq, psc_i2s);\n-\t\tfree_irq(psc_i2s->capture.irq, &psc_i2s->capture);\n-\t\tfree_irq(psc_i2s->playback.irq, &psc_i2s->playback);\n+\t\tfree_irq(psc_dma->irq, psc_dma);\n+\t\tfree_irq(psc_dma->capture.irq, &psc_dma->capture);\n+\t\tfree_irq(psc_dma->playback.irq, &psc_dma->playback);\n \t}\n }\n \n@@ -312,7 +312,7 @@ void psc_i2s_shutdown(struct snd_pcm_substream *substream,\n * interaction with the attached codec\n */\n \n-static const struct snd_pcm_hardware psc_i2s_pcm_hardware = {\n+static const struct snd_pcm_hardware psc_dma_pcm_hardware = {\n \t.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |\n \t\tSNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |\n \t\tSNDRV_PCM_INFO_BATCH,\n@@ -330,80 +330,80 @@ static const struct snd_pcm_hardware psc_i2s_pcm_hardware = {\n \t.fifo_size\t\t= 0,\n };\n \n-static int psc_i2s_pcm_open(struct snd_pcm_substream *substream)\n+static int psc_dma_pcm_open(struct snd_pcm_substream *substream)\n {\n \tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n-\tstruct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;\n-\tstruct psc_i2s_stream *s;\n+\tstruct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data;\n+\tstruct psc_dma_stream *s;\n \n-\tdev_dbg(psc_i2s->dev, \"psc_i2s_pcm_open(substream=%p)\\n\", substream);\n+\tdev_dbg(psc_dma->dev, \"psc_dma_pcm_open(substream=%p)\\n\", substream);\n \n \tif (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)\n-\t\ts = &psc_i2s->capture;\n+\t\ts = &psc_dma->capture;\n \telse\n-\t\ts = &psc_i2s->playback;\n+\t\ts = &psc_dma->playback;\n \n-\tsnd_soc_set_runtime_hwparams(substream, &psc_i2s_pcm_hardware);\n+\tsnd_soc_set_runtime_hwparams(substream, &psc_dma_pcm_hardware);\n \n \ts->stream = substream;\n \treturn 0;\n }\n \n-static int psc_i2s_pcm_close(struct snd_pcm_substream *substream)\n+static int psc_dma_pcm_close(struct snd_pcm_substream *substream)\n {\n \tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n-\tstruct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;\n-\tstruct psc_i2s_stream *s;\n+\tstruct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data;\n+\tstruct psc_dma_stream *s;\n \n-\tdev_dbg(psc_i2s->dev, \"psc_i2s_pcm_close(substream=%p)\\n\", substream);\n+\tdev_dbg(psc_dma->dev, \"psc_dma_pcm_close(substream=%p)\\n\", substream);\n \n \tif (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)\n-\t\ts = &psc_i2s->capture;\n+\t\ts = &psc_dma->capture;\n \telse\n-\t\ts = &psc_i2s->playback;\n+\t\ts = &psc_dma->playback;\n \n \ts->stream = NULL;\n \treturn 0;\n }\n \n static snd_pcm_uframes_t\n-psc_i2s_pcm_pointer(struct snd_pcm_substream *substream)\n+psc_dma_pcm_pointer(struct snd_pcm_substream *substream)\n {\n \tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n-\tstruct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;\n-\tstruct psc_i2s_stream *s;\n+\tstruct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data;\n+\tstruct psc_dma_stream *s;\n \tdma_addr_t count;\n \n \tif (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)\n-\t\ts = &psc_i2s->capture;\n+\t\ts = &psc_dma->capture;\n \telse\n-\t\ts = &psc_i2s->playback;\n+\t\ts = &psc_dma->playback;\n \n \tcount = s->period_current_pt - s->period_start;\n \n \treturn bytes_to_frames(substream->runtime, count);\n }\n \n-static struct snd_pcm_ops psc_i2s_pcm_ops = {\n-\t.open\t\t= psc_i2s_pcm_open,\n-\t.close\t\t= psc_i2s_pcm_close,\n+static struct snd_pcm_ops psc_dma_pcm_ops = {\n+\t.open\t\t= psc_dma_pcm_open,\n+\t.close\t\t= psc_dma_pcm_close,\n \t.ioctl\t\t= snd_pcm_lib_ioctl,\n-\t.pointer\t= psc_i2s_pcm_pointer,\n+\t.pointer\t= psc_dma_pcm_pointer,\n };\n \n-static u64 psc_i2s_pcm_dmamask = 0xffffffff;\n-static int psc_i2s_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,\n+static u64 psc_dma_pcm_dmamask = 0xffffffff;\n+static int psc_dma_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,\n \t\t\t struct snd_pcm *pcm)\n {\n \tstruct snd_soc_pcm_runtime *rtd = pcm->private_data;\n-\tsize_t size = psc_i2s_pcm_hardware.buffer_bytes_max;\n+\tsize_t size = psc_dma_pcm_hardware.buffer_bytes_max;\n \tint rc = 0;\n \n-\tdev_dbg(rtd->socdev->dev, \"psc_i2s_pcm_new(card=%p, dai=%p, pcm=%p)\\n\",\n+\tdev_dbg(rtd->socdev->dev, \"psc_dma_pcm_new(card=%p, dai=%p, pcm=%p)\\n\",\n \t\tcard, dai, pcm);\n \n \tif (!card->dev->dma_mask)\n-\t\tcard->dev->dma_mask = &psc_i2s_pcm_dmamask;\n+\t\tcard->dev->dma_mask = &psc_dma_pcm_dmamask;\n \tif (!card->dev->coherent_dma_mask)\n \t\tcard->dev->coherent_dma_mask = 0xffffffff;\n \n@@ -431,13 +431,13 @@ static int psc_i2s_pcm_new(struct snd_card *card, struct snd_soc_dai *dai,\n \treturn -ENOMEM;\n }\n \n-static void psc_i2s_pcm_free(struct snd_pcm *pcm)\n+static void psc_dma_pcm_free(struct snd_pcm *pcm)\n {\n \tstruct snd_soc_pcm_runtime *rtd = pcm->private_data;\n \tstruct snd_pcm_substream *substream;\n \tint stream;\n \n-\tdev_dbg(rtd->socdev->dev, \"psc_i2s_pcm_free(pcm=%p)\\n\", pcm);\n+\tdev_dbg(rtd->socdev->dev, \"psc_dma_pcm_free(pcm=%p)\\n\", pcm);\n \n \tfor (stream = 0; stream < 2; stream++) {\n \t\tsubstream = pcm->streams[stream].substream;\n@@ -449,10 +449,10 @@ static void psc_i2s_pcm_free(struct snd_pcm *pcm)\n \t}\n }\n \n-struct snd_soc_platform psc_i2s_pcm_soc_platform = {\n+struct snd_soc_platform psc_dma_pcm_soc_platform = {\n \t.name\t\t= \"mpc5200-psc-audio\",\n-\t.pcm_ops\t= &psc_i2s_pcm_ops,\n-\t.pcm_new\t= &psc_i2s_pcm_new,\n-\t.pcm_free\t= &psc_i2s_pcm_free,\n+\t.pcm_ops\t= &psc_dma_pcm_ops,\n+\t.pcm_new\t= &psc_dma_pcm_new,\n+\t.pcm_free\t= &psc_dma_pcm_free,\n };\n \ndiff --git a/sound/soc/fsl/mpc5200_dma.h b/sound/soc/fsl/mpc5200_dma.h\nindex 9a19e8a..a33232c 100644\n--- a/sound/soc/fsl/mpc5200_dma.h\n+++ b/sound/soc/fsl/mpc5200_dma.h\n@@ -6,9 +6,9 @@\n #define __SOUND_SOC_FSL_MPC5200_DMA_H__\n \n /**\n- * psc_i2s_stream - Data specific to a single stream (playback or capture)\n+ * psc_dma_stream - Data specific to a single stream (playback or capture)\n * @active:\t\tflag indicating if the stream is active\n- * @psc_i2s:\t\tpointer back to parent psc_i2s data structure\n+ * @psc_dma:\t\tpointer back to parent psc_dma data structure\n * @bcom_task:\t\tbestcomm task structure\n * @irq:\t\tirq number for bestcomm task\n * @period_start:\tphysical address of start of DMA region\n@@ -16,9 +16,9 @@\n * @period_next_pt:\tphysical address of next DMA buffer to enqueue\n * @period_bytes:\tsize of DMA period in bytes\n */\n-struct psc_i2s_stream {\n+struct psc_dma_stream {\n \tint active;\n-\tstruct psc_i2s *psc_i2s;\n+\tstruct psc_dma *psc_dma;\n \tstruct bcom_task *bcom_task;\n \tint irq;\n \tstruct snd_pcm_substream *stream;\n@@ -30,7 +30,7 @@ struct psc_i2s_stream {\n };\n \n /**\n- * psc_i2s - Private driver data\n+ * psc_dma - Private driver data\n * @name: short name for this device (\"PSC0\", \"PSC1\", etc)\n * @psc_regs: pointer to the PSC's registers\n * @fifo_regs: pointer to the PSC's FIFO registers\n@@ -42,7 +42,7 @@ struct psc_i2s_stream {\n * @playback: Playback stream context data\n * @capture: Capture stream context data\n */\n-struct psc_i2s {\n+struct psc_dma {\n \tchar name[32];\n \tstruct mpc52xx_psc __iomem *psc_regs;\n \tstruct mpc52xx_psc_fifo __iomem *fifo_regs;\n@@ -53,8 +53,8 @@ struct psc_i2s {\n \tu32 sicr;\n \n \t/* per-stream data */\n-\tstruct psc_i2s_stream playback;\n-\tstruct psc_i2s_stream capture;\n+\tstruct psc_dma_stream playback;\n+\tstruct psc_dma_stream capture;\n \n \t/* Statistics */\n \tstruct {\n@@ -64,18 +64,18 @@ struct psc_i2s {\n };\n \n \n-int psc_i2s_startup(struct snd_pcm_substream *substream,\n+int psc_dma_startup(struct snd_pcm_substream *substream,\n \t\t\t struct snd_soc_dai *dai);\n \n-int psc_i2s_hw_free(struct snd_pcm_substream *substream,\n+int psc_dma_hw_free(struct snd_pcm_substream *substream,\n \t\t\t struct snd_soc_dai *dai);\n \n-void psc_i2s_shutdown(struct snd_pcm_substream *substream,\n+void psc_dma_shutdown(struct snd_pcm_substream *substream,\n \t\t\t struct snd_soc_dai *dai);\n \n-int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd,\n+int psc_dma_trigger(struct snd_pcm_substream *substream, int cmd,\n \t\t\t struct snd_soc_dai *dai);\n \n-extern struct snd_soc_platform psc_i2s_pcm_soc_platform;\n+extern struct snd_soc_platform psc_dma_pcm_soc_platform;\n \n #endif /* __SOUND_SOC_FSL_MPC5200_DMA_H__ */\ndiff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c\nindex 8974b53..12a7917 100644\n--- a/sound/soc/fsl/mpc5200_psc_i2s.c\n+++ b/sound/soc/fsl/mpc5200_psc_i2s.c\n@@ -54,10 +54,10 @@ static int psc_i2s_hw_params(struct snd_pcm_substream *substream,\n \t\t\t\t struct snd_soc_dai *dai)\n {\n \tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n-\tstruct psc_i2s *psc_i2s = rtd->dai->cpu_dai->private_data;\n+\tstruct psc_dma *psc_dma = rtd->dai->cpu_dai->private_data;\n \tu32 mode;\n \n-\tdev_dbg(psc_i2s->dev, \"%s(substream=%p) p_size=%i p_bytes=%i\"\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\\n\",\n \t\t__func__, substream, params_period_size(params),\n \t\tparams_period_bytes(params), params_periods(params),\n@@ -77,10 +77,10 @@ static int psc_i2s_hw_params(struct snd_pcm_substream *substream,\n \t\tmode = MPC52xx_PSC_SICR_SIM_CODEC_32;\n \t\tbreak;\n \tdefault:\n-\t\tdev_dbg(psc_i2s->dev, \"invalid format\\n\");\n+\t\tdev_dbg(psc_dma->dev, \"invalid format\\n\");\n \t\treturn -EINVAL;\n \t}\n-\tout_be32(&psc_i2s->psc_regs->sicr, psc_i2s->sicr | mode);\n+\tout_be32(&psc_dma->psc_regs->sicr, psc_dma->sicr | mode);\n \n \tsnd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);\n \n@@ -104,8 +104,8 @@ static int psc_i2s_hw_params(struct snd_pcm_substream *substream,\n static int psc_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,\n \t\t\t int clk_id, unsigned int freq, int dir)\n {\n-\tstruct psc_i2s *psc_i2s = cpu_dai->private_data;\n-\tdev_dbg(psc_i2s->dev, \"psc_i2s_set_sysclk(cpu_dai=%p, dir=%i)\\n\",\n+\tstruct psc_dma *psc_dma = cpu_dai->private_data;\n+\tdev_dbg(psc_dma->dev, \"psc_i2s_set_sysclk(cpu_dai=%p, dir=%i)\\n\",\n \t\t\t\tcpu_dai, dir);\n \treturn (dir == SND_SOC_CLOCK_IN) ? 0 : -EINVAL;\n }\n@@ -123,8 +123,8 @@ static int psc_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,\n */\n static int psc_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int format)\n {\n-\tstruct psc_i2s *psc_i2s = cpu_dai->private_data;\n-\tdev_dbg(psc_i2s->dev, \"psc_i2s_set_fmt(cpu_dai=%p, format=%i)\\n\",\n+\tstruct psc_dma *psc_dma = cpu_dai->private_data;\n+\tdev_dbg(psc_dma->dev, \"psc_i2s_set_fmt(cpu_dai=%p, format=%i)\\n\",\n \t\t\t\tcpu_dai, format);\n \treturn (format == SND_SOC_DAIFMT_I2S) ? 0 : -EINVAL;\n }\n@@ -140,11 +140,11 @@ static int psc_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int format)\n * psc_i2s_dai_template: template CPU Digital Audio Interface\n */\n static struct snd_soc_dai_ops psc_i2s_dai_ops = {\n-\t.startup\t= psc_i2s_startup,\n+\t.startup\t= psc_dma_startup,\n \t.hw_params\t= psc_i2s_hw_params,\n-\t.hw_free\t= psc_i2s_hw_free,\n-\t.shutdown\t= psc_i2s_shutdown,\n-\t.trigger\t= psc_i2s_trigger,\n+\t.hw_free\t= psc_dma_hw_free,\n+\t.shutdown\t= psc_dma_shutdown,\n+\t.trigger\t= psc_dma_trigger,\n \t.set_sysclk\t= psc_i2s_set_sysclk,\n \t.set_fmt\t= psc_i2s_set_fmt,\n };\n@@ -172,24 +172,24 @@ static struct snd_soc_dai psc_i2s_dai_template = {\n static ssize_t psc_i2s_status_show(struct device *dev,\n \t\t\t struct device_attribute *attr, char *buf)\n {\n-\tstruct psc_i2s *psc_i2s = dev_get_drvdata(dev);\n+\tstruct psc_dma *psc_dma = dev_get_drvdata(dev);\n \n \treturn sprintf(buf, \"status=%.4x sicr=%.8x rfnum=%i rfstat=0x%.4x \"\n \t\t\t\"tfnum=%i tfstat=0x%.4x\\n\",\n-\t\t\tin_be16(&psc_i2s->psc_regs->sr_csr.status),\n-\t\t\tin_be32(&psc_i2s->psc_regs->sicr),\n-\t\t\tin_be16(&psc_i2s->fifo_regs->rfnum) & 0x1ff,\n-\t\t\tin_be16(&psc_i2s->fifo_regs->rfstat),\n-\t\t\tin_be16(&psc_i2s->fifo_regs->tfnum) & 0x1ff,\n-\t\t\tin_be16(&psc_i2s->fifo_regs->tfstat));\n+\t\t\tin_be16(&psc_dma->psc_regs->sr_csr.status),\n+\t\t\tin_be32(&psc_dma->psc_regs->sicr),\n+\t\t\tin_be16(&psc_dma->fifo_regs->rfnum) & 0x1ff,\n+\t\t\tin_be16(&psc_dma->fifo_regs->rfstat),\n+\t\t\tin_be16(&psc_dma->fifo_regs->tfnum) & 0x1ff,\n+\t\t\tin_be16(&psc_dma->fifo_regs->tfstat));\n }\n \n-static int *psc_i2s_get_stat_attr(struct psc_i2s *psc_i2s, const char *name)\n+static int *psc_i2s_get_stat_attr(struct psc_dma *psc_dma, const char *name)\n {\n \tif (strcmp(name, \"playback_underrun\") == 0)\n-\t\treturn &psc_i2s->stats.underrun_count;\n+\t\treturn &psc_dma->stats.underrun_count;\n \tif (strcmp(name, \"capture_overrun\") == 0)\n-\t\treturn &psc_i2s->stats.overrun_count;\n+\t\treturn &psc_dma->stats.overrun_count;\n \n \treturn NULL;\n }\n@@ -197,10 +197,10 @@ static int *psc_i2s_get_stat_attr(struct psc_i2s *psc_i2s, const char *name)\n static ssize_t psc_i2s_stat_show(struct device *dev,\n \t\t\t\t struct device_attribute *attr, char *buf)\n {\n-\tstruct psc_i2s *psc_i2s = dev_get_drvdata(dev);\n+\tstruct psc_dma *psc_dma = dev_get_drvdata(dev);\n \tint *attrib;\n \n-\tattrib = psc_i2s_get_stat_attr(psc_i2s, attr->attr.name);\n+\tattrib = psc_i2s_get_stat_attr(psc_dma, attr->attr.name);\n \tif (!attrib)\n \t\treturn 0;\n \n@@ -212,10 +212,10 @@ static ssize_t psc_i2s_stat_store(struct device *dev,\n \t\t\t\t const char *buf,\n \t\t\t\t size_t count)\n {\n-\tstruct psc_i2s *psc_i2s = dev_get_drvdata(dev);\n+\tstruct psc_dma *psc_dma = dev_get_drvdata(dev);\n \tint *attrib;\n \n-\tattrib = psc_i2s_get_stat_attr(psc_i2s, attr->attr.name);\n+\tattrib = psc_i2s_get_stat_attr(psc_dma, attr->attr.name);\n \tif (!attrib)\n \t\treturn 0;\n \n@@ -238,7 +238,7 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,\n \t\t\t\t const struct of_device_id *match)\n {\n \tphys_addr_t fifo;\n-\tstruct psc_i2s *psc_i2s;\n+\tstruct psc_dma *psc_dma;\n \tstruct resource res;\n \tint size, psc_id, irq, rc;\n \tconst __be32 *prop;\n@@ -265,56 +265,56 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,\n \t}\n \n \t/* Allocate and initialize the driver private data */\n-\tpsc_i2s = kzalloc(sizeof *psc_i2s, GFP_KERNEL);\n-\tif (!psc_i2s) {\n+\tpsc_dma = kzalloc(sizeof *psc_dma, GFP_KERNEL);\n+\tif (!psc_dma) {\n \t\tiounmap(regs);\n \t\treturn -ENOMEM;\n \t}\n-\tspin_lock_init(&psc_i2s->lock);\n-\tpsc_i2s->irq = irq;\n-\tpsc_i2s->psc_regs = regs;\n-\tpsc_i2s->fifo_regs = regs + sizeof *psc_i2s->psc_regs;\n-\tpsc_i2s->dev = &op->dev;\n-\tpsc_i2s->playback.psc_i2s = psc_i2s;\n-\tpsc_i2s->capture.psc_i2s = psc_i2s;\n-\tsnprintf(psc_i2s->name, sizeof psc_i2s->name, \"PSC%u\", psc_id+1);\n+\tspin_lock_init(&psc_dma->lock);\n+\tpsc_dma->irq = irq;\n+\tpsc_dma->psc_regs = regs;\n+\tpsc_dma->fifo_regs = regs + sizeof *psc_dma->psc_regs;\n+\tpsc_dma->dev = &op->dev;\n+\tpsc_dma->playback.psc_dma = psc_dma;\n+\tpsc_dma->capture.psc_dma = psc_dma;\n+\tsnprintf(psc_dma->name, sizeof psc_dma->name, \"PSC%u\", psc_id+1);\n \n \t/* Fill out the CPU DAI structure */\n-\tmemcpy(&psc_i2s->dai, &psc_i2s_dai_template, sizeof psc_i2s->dai);\n-\tpsc_i2s->dai.private_data = psc_i2s;\n-\tpsc_i2s->dai.name = psc_i2s->name;\n-\tpsc_i2s->dai.id = psc_id;\n+\tmemcpy(&psc_dma->dai, &psc_i2s_dai_template, sizeof psc_dma->dai);\n+\tpsc_dma->dai.private_data = psc_dma;\n+\tpsc_dma->dai.name = psc_dma->name;\n+\tpsc_dma->dai.id = psc_id;\n \n \t/* Find the address of the fifo data registers and setup the\n \t * DMA tasks */\n \tfifo = res.start + offsetof(struct mpc52xx_psc, buffer.buffer_32);\n-\tpsc_i2s->capture.bcom_task =\n+\tpsc_dma->capture.bcom_task =\n \t\tbcom_psc_gen_bd_rx_init(psc_id, 10, fifo, 512);\n-\tpsc_i2s->playback.bcom_task =\n+\tpsc_dma->playback.bcom_task =\n \t\tbcom_psc_gen_bd_tx_init(psc_id, 10, fifo);\n-\tif (!psc_i2s->capture.bcom_task ||\n-\t !psc_i2s->playback.bcom_task) {\n+\tif (!psc_dma->capture.bcom_task ||\n+\t !psc_dma->playback.bcom_task) {\n \t\tdev_err(&op->dev, \"Could not allocate bestcomm tasks\\n\");\n \t\tiounmap(regs);\n-\t\tkfree(psc_i2s);\n+\t\tkfree(psc_dma);\n \t\treturn -ENODEV;\n \t}\n \n \t/* Disable all interrupts and reset the PSC */\n-\tout_be16(&psc_i2s->psc_regs->isr_imr.imr, 0);\n-\tout_8(&psc_i2s->psc_regs->command, 3 << 4); /* reset transmitter */\n-\tout_8(&psc_i2s->psc_regs->command, 2 << 4); /* reset receiver */\n-\tout_8(&psc_i2s->psc_regs->command, 1 << 4); /* reset mode */\n-\tout_8(&psc_i2s->psc_regs->command, 4 << 4); /* reset error */\n+\tout_be16(&psc_dma->psc_regs->isr_imr.imr, 0);\n+\tout_8(&psc_dma->psc_regs->command, 3 << 4); /* reset transmitter */\n+\tout_8(&psc_dma->psc_regs->command, 2 << 4); /* reset receiver */\n+\tout_8(&psc_dma->psc_regs->command, 1 << 4); /* reset mode */\n+\tout_8(&psc_dma->psc_regs->command, 4 << 4); /* reset error */\n \n \t/* Configure the serial interface mode; defaulting to CODEC8 mode */\n-\tpsc_i2s->sicr = MPC52xx_PSC_SICR_DTS1 | MPC52xx_PSC_SICR_I2S |\n+\tpsc_dma->sicr = MPC52xx_PSC_SICR_DTS1 | MPC52xx_PSC_SICR_I2S |\n \t\t\tMPC52xx_PSC_SICR_CLKPOL;\n \tif (of_get_property(op->node, \"fsl,cellslave\", NULL))\n-\t\tpsc_i2s->sicr |= MPC52xx_PSC_SICR_CELLSLAVE |\n+\t\tpsc_dma->sicr |= MPC52xx_PSC_SICR_CELLSLAVE |\n \t\t\t\t MPC52xx_PSC_SICR_GENCLK;\n-\tout_be32(&psc_i2s->psc_regs->sicr,\n-\t\t psc_i2s->sicr | MPC52xx_PSC_SICR_SIM_CODEC_8);\n+\tout_be32(&psc_dma->psc_regs->sicr,\n+\t\t psc_dma->sicr | MPC52xx_PSC_SICR_SIM_CODEC_8);\n \n \t/* Check for the codec handle. If it is not present then we\n \t * are done */\n@@ -325,54 +325,54 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,\n \t * First write: RxRdy (FIFO Alarm) generates rx FIFO irq\n \t * Second write: register Normal mode for non loopback\n \t */\n-\tout_8(&psc_i2s->psc_regs->mode, 0);\n-\tout_8(&psc_i2s->psc_regs->mode, 0);\n+\tout_8(&psc_dma->psc_regs->mode, 0);\n+\tout_8(&psc_dma->psc_regs->mode, 0);\n \n \t/* Set the TX and RX fifo alarm thresholds */\n-\tout_be16(&psc_i2s->fifo_regs->rfalarm, 0x100);\n-\tout_8(&psc_i2s->fifo_regs->rfcntl, 0x4);\n-\tout_be16(&psc_i2s->fifo_regs->tfalarm, 0x100);\n-\tout_8(&psc_i2s->fifo_regs->tfcntl, 0x7);\n+\tout_be16(&psc_dma->fifo_regs->rfalarm, 0x100);\n+\tout_8(&psc_dma->fifo_regs->rfcntl, 0x4);\n+\tout_be16(&psc_dma->fifo_regs->tfalarm, 0x100);\n+\tout_8(&psc_dma->fifo_regs->tfcntl, 0x7);\n \n \t/* Lookup the IRQ numbers */\n-\tpsc_i2s->playback.irq =\n-\t\tbcom_get_task_irq(psc_i2s->playback.bcom_task);\n-\tpsc_i2s->capture.irq =\n-\t\tbcom_get_task_irq(psc_i2s->capture.bcom_task);\n+\tpsc_dma->playback.irq =\n+\t\tbcom_get_task_irq(psc_dma->playback.bcom_task);\n+\tpsc_dma->capture.irq =\n+\t\tbcom_get_task_irq(psc_dma->capture.bcom_task);\n \n \t/* Save what we've done so it can be found again later */\n-\tdev_set_drvdata(&op->dev, psc_i2s);\n+\tdev_set_drvdata(&op->dev, psc_dma);\n \n \t/* Register the SYSFS files */\n-\trc = device_create_file(psc_i2s->dev, &dev_attr_status);\n-\trc |= device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);\n-\trc |= device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);\n+\trc = device_create_file(psc_dma->dev, &dev_attr_status);\n+\trc |= device_create_file(psc_dma->dev, &dev_attr_capture_overrun);\n+\trc |= device_create_file(psc_dma->dev, &dev_attr_playback_underrun);\n \tif (rc)\n-\t\tdev_info(psc_i2s->dev, \"error creating sysfs files\\n\");\n+\t\tdev_info(psc_dma->dev, \"error creating sysfs files\\n\");\n \n-\tsnd_soc_register_platform(&psc_i2s_pcm_soc_platform);\n+\tsnd_soc_register_platform(&psc_dma_pcm_soc_platform);\n \n \t/* Tell the ASoC OF helpers about it */\n-\tof_snd_soc_register_platform(&psc_i2s_pcm_soc_platform, op->node,\n-\t\t\t\t &psc_i2s->dai);\n+\tof_snd_soc_register_platform(&psc_dma_pcm_soc_platform, op->node,\n+\t\t\t\t &psc_dma->dai);\n \n \treturn 0;\n }\n \n static int __devexit psc_i2s_of_remove(struct of_device *op)\n {\n-\tstruct psc_i2s *psc_i2s = dev_get_drvdata(&op->dev);\n+\tstruct psc_dma *psc_dma = dev_get_drvdata(&op->dev);\n \n \tdev_dbg(&op->dev, \"psc_i2s_remove()\\n\");\n \n-\tsnd_soc_unregister_platform(&psc_i2s_pcm_soc_platform);\n+\tsnd_soc_unregister_platform(&psc_dma_pcm_soc_platform);\n \n-\tbcom_gen_bd_rx_release(psc_i2s->capture.bcom_task);\n-\tbcom_gen_bd_tx_release(psc_i2s->playback.bcom_task);\n+\tbcom_gen_bd_rx_release(psc_dma->capture.bcom_task);\n+\tbcom_gen_bd_tx_release(psc_dma->playback.bcom_task);\n \n-\tiounmap(psc_i2s->psc_regs);\n-\tiounmap(psc_i2s->fifo_regs);\n-\tkfree(psc_i2s);\n+\tiounmap(psc_dma->psc_regs);\n+\tiounmap(psc_dma->fifo_regs);\n+\tkfree(psc_dma);\n \tdev_set_drvdata(&op->dev, NULL);\n \n \treturn 0;\n", "prefixes": [ "V2", "3/9" ] }