aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-4.4
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2016-12-01 18:29:50 +0100
committerJohn Crispin <john@phrozen.org>2016-12-01 18:30:41 +0100
commit7c809f168790efb8b52147df38bf4c6ae56bf36a (patch)
treee73b97667c24a2ac638a74c573db3fe4df6753fc /target/linux/ramips/patches-4.4
parent0b3b8c83c047137ed83f5697ed44c04dbed5bbeb (diff)
downloadupstream-7c809f168790efb8b52147df38bf4c6ae56bf36a.tar.gz
upstream-7c809f168790efb8b52147df38bf4c6ae56bf36a.tar.bz2
upstream-7c809f168790efb8b52147df38bf4c6ae56bf36a.zip
ramips: fix sdhci support on mt7621
the IRQ level was wrong. refresh the patch while at it. Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ramips/patches-4.4')
-rw-r--r--target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch13
-rw-r--r--target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch21
2 files changed, 10 insertions, 24 deletions
diff --git a/target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch b/target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
index 6905c380bc..67c0b29898 100644
--- a/target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
+++ b/target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
@@ -1760,7 +1760,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
--- /dev/null
+++ b/drivers/mmc/host/mtk-mmc/sd.c
-@@ -0,0 +1,3060 @@
+@@ -0,0 +1,3067 @@
+/* Copyright Statement:
+ *
+ * This software/firmware and related documentation ("MediaTek Software") are
@@ -1958,7 +1958,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ .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,
+};
+
@@ -4509,6 +4509,9 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ 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);
@@ -4603,7 +4606,11 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+ spin_lock_init(&host->lock);
+ msdc_init_hw(host);
+
-+ ret = request_irq((unsigned int)irq, msdc_irq, IRQF_TRIGGER_LOW, dev_name(&pdev->dev), host);
++ if (ralink_soc == MT762X_SOC_MT7621AT)
++ ret = request_irq((unsigned int)irq, msdc_irq, 0, dev_name(&pdev->dev), host);
++ else
++ ret = request_irq((unsigned int)irq, msdc_irq, IRQF_TRIGGER_LOW, dev_name(&pdev->dev), host);
++
+ if (ret) goto release;
+ // mt65xx_irq_unmask(irq); /* --- by chhung */
+
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
deleted file mode 100644
index 8bb0352ac2..0000000000
--- a/target/linux/ramips/patches-4.4/0085-sdhci-no-wp.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- 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);