mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 14:37:57 +00:00
efa1960abb
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
22 lines
824 B
Diff
22 lines
824 B
Diff
--- a/drivers/mmc/host/mtk-mmc/sd.c
|
|
+++ b/drivers/mmc/host/mtk-mmc/sd.c
|
|
@@ -195,7 +195,7 @@ struct msdc_hw msdc0_hw = {
|
|
.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 @@ static int msdc_drv_probe(struct platfor
|
|
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);
|