Commit 70f16fab authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Wolfram Sang

Revert "i2c: qcom-geni: Disable DMA processing on the Lenovo Yoga C630"

A combination of recent bug fixes by Doug Anderson and the proper
definition of iommu streams means that this hack is no longer needed.
Let's clean up the code by reverting '127068ab ("i2c: qcom-geni:
Disable DMA processing on the Lenovo Yoga C630")'.
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: default avatarShawn Guo <shawn.guo@linaro.org>
Acked-by: default avatarCaleb Connolly <caleb@connolly.tech>
Tested-by: default avatarSteev Klimaszewski <steev@kali.org>
Reviewed-by: default avatarAkash Asthana <akashast@codeaurora.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent c32abd8b
...@@ -353,13 +353,11 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, ...@@ -353,13 +353,11 @@ static int geni_i2c_rx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg,
{ {
dma_addr_t rx_dma; dma_addr_t rx_dma;
unsigned long time_left; unsigned long time_left;
void *dma_buf = NULL; void *dma_buf;
struct geni_se *se = &gi2c->se; struct geni_se *se = &gi2c->se;
size_t len = msg->len; size_t len = msg->len;
if (!of_machine_is_compatible("lenovo,yoga-c630")) dma_buf = i2c_get_dma_safe_msg_buf(msg, 32);
dma_buf = i2c_get_dma_safe_msg_buf(msg, 32);
if (dma_buf) if (dma_buf)
geni_se_select_mode(se, GENI_SE_DMA); geni_se_select_mode(se, GENI_SE_DMA);
else else
...@@ -394,13 +392,11 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg, ...@@ -394,13 +392,11 @@ static int geni_i2c_tx_one_msg(struct geni_i2c_dev *gi2c, struct i2c_msg *msg,
{ {
dma_addr_t tx_dma; dma_addr_t tx_dma;
unsigned long time_left; unsigned long time_left;
void *dma_buf = NULL; void *dma_buf;
struct geni_se *se = &gi2c->se; struct geni_se *se = &gi2c->se;
size_t len = msg->len; size_t len = msg->len;
if (!of_machine_is_compatible("lenovo,yoga-c630")) dma_buf = i2c_get_dma_safe_msg_buf(msg, 32);
dma_buf = i2c_get_dma_safe_msg_buf(msg, 32);
if (dma_buf) if (dma_buf)
geni_se_select_mode(se, GENI_SE_DMA); geni_se_select_mode(se, GENI_SE_DMA);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment