Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177745662
D61024.1795186286.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61024.1795186286.diff
View Options
diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c
--- a/sys/dev/mmc/mmc_fdt_helpers.c
+++ b/sys/dev/mmc/mmc_fdt_helpers.c
@@ -44,6 +44,12 @@
#include "mmc_pwrseq_if.h"
+/*
+ * Settling time after a card is powered up (supplies enabled and any
+ * mmc-pwrseq reset de-asserted) before the first command may be issued.
+ */
+#define MMC_FDT_POWER_UP_DELAY_US 10000
+
int
mmc_fdt_parse(device_t dev, phandle_t node, struct mmc_helper *helper,
struct mmc_host *host)
@@ -382,6 +388,17 @@
}
if (helper->mmc_pwrseq)
MMC_PWRSEQ_SET_POWER(helper->mmc_pwrseq, true);
+ /*
+ * Give the card time to settle after the supplies have been
+ * enabled and any mmc-pwrseq reset has been de-asserted before
+ * the first command is sent. The SD/SDIO specifications
+ * require a power-ramp settling period, and some devices (e.g.
+ * Broadcom SDIO Wi-Fi) do not respond to the initial CMD0/CMD5
+ * if probed immediately. Linux applies an equivalent delay in
+ * its MMC power-up path; MMCCAM has none, which makes such
+ * cards enumerate unreliably.
+ */
+ DELAY(MMC_FDT_POWER_UP_DELAY_US);
break;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 20, 2:51 PM (10 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41257044
Default Alt Text
D61024.1795186286.diff (1 KB)
Attached To
Mode
D61024: mmc: Add a power-up settling delay in mmc_fdt_set_power()
Attached
Detach File
Event Timeline