From: kishon@ti.com (Kishon Vijay Abraham I)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 14/41] mmc: host: omap_hsmmc: Remove *use_dma* member
Date: Fri, 19 May 2017 13:45:14 +0530 [thread overview]
Message-ID: <20170519081541.26753-15-kishon@ti.com> (raw)
In-Reply-To: <20170519081541.26753-1-kishon@ti.com>
omap_hsmmc doesn't support polled I/O. So remove *use_dma*
which is always set to '1'.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
drivers/mmc/host/omap_hsmmc.c | 37 ++++++++++++++++---------------------
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 7271c7e3144c..90bf097484ae 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -238,7 +238,7 @@ struct omap_hsmmc_host {
u32 capa;
int irq;
int wake_irq;
- int use_dma, dma_ch;
+ int dma_ch;
struct dma_chan *tx_chan;
struct dma_chan *rx_chan;
int response_busy;
@@ -658,8 +658,8 @@ static void omap_hsmmc_enable_irq(struct omap_hsmmc_host *host,
*/
irq_mask &= ~(DCRC_EN | DEB_EN);
- if (host->use_dma)
- irq_mask &= ~(BRR_EN | BWR_EN);
+ /* BRR and BWR need not be enabled for DMA */
+ irq_mask &= ~(BRR_EN | BWR_EN);
/* Disable timeout for erases or when using software timeout */
if (cmd && (cmd->opcode == MMC_ERASE || host->data_timeout))
@@ -1012,8 +1012,7 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd,
(cmd->opcode == MMC_SEND_TUNING_BLOCK_HS200))
cmdreg |= DP_SELECT | DDIR;
- if (host->use_dma)
- cmdreg |= DMAE;
+ cmdreg |= DMAE;
host->req_in_progress = 1;
host->last_cmd = cmd->opcode;
@@ -1040,7 +1039,7 @@ static void omap_hsmmc_request_done(struct omap_hsmmc_host *host, struct mmc_req
omap_hsmmc_disable_irq(host);
/* Do not complete the request if DMA is still in progress */
- if (mrq->data && host->use_dma && dma_ch != -1)
+ if (mrq->data && dma_ch != -1)
return;
host->mrq = NULL;
mmc_request_done(host->mmc, mrq);
@@ -1127,7 +1126,7 @@ static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno)
host->dma_ch = -1;
spin_unlock_irqrestore(&host->irq_lock, flags);
- if (host->use_dma && dma_ch != -1) {
+ if (dma_ch != -1) {
struct dma_chan *chan = omap_hsmmc_get_dma_chan(host, host->data);
dmaengine_terminate_all(chan);
@@ -1645,12 +1644,10 @@ omap_hsmmc_prepare_data(struct omap_hsmmc_host *host, struct mmc_request *req)
return 0;
}
- if (host->use_dma) {
- ret = omap_hsmmc_setup_dma_transfer(host, req);
- if (ret != 0) {
- dev_err(mmc_dev(host->mmc), "MMC start dma failure\n");
- return ret;
- }
+ ret = omap_hsmmc_setup_dma_transfer(host, req);
+ if (ret != 0) {
+ dev_err(mmc_dev(host->mmc), "MMC start dma failure\n");
+ return ret;
}
return 0;
}
@@ -1661,7 +1658,7 @@ static void omap_hsmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq,
struct omap_hsmmc_host *host = mmc_priv(mmc);
struct mmc_data *data = mrq->data;
- if (host->use_dma && data->host_cookie) {
+ if (data->host_cookie) {
struct dma_chan *c = omap_hsmmc_get_dma_chan(host, data);
dma_unmap_sg(c->device->dev, data->sg, data->sg_len,
@@ -1673,19 +1670,18 @@ static void omap_hsmmc_post_req(struct mmc_host *mmc, struct mmc_request *mrq,
static void omap_hsmmc_pre_req(struct mmc_host *mmc, struct mmc_request *mrq)
{
struct omap_hsmmc_host *host = mmc_priv(mmc);
+ struct dma_chan *c = NULL;
if (mrq->data->host_cookie) {
mrq->data->host_cookie = 0;
return ;
}
- if (host->use_dma) {
- struct dma_chan *c = omap_hsmmc_get_dma_chan(host, mrq->data);
+ c = omap_hsmmc_get_dma_chan(host, mrq->data);
- if (omap_hsmmc_pre_dma_transfer(host, mrq->data,
- &host->next_data, c))
- mrq->data->host_cookie = 0;
- }
+ if (omap_hsmmc_pre_dma_transfer(host, mrq->data,
+ &host->next_data, c))
+ mrq->data->host_cookie = 0;
}
/*
@@ -2547,7 +2543,6 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
host->mmc = mmc;
host->pdata = pdata;
host->dev = &pdev->dev;
- host->use_dma = 1;
host->dma_ch = -1;
host->irq = irq;
host->mapbase = res->start + pdata->reg_offset;
--
2.11.0
next prev parent reply other threads:[~2017-05-19 8:15 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 8:15 [PATCH 00/41] omap_hsmmc: Add ADMA support and UHS/HS200/DDR support Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 01/41] mmc: host: omap_hsmmc: Support pbias and vmmc_aux to switch to 1.8v Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 02/41] mmc: host: omap_hsmmc: Separate setting voltage capabilities from bus power Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 03/41] mmc: host: omap_hsmmc: Program HCTL based on signal_voltage set by mmc core Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 04/41] mmc: host: omap_hsmmc: Add voltage switch support for UHS SD card Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 05/41] mmc: host: omap_hsmmc: Set clk rate to the max frequency Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 06/41] mmc: host: omap_hsmmc: Add tuning support Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 07/41] mmc: host: omap_hsmmc: Allow io voltage switch even for fixed vdd Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 08/41] mmc: host: omap_hsmmc: Remove incorrect voltage switch sequence Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 09/41] mmc: host: omap_hsmmc: Add software timer when timeout greater than hardware capablility Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 10/41] mmc: host: omap_hsmmc: Prepare *set_timing() to be used for iodelay setting Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 11/41] mmc: host: omap_hsmmc: Add new compatible string to support dra7 Kishon Vijay Abraham I
2017-05-23 14:44 ` Rob Herring
2017-05-19 8:15 ` [PATCH 12/41] mmc: host: omap_hsmmc: Fix error path sequence Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 13/41] mmc: host: omap_hsmmc: Add support to set IODELAY values Kishon Vijay Abraham I
2017-05-23 14:55 ` Rob Herring
2017-05-19 8:15 ` Kishon Vijay Abraham I [this message]
2017-05-19 8:15 ` [PATCH 15/41] mmc: host: omap_hsmmc: Enable ADMA2 Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 16/41] mmc: omap_hsmmc: Support non-1.8V IO controllers Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 17/41] ARM: dts: dra72-evm: Add vmmc_aux supply to mmc1 Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 18/41] ARM: dts: dra72-evm-revc: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 19/41] ARM: dts: am57xx-beagle-x15-revb1: Fix supply name used for MMC1 IO lines Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 20/41] ARM: dts: dra7-evm: Correct the vmmc-supply for mmc2 Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 21/41] ARM: dts: dra72-evm-common: Correct " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 22/41] ARM: dts: Add dra7 iodelay configuration Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 23/41] ARM: dts: dra72x: Create a common file with MMC/SD IOdelay data Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 24/41] ARM: dts: dra74x: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 25/41] ARM: dts: dra7-evm: Add pinmux configuration for MMC Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 26/41] ARM: dts: am57xx-beagle-x15: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 27/41] ARM: dts: am57xx-idk: Move common MMC/SD properties to common file Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 28/41] ARM: dts: am571x-idk: Add pinmux configuration for MMC Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 29/41] ARM: dts: am572x-idk: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 30/41] ARM: dts: dra72-evm: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 31/41] ARM: dts: dra72-evm-revc: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 32/41] ARM: dts: dra71-evm: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 33/41] ARM: dts: dra7: Add "max-frequency" property to MMC dt nodes Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 34/41] ARM: dts: dra7: Use new dra7-specific compatible string Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 35/41] ARM: dts: dra7: Add supported MMC/SD modes in MMC dt nodes Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 36/41] ARM: dts: am57xx-idk: Set MMC2 IO voltage to 3.3V Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 37/41] ARM: dts: am57xx-beagle-x15-common: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 38/41] ARM: OMAP2+: Add pdata-quirks for MMC/SD on DRA74x EVM Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 39/41] ARM: omap2plus_defconfig: Enable PINCTRL_TI_IODELAY Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 40/41] ARM: multi_v7_defconfig: " Kishon Vijay Abraham I
2017-05-19 8:15 ` [PATCH 41/41] Documentation: ARM: Document new dependencies for MMC on DRA7 Kishon Vijay Abraham I
2017-05-19 22:13 ` [PATCH 00/41] omap_hsmmc: Add ADMA support and UHS/HS200/DDR support Tony Lindgren
2017-05-22 12:20 ` Kishon Vijay Abraham I
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=20170519081541.26753-15-kishon@ti.com \
--to=kishon@ti.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).