linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: zhaoy@marvell.com (zhaoy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/13] DMA:remove unnecessary dma configurations
Date: Tue, 28 Feb 2012 15:27:41 +0800	[thread overview]
Message-ID: <1330414065-2949-10-git-send-email-zhaoy@marvell.com> (raw)
In-Reply-To: <Y>

	1.remove old unnecessary dma configurations

Change-Id: I3741d39ba643d7a6b95341e0ba695a689d18e147
Signed-off-by: zhaoy <zhaoy@marvell.com>
---
 sound/soc/pxa/mmp2-sspa.c |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/sound/soc/pxa/mmp2-sspa.c b/sound/soc/pxa/mmp2-sspa.c
index de3a45f..76e57c7 100644
--- a/sound/soc/pxa/mmp2-sspa.c
+++ b/sound/soc/pxa/mmp2-sspa.c
@@ -259,9 +259,6 @@ mmp2_sspa_get_dma_params(int id, struct ssp_device *sspa, int width, int out)
 		return NULL;
 
 	dma = &mmp2_pcm_adma_params[index];
-	dma->dcmd = (out ? (TDCR_DSTDIR_ADDR_HOLD | TDCR_SRCDIR_ADDR_INC) :
-			   (TDCR_SRCDIR_ADDR_HOLD | TDCR_DSTDIR_ADDR_INC)) |
-		    TDCR_PACKMOD | TDCR_BURSTSZ_4B | TDCR_FETCHND | width;
 	dma->dma_ch = out ? sspa->drcmr_tx : sspa->drcmr_rx;
 	dma->dev_addr = out ? (sspa->phys_base + SSPA_TXD) :
 			      (sspa->phys_base + SSPA_RXD);
@@ -629,20 +626,24 @@ static int mmp3_sspa_hw_params(struct snd_pcm_substream *substream,
 
 	switch (params_format(params)) {
 	case SNDRV_PCM_FORMAT_S8:
-		word_size = SSPA_CTL_8_BITS;
+		sspa_ctrl |= SSPA_CTL_XSSZ1(SSPA_CTL_8_BITS);
+		word_size = SSPA_CTL_16_BITS;
 		bits_per_frame = 16;
 		as_width = TDCR_SSZ_8_BITS;
 	case SNDRV_PCM_FORMAT_S16_LE:
+		sspa_ctrl |= SSPA_CTL_XSSZ1(SSPA_CTL_16_BITS);
 		word_size = SSPA_CTL_32_BITS;
 		bits_per_frame = 32;
 		as_width = TDCR_SSZ_16_BITS;
 		break;
 	case SNDRV_PCM_FORMAT_S24_LE:
+		sspa_ctrl |= SSPA_CTL_XSSZ1(SSPA_CTL_24_BITS);
 		word_size = SSPA_CTL_24_BITS;
 		bits_per_frame = 48;
 		as_width = TDCR_SSZ_24_BITS;
 		break;
 	case SNDRV_PCM_FORMAT_S32_LE:
+		sspa_ctrl |= SSPA_CTL_XSSZ1(SSPA_CTL_32_BITS);
 		word_size = SSPA_CTL_32_BITS;
 		bits_per_frame = 64;
 		as_width = TDCR_SSZ_32_BITS;
@@ -655,8 +656,7 @@ static int mmp3_sspa_hw_params(struct snd_pcm_substream *substream,
 	 * that word_size bit can be sent out. the word_size - 1 length of
 	 * 0 would be ignored in codec. it should be also appiled to other
 	 * formats besides S16_LE */
-	sspa_ctrl |= SSPA_CTL_XSSZ1(word_size) |
-		     SSPA_CTL_XWDLEN1(word_size);
+	sspa_ctrl |= SSPA_CTL_XWDLEN1(word_size);
 	sspa_sp |= SSPA_SP_FPER((bits_per_frame << 1) - 1) |
 		     SSPA_SP_FWID(bits_per_frame - 1);
 
@@ -670,16 +670,16 @@ static int mmp3_sspa_hw_params(struct snd_pcm_substream *substream,
 		mmp2_sspa_write_reg(sspa, SSPA_RXCTL, sspa_ctrl);
 		mmp2_sspa_write_reg(sspa, SSPA_RXFIFO_UL, 0x0);
 		mmp2_sspa_write_reg(sspa, SSPA_RXSP, sspa_sp);
-#ifdef CONFIG_CPU_MMP3
+
 		if (sspa_sp & SSPA_SP_MSL) {
-		/* FIXME: hw issue, for the rx port, can not config the
-		 * master mode in TXSP register. and must clear this bit
-		 * in TXSP register */
-		sspa_sp = mmp2_sspa_read_reg(sspa, SSPA_TXSP);
-		sspa_sp |= SSPA_SP_WEN;
-		mmp2_sspa_write_reg(sspa, SSPA_TXSP, sspa_sp & ~SSPA_SP_MSL);
+			/* FIXME: hw issue, for the rx port, can not config the
+			 * master mode in TXSP register. and must clear this bit
+			 * in TXSP register */
+			sspa_sp = mmp2_sspa_read_reg(sspa, SSPA_TXSP);
+			sspa_sp |= SSPA_SP_WEN;
+			mmp2_sspa_write_reg(sspa, SSPA_TXSP,
+						sspa_sp & ~SSPA_SP_MSL);
 		}
-#endif
 	}
 
 	mmp2_sspa_dump_reg(sspa);
-- 
1.7.0.4

  parent reply	other threads:[~2012-02-28  7:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Y>
2012-02-28  7:27 ` [PATCH 00/13] Enable DMA engine for mmp2 and mmp3 zhaoy
2012-02-28  8:41   ` Haojian Zhuang
2012-02-28  8:49     ` Zhao Ye
2012-02-28  7:27 ` [PATCH 01/13] DMA:define second level irq definition zhaoy
2012-02-28  7:27 ` [PATCH 02/13] dmaengine:open dmac and tdma support zhaoy
2012-02-28  7:27 ` [PATCH 03/13] dmaengine: mmp: add two-channel dma driver zhaoy
2012-02-28  7:27 ` [PATCH 04/13] dmaengine:mmp add peripheral " zhaoy
2012-02-28  7:27 ` [PATCH 05/13] mmp2:register dma devices for mmp2 platform zhaoy
2012-02-28  7:27 ` [PATCH 06/13] mmp3:register dma devices for mmp3 platform zhaoy
2012-02-28  7:27 ` [PATCH 07/13] DMA:mmp:remove redundant dma drivers zhaoy
2012-02-28 12:30   ` Sergei Shtylyov
2012-02-28  7:27 ` [PATCH 08/13] DMAC:tty serial pxa use generic dma engine APIs zhaoy
2012-02-28  7:27 ` zhaoy [this message]
2012-02-28  7:27 ` [PATCH 10/13] dmaengine:audio:mmp audio " zhaoy
2012-02-28  7:27 ` [PATCH 11/13] DMA:update defconfig for mmp3 zhaoy
2012-02-28  7:27 ` [PATCH 12/13] mdma:dmaengine:update mdma for tdma zhaoy
2012-02-28  7:27 ` [PATCH 13/13] DMA:update defconfig for mmp2 zhaoy
2012-02-28  7:42   ` Zhao Ye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330414065-2949-10-git-send-email-zhaoy@marvell.com \
    --to=zhaoy@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).