linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: Move the mmc driver init earlier
@ 2018-06-08  9:51 Feng Tang
  2018-06-12  6:25 ` Ulf Hansson
  0 siblings, 1 reply; 15+ messages in thread
From: Feng Tang @ 2018-06-08  9:51 UTC (permalink / raw)
  To: linux-kernel, linux-mmc, Greg Kroah-Hartman, Ulf Hansson, Adrian Hunter
  Cc: Feng Tang

When doing some boot time optimization for an eMMC rootfs NUCs,
we found the rootfs may spend around 100 microseconds waiting
for eMMC card to be initialized, then the rootfs could be
mounted.
	[    1.216561] Waiting for root device /dev/mmcblk1p1...
	[    1.289262] mmc1: new HS400 MMC card at address 0001
	[    1.289667] mmcblk1: mmc1:0001 R1J56L 14.7 GiB
	[    1.289772] mmcblk1boot0: mmc1:0001 R1J56L partition 1 8.00 MiB
	[    1.289869] mmcblk1boot1: mmc1:0001 R1J56L partition 2 8.00 MiB
	[    1.289967] mmcblk1rpmb: mmc1:0001 R1J56L partition 3 4.00 MiB
	[    1.292798]  mmcblk1: p1 p2 p3
	[    1.300576] EXT4-fs (mmcblk1p1): couldn't mount as ext3 due to feature incompatibilities
	[    1.300912] EXT4-fs (mmcblk1p1): couldn't mount as ext2 due to feature incompatibilities

And this is a common problem for smartphones, tablets, embedded
devices and automotive products. This patch will make the eMMC/SD
card  start initializing earlier, by changing its order in drivers/Makefile.

On our platform, the waiting for eMMC card is almost eliminated with the patch,
which is critical to boot time.

Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 drivers/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 24cd47014657..c473afd3c688 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -50,6 +50,9 @@ obj-$(CONFIG_REGULATOR)		+= regulator/
 # reset controllers early, since gpu drivers might rely on them to initialize
 obj-$(CONFIG_RESET_CONTROLLER)	+= reset/
 
+# put mmc early as many morden devices use emm/sd card as rootfs storage
+obj-y				+= mmc/
+
 # tty/ comes before char/ so that the VT console is the boot-time
 # default.
 obj-y				+= tty/
@@ -128,7 +131,6 @@ obj-$(CONFIG_EISA)		+= eisa/
 obj-$(CONFIG_PM_OPP)		+= opp/
 obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
 obj-$(CONFIG_CPU_IDLE)		+= cpuidle/
-obj-y				+= mmc/
 obj-$(CONFIG_MEMSTICK)		+= memstick/
 obj-$(CONFIG_NEW_LEDS)		+= leds/
 obj-$(CONFIG_INFINIBAND)	+= infiniband/
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-08-14  9:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08  9:51 [PATCH] mmc: Move the mmc driver init earlier Feng Tang
2018-06-12  6:25 ` Ulf Hansson
2018-06-12  8:42   ` Feng Tang
2018-06-12 10:29     ` Ulf Hansson
2018-06-12 12:05       ` Shawn Lin
2018-06-12 13:06         ` Feng Tang
2018-06-12 12:56       ` Feng Tang
2018-08-02  9:15       ` Feng Tang
2018-08-14  6:39         ` Feng Tang
2018-08-14  7:18           ` Greg Kroah-Hartman
2018-08-14  7:38             ` Feng Tang
2018-08-14  7:40               ` Greg Kroah-Hartman
2018-08-14  8:08                 ` Feng Tang
2018-08-14  8:42                   ` Greg Kroah-Hartman
2018-08-14  9:49                     ` Feng Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).