summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-3.12.70/linux-3.12-atmel-mci-force-detect.patch
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-11-11 16:17:52 -0600
committerJohn Klug <john.klug@multitech.com>2020-11-11 16:17:52 -0600
commit4bb6f26b05450777d14aa96e10783066c2503dc2 (patch)
tree3ed6c4bb86736d28926fd37a3c2b4eb81de44c82 /recipes-kernel/linux/linux-3.12.70/linux-3.12-atmel-mci-force-detect.patch
downloadmeta-multitech-atmel-9a18c55f1807e0f981d9b3a1ce0df954c0bb5fb9.tar.gz
meta-multitech-atmel-9a18c55f1807e0f981d9b3a1ce0df954c0bb5fb9.tar.bz2
meta-multitech-atmel-9a18c55f1807e0f981d9b3a1ce0df954c0bb5fb9.zip
Add new BSP submodule for Atmel Processors.5.3.0b5.3.0a
Diffstat (limited to 'recipes-kernel/linux/linux-3.12.70/linux-3.12-atmel-mci-force-detect.patch')
-rw-r--r--recipes-kernel/linux/linux-3.12.70/linux-3.12-atmel-mci-force-detect.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-3.12.70/linux-3.12-atmel-mci-force-detect.patch b/recipes-kernel/linux/linux-3.12.70/linux-3.12-atmel-mci-force-detect.patch
new file mode 100644
index 0000000..2efdf51
--- /dev/null
+++ b/recipes-kernel/linux/linux-3.12.70/linux-3.12-atmel-mci-force-detect.patch
@@ -0,0 +1,29 @@
+Index: linux-3.12.13/drivers/mmc/host/atmel-mci.c
+===================================================================
+--- linux-3.12.13.orig/drivers/mmc/host/atmel-mci.c 2014-04-10 13:32:40.012723945 -0500
++++ linux-3.12.13/drivers/mmc/host/atmel-mci.c 2014-04-10 13:36:46.088723297 -0500
+@@ -1447,6 +1447,9 @@
+ slot->detect_is_active_high);
+ dev_dbg(&mmc->class_dev, "card is %spresent\n",
+ present ? "" : "not ");
++ } else {
++ // jjg - assume card is present if detect pin is unset
++ present = 1;
+ }
+
+ return present;
+@@ -2205,8 +2208,12 @@
+ }
+ }
+
+- if (!gpio_is_valid(slot->detect_pin))
+- mmc->caps |= MMC_CAP_NEEDS_POLL;
++ // jjg - if detect pin isn't set, don't poll -- just assume device
++ // is there and mark it non-removable
++ if (!gpio_is_valid(slot->detect_pin)) {
++ dev_info(&host->pdev->dev,"No detect pin, marking non-removable and assuming device is present\n");
++ mmc->caps |= MMC_CAP_NONREMOVABLE;
++ }
+
+ if (gpio_is_valid(slot->wp_pin)) {
+ if (gpio_request(slot->wp_pin, "mmc_wp")) {