[PATCH 06/18] mmc: meson-gx: simplify bounce buffer setting in meson_mmc_start_cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If xfer_bytes is zero we can configure the chip to use the bounce
buffer as well because it won't get used anyway.
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@xxxxxxxxx>
---
 drivers/mmc/host/meson-gx-mmc.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

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


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux