[source] ramips: disable the WP pin on the SDK mmc driver

LEDE Commits lede-commits at lists.infradead.org
Thu Jun 30 21:44:50 PDT 2016


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=2dc9beddc089bdaa9a2a39aeeb88c7ae14fda56c

commit 2dc9beddc089bdaa9a2a39aeeb88c7ae14fda56c
Author: John Crispin <john at phrozen.org>
AuthorDate: Tue Jun 28 11:15:31 2016 +0200

    ramips: disable the WP pin on the SDK mmc driver
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 .../linux/ramips/patches-4.4/0085-sdhci-no-wp.patch | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

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 0000000..46b1a6c
--- /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);



More information about the lede-commits mailing list