aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2016-07-04 13:27:46 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-07-04 13:27:46 +0200
commit64032d56b37cbf54a09c7a98153570c194bd0178 (patch)
tree9387f05b23ed323b45bda1802ace908ea671a6f1 /target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch
parentb48b0cffc90a903a45199d0d63ff4c6caf2cb93d (diff)
downloadmaster-187ad058-64032d56b37cbf54a09c7a98153570c194bd0178.tar.gz
master-187ad058-64032d56b37cbf54a09c7a98153570c194bd0178.tar.bz2
master-187ad058-64032d56b37cbf54a09c7a98153570c194bd0178.zip
ramips: disable the WP pin on the SDK mmc driver
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch')
-rw-r--r--target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch b/target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch
new file mode 100644
index 0000000000..46b1a6c04c
--- /dev/null
+++ b/target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch
@@ -0,0 +1,21 @@
+--- a/drivers/mmc/host/mtk-mmc/sd.c
++++ b/drivers/mmc/host/mtk-mmc/sd.c
+@@ -195,7 +195,7 @@
+ .dat_drv = 4,
+ .data_pins = 4,
+ .data_offset = 0,
+- .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED,
++ .flags = MSDC_SYS_SUSPEND | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED,
+ // .flags = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,
+ };
+
+@@ -2746,6 +2746,9 @@
+ int ret, irq;
+
+ pdev->dev.platform_data = &msdc0_hw;
++
++ if (of_property_read_bool(pdev->dev.of_node, "mtk,wp-en"))
++ msdc0_hw.flags |= MSDC_WP_PIN_EN;
+
+ /* Allocate MMC host for this device */
+ mmc = mmc_alloc_host(sizeof(struct msdc_host), &pdev->dev);