All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/10] mmc: meson-gx: simplify bounce buffer setting in meson_mmc_start_cmd
@ 2017-02-18 11:50 ` Heiner Kallweit
  0 siblings, 0 replies; 36+ messages in thread
From: Heiner Kallweit @ 2017-02-18 11:50 UTC (permalink / raw)
  To: Ulf Hansson, Kevin Hilman; +Cc: linux-mmc, linux-amlogic

Core ensures that there are no commands with cmd->data being set and
nothing to transfer. And we don't have to reset bit CMD_CFG_DATA_NUM
because cmd_cfg was zero-initialized and this bit isn't set.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
---
v2:
- adjusted commit message because branch xfer_bytes == 0 is never reached
- added acked-by
v3:
- no changes
---
 drivers/mmc/host/meson-gx-mmc.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 5a959783..07a7399c 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -516,14 +516,7 @@ static void meson_mmc_start_cmd(struct mmc_host *mmc, struct mmc_command *cmd)
 			desc->cmd_cfg &= ~CMD_CFG_DATA_WR;
 		}
 
-		if (xfer_bytes > 0) {
-			desc->cmd_cfg &= ~CMD_CFG_DATA_NUM;
-			desc->cmd_data = host->bounce_dma_addr & CMD_DATA_MASK;
-		} else {
-			/* write data to data_addr */
-			desc->cmd_cfg |= CMD_CFG_DATA_NUM;
-			desc->cmd_data = 0;
-		}
+		desc->cmd_data = host->bounce_dma_addr & CMD_DATA_MASK;
 
 		cmd_cfg_timeout = 12;
 	} else {
-- 
2.11.1


^ permalink raw reply related	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2017-03-03 18:27 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-18 11:50 [PATCH v3 1/10] mmc: meson-gx: simplify bounce buffer setting in meson_mmc_start_cmd Heiner Kallweit
2017-02-18 11:50 ` Heiner Kallweit
2017-02-18 13:06 ` [PATCH v3 2/10] mmc: meson-gx: make two functions return void Heiner Kallweit
2017-02-18 13:06   ` Heiner Kallweit
2017-02-18 13:07 ` [PATCH v3 3/10] mmc: meson-gx: remove unused members irq, ocr_mask from struct meson_host Heiner Kallweit
2017-02-18 13:07   ` Heiner Kallweit
2017-02-18 13:08 ` [PATCH v3 4/10] mmc: meson-gx: remove unneeded variable in meson_mmc_clk_init Heiner Kallweit
2017-02-18 13:08   ` Heiner Kallweit
2017-02-18 13:09 ` [PATCH v3 5/10] mmc: meson-gx: remove member parent_mux from struct meson_host Heiner Kallweit
2017-02-18 13:09   ` Heiner Kallweit
2017-02-18 13:19 ` [PATCH v3 6/10] mmc: meson-gx: fix error path in meson_mmc_clk_init / meson_mmc_probe Heiner Kallweit
2017-02-18 13:19   ` Heiner Kallweit
2017-02-18 13:57   ` Michał Zegan
2017-02-18 13:57     ` Michał Zegan
2017-02-18 15:22     ` Heiner Kallweit
2017-02-18 15:22       ` Heiner Kallweit
2017-02-18 15:30       ` Michał Zegan
2017-02-18 15:30         ` Michał Zegan
2017-02-28  3:06   ` Kevin Hilman
2017-02-28  3:06     ` Kevin Hilman
2017-02-18 13:20 ` [PATCH v3 7/10] mmc: meson-gx: remove unneeded devm_kstrdup in meson_mmc_clk_init Heiner Kallweit
2017-02-18 13:20   ` Heiner Kallweit
2017-02-18 13:22 ` [PATCH v3 8/10] mmc: meson-gx: improve initial configuration Heiner Kallweit
2017-02-18 13:22   ` Heiner Kallweit
2017-02-18 13:23 ` [PATCH v3 9/10] mmc: meson-gx: remove member mrq from struct meson_host Heiner Kallweit
2017-02-18 13:23   ` Heiner Kallweit
2017-02-18 13:26 ` [PATCH v3 10/10] mmc: meson-gx: replace magic timeout numbers with constants Heiner Kallweit
2017-02-18 13:26   ` Heiner Kallweit
2017-02-28  3:07   ` Kevin Hilman
2017-02-28  3:07     ` Kevin Hilman
2017-03-01 18:09 ` [PATCH v3 1/10] mmc: meson-gx: simplify bounce buffer setting in meson_mmc_start_cmd Kevin Hilman
2017-03-01 18:09   ` Kevin Hilman
2017-03-01 20:20   ` Heiner Kallweit
2017-03-01 20:20     ` Heiner Kallweit
2017-03-03 18:17     ` Kevin Hilman
2017-03-03 18:17       ` Kevin Hilman

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.