From 645e752c5a84baeb21015cdc85fc05b7d16312c8 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 11 May 2024 01:13:52 +0000
Subject: [PATCH] disable i2c1
---
kernel/drivers/mmc/host/dw_mmc-rockchip.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/kernel/drivers/mmc/host/dw_mmc-rockchip.c b/kernel/drivers/mmc/host/dw_mmc-rockchip.c
index cdc97f8..a88e8f1 100644
--- a/kernel/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/kernel/drivers/mmc/host/dw_mmc-rockchip.c
@@ -166,7 +166,7 @@
* It's impossible all 4 fixed phase won't be able to work.
*/
for (i = 0; i < ARRAY_SIZE(degrees); i++) {
- degree = degrees[i] + priv->last_degree;
+ degree = degrees[i] + priv->last_degree + 90;
degree = degree % 360;
clk_set_phase(priv->sample_clk, degree);
if (!mmc_send_tuning(mmc, opcode, NULL))
@@ -174,12 +174,12 @@
}
if (i == ARRAY_SIZE(degrees)) {
- dev_warn(host->dev, "All phases bad!");
+ dev_warn(host->dev, "V2 All phases bad!");
return -EIO;
}
done:
- dev_info(host->dev, "Successfully tuned phase to %d\n", degrees[i]);
+ dev_info(host->dev, "Successfully tuned phase to %d\n", degree);
priv->last_degree = degree;
return 0;
}
@@ -208,8 +208,7 @@
}
if (priv->use_v2_tuning) {
- ret = dw_mci_v2_execute_tuning(slot, opcode);
- if (!ret)
+ if (!dw_mci_v2_execute_tuning(slot, opcode))
return 0;
/* Otherwise we continue using fine tuning */
}
@@ -448,8 +447,10 @@
if (!pdev->dev.of_node)
return -ENODEV;
- if (!device_property_read_bool(&pdev->dev, "non-removable") &&
- !device_property_read_bool(&pdev->dev, "cd-gpios"))
+ if ((!device_property_read_bool(&pdev->dev, "non-removable") &&
+ !device_property_read_bool(&pdev->dev, "cd-gpios")) ||
+ (device_property_read_bool(&pdev->dev, "no-sd") &&
+ device_property_read_bool(&pdev->dev, "no-mmc")))
use_rpm = false;
match = of_match_node(dw_mci_rockchip_match, pdev->dev.of_node);
--
Gitblit v1.6.2