remoteproc: wait until udev and FS are up before loading firmware
authorFernando Guzman Lugo <fernando.lugo@ti.com>
Thu, 24 May 2012 23:54:40 +0000 (18:54 -0500)
committerSubramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
Fri, 25 May 2012 00:53:47 +0000 (19:53 -0500)
commitad084fe62b5a172f5d6264043ab422cdcca674c9
treeac14ab4a4ec66745737613fbc2276922c9393af9
parent2d8044df1511b0be80b0e2b755a3847999c179fd
remoteproc: wait until udev and FS are up before loading firmware

Calling request_firmware_nowait is just adding a little delay
before requesting the firwmare. Sometimes, it is not enough for
udev or FS to be ready, causing an issue loading ducati firmware.
Now, we make sure udev is up before requesting the firmware and
also retrying when request_firmware returns -ENOENT.

NOTE: This fixes the issue when the kernel boots but there is not
userspace yet (as when charging the phone). As soon as there is
userspace the remoteproc firmware will be requested.

This patch is an adaptaion from ICS kernel

Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Hervé Fache <h-fache@ti.com>
Signed-off-by: Subramaniam Chanderashekarapuram <subramaniam.ca@ti.com>
drivers/remoteproc/remoteproc_core.c