All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Cvek <petr.cvek@tul.cz>
To: ulf.hansson@linaro.org, robert.jarzmik@free.fr
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/4] mmc: pxamci: Use the right flags for DMA callback init
Date: Fri, 21 Apr 2017 02:31:56 +0200	[thread overview]
Message-ID: <f79f04c4-e1c4-0b33-d381-9041aa69db2e@tul.cz> (raw)
In-Reply-To: <fbc663e3-4de5-7370-afa8-0f8747f50ca7@tul.cz>

Dne 19.4.2017 v 01:16 Petr Cvek napsal(a):
> The MMC_DATA_READ and the MMC_DATA_WRITE flags for the mmc request are not
> mutually exclusive (two different bits). Change the callback initialization
> code to use the proper one.
> 
> Signed-off-by: Petr Cvek <petr.cvek@tul.cz>

It seems I forgot to patch a code in the pxamci_setup_data():

	config.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
	config.src_addr = host->res->start + MMC_RXFIFO;
	config.dst_addr = host->res->start + MMC_TXFIFO;
	config.src_maxburst = 32;
	config.dst_maxburst = 32;

	if (data->flags & MMC_DATA_READ) {
		host->dma_dir = DMA_FROM_DEVICE;
		direction = DMA_DEV_TO_MEM;
		chan = host->dma_chan_rx;
	} else {
		host->dma_dir = DMA_TO_DEVICE;
		direction = DMA_MEM_TO_DEV;
		chan = host->dma_chan_tx;
	}

I will add it in v2 series.

Just curious: why does the MMC_DATA_READ/MMC_DATA_WRITE flag occupies two bits anyway is there a hardware which can do both request at the same time?

BTW that config.* block should be IMO split and moved into that if(){} too (as the PXA27x do only one DMA direction at the time).

Petr


WARNING: multiple messages have this Message-ID (diff)
From: petr.cvek@tul.cz (Petr Cvek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] mmc: pxamci: Use the right flags for DMA callback init
Date: Fri, 21 Apr 2017 02:31:56 +0200	[thread overview]
Message-ID: <f79f04c4-e1c4-0b33-d381-9041aa69db2e@tul.cz> (raw)
In-Reply-To: <fbc663e3-4de5-7370-afa8-0f8747f50ca7@tul.cz>

Dne 19.4.2017 v 01:16 Petr Cvek napsal(a):
> The MMC_DATA_READ and the MMC_DATA_WRITE flags for the mmc request are not
> mutually exclusive (two different bits). Change the callback initialization
> code to use the proper one.
> 
> Signed-off-by: Petr Cvek <petr.cvek@tul.cz>

It seems I forgot to patch a code in the pxamci_setup_data():

	config.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
	config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE;
	config.src_addr = host->res->start + MMC_RXFIFO;
	config.dst_addr = host->res->start + MMC_TXFIFO;
	config.src_maxburst = 32;
	config.dst_maxburst = 32;

	if (data->flags & MMC_DATA_READ) {
		host->dma_dir = DMA_FROM_DEVICE;
		direction = DMA_DEV_TO_MEM;
		chan = host->dma_chan_rx;
	} else {
		host->dma_dir = DMA_TO_DEVICE;
		direction = DMA_MEM_TO_DEV;
		chan = host->dma_chan_tx;
	}

I will add it in v2 series.

Just curious: why does the MMC_DATA_READ/MMC_DATA_WRITE flag occupies two bits anyway is there a hardware which can do both request at the same time?

BTW that config.* block should be IMO split and moved into that if(){} too (as the PXA27x do only one DMA direction at the time).

Petr

  reply	other threads:[~2017-04-21  0:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1492492523.git.petr.cvek@tul.cz>
2017-04-18 23:16 ` [PATCH 1/4] mmc: pxamci: Use the right flags for DMA callback init Petr Cvek
2017-04-18 23:16   ` Petr Cvek
2017-04-21  0:31   ` Petr Cvek [this message]
2017-04-21  0:31     ` Petr Cvek
2017-04-18 23:17 ` [PATCH 2/4] mmc: pxamci: Enhance error checking Petr Cvek
2017-04-18 23:17   ` Petr Cvek
2017-04-19 19:12   ` Robert Jarzmik
2017-04-19 19:12     ` Robert Jarzmik
2017-04-18 23:17 ` [PATCH 3/4] mmc: pxamci: Disable DATA_TRAN_DONE interrupt sooner Petr Cvek
2017-04-18 23:17   ` Petr Cvek
2017-04-19 19:14   ` Robert Jarzmik
2017-04-19 19:14     ` Robert Jarzmik
2017-04-20 23:37     ` Petr Cvek
2017-04-20 23:37       ` Petr Cvek
2017-04-18 23:18 ` [PATCH 4/4] mmc: pxamci: Fix race condition between pxamci_dma_irq() and pxamci_irq() Petr Cvek
2017-04-18 23:18   ` Petr Cvek
2017-04-19 19:22   ` Robert Jarzmik
2017-04-19 19:22     ` Robert Jarzmik
2017-04-21  1:30     ` Petr Cvek
2017-04-21  1:30       ` Petr Cvek
2017-04-27 13:14       ` Robert Jarzmik
2017-04-27 13:14         ` Robert Jarzmik

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=f79f04c4-e1c4-0b33-d381-9041aa69db2e@tul.cz \
    --to=petr.cvek@tul.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    --cc=ulf.hansson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.