wait while adding MMC host to ensure root mounts

MMC hosts are added asynchronously. We need to wait until detect returns to
avoid failed root filesystem mounts.
---8<---
VFS: Cannot open root device "mmcblk0p1" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
mmc0: host does not support reading read-only switch. assuming write-enable.
1f00             256 mtdblock0  (driver?)
1f01             256 mtdblock1  (driver?)
1f02            2560 mtdblock2 mmc0: new SDHC card at address b368
 (driver?)
1f03           29696 mtdblock3  (driver?)
1f04           16384 mtdblock4 mmcblk0: mmc0:b368 USD   3.72 GiB
 (driver?)
 mmcblk0: p1
b300         3910656 mmcblk0  driver: mmcblk
  b301         3906560 mmcblk0p1 00000000-01
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
---8<---

Signed-off-by: Sergey Yanovich <ynvich@gmail.com>
---
 drivers/base/dd.c       |    1 -
 drivers/mmc/core/core.c |    4 +++-
 2 files changed, 3 insertions(+), 2 deletions(-)
Added MSM Thermal Userspace
Added MP Decision
Clean up rates and fixed LPA from crashing audio
Cleaned up rates and fixed errors
Added 24bit Audio Format
[SOC] - Added 24bit Audio Format To MSM_STUB
Update drivers/cpufreq/cpufreq_hotplug.c

Make the Governor a bit more aggressive in efforts of preventing freezes during heavy periods of use
mm/proc-v7.S: Add .arch_extension sec By Linaro
adding most up to date 3 stage thermald from showp
drivers/rawchip/Yushan_API.c From: Dennis Rassmann <showp1984@gmail.com> Fix Array Subscript out of bounds
[1/3] mmc: core: Remove power_restore bus_ops for mmc and sd

The mmc_power_restore|save_host API is only used by SDIO func drivers. SDIO
func drivers are also moving towards use of runtime pm to accomplish the
the same operation and since this API is not used for mmc and sd it makes
sense to remove the corresponding bus_ops.

Moreover, at least for eMMC the mmc bus_ops is broken, since no consideration
is taken for mmc sleep and mmc power off notify.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/core/mmc.c |   14 --------------
 drivers/mmc/core/sd.c  |   14 --------------
 2 files changed, 28 deletions(-)
[2/3] mmc: core: Add bus_ops for runtime pm callbacks

SDIO is the only protocol that uses runtime pm for the card device
right now. To provide the option for sd and mmc to use runtime pm as
well the bus_ops callback are extended with two new functions. One for
runtime_suspend and one for runtime_resume.

This patch will also implement the callbacks for SDIO to make sure
existing functionallity is maintained.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/core/bus.c  |   14 ++++++++++++--
 drivers/mmc/core/core.h |    2 ++
 drivers/mmc/core/sdio.c |   20 ++++++++++++++++++++
 3 files changed, 34 insertions(+), 2 deletions(-)
[3/3] mmc: block: Enable runtime pm for mmc blkdevice

Once the mmc blkdevice is being probed, runtime pm will be enabled.
By using runtime autosuspend, the power save operations can be done
when request inactivity occurs for a certain time. Right now the
selected timeout value is set to 3 s.

Moreover, when the blk device is being suspended, we make sure the device
will be runtime resumed. The reason for doing this is that we what the
host suspend sequence to be unaware of any runtime power save operations,
so it can just handle the suspend as the device is fully powerered from a
runtime perspective.

This patch is preparing to make it possible to move BKOPS handling into
the runtime callbacks for the mmc bus_ops. Thus IDLE BKOPS can be
accomplished.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/card/block.c |   28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
lib/string: use glibc version

the performance of memcpy and memmove of the general version is very
inefficient, this patch improved them.

Signed-off-by: Miao Xie <miaox*******>
Signed-off-by: faux123 <reioux@gmail.com>

Conflicts:

	lib/string.c
Makefile: adding config variable for Os/O2/O3 compilation - zarboz
Linux : 3.0.70