diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2017-03-04 13:19:23 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-04-24 21:41:07 +0200 |
commit | 94d765bbfb1910ef8db5699d19907a0756a99d03 (patch) | |
tree | a4eed35880412d9da8970174ee3124046662bdc7 | |
parent | bc2dcc1a2a5e3e796b71f742d6d241ba0523739b (diff) |
mmc: meson-gx: simplify bounce buffer setting in meson_mmc_start_cmd
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>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/meson-gx-mmc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 5a959783304b..07a7399cf69e 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 { |