aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2015-10-21 11:15:40 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2015-10-27 06:11:06 -0400
commit1c6e58d83615678875bf52747f8841c49291dfcf (patch)
treeabf81570242ef8abbbed36804c2fe1c5e1375a46
parent6397b7f5f405f30f03f67ef829306c5af6d3369b (diff)
mmc: pwrseq: Use highest priority for eMMC restart handler
The pwrseq_emmc driver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders (that don't have an eMMC reset logic) to be able to read the second stage from the eMMC. But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Tested-by: Markus Reichl <m.reichl@fivetechno.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Tested-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/core/pwrseq_emmc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/core/pwrseq_emmc.c b/drivers/mmc/core/pwrseq_emmc.c
index 137c97fb7aa8..ad4f94ec7e8d 100644
--- a/drivers/mmc/core/pwrseq_emmc.c
+++ b/drivers/mmc/core/pwrseq_emmc.c
@@ -84,11 +84,11 @@ struct mmc_pwrseq *mmc_pwrseq_emmc_alloc(struct mmc_host *host,
84 84
85 /* 85 /*
86 * register reset handler to ensure emmc reset also from 86 * register reset handler to ensure emmc reset also from
87 * emergency_reboot(), priority 129 schedules it just before 87 * emergency_reboot(), priority 255 is the highest priority
88 * system reboot 88 * so it will be executed before any system reboot handler.
89 */ 89 */
90 pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb; 90 pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb;
91 pwrseq->reset_nb.priority = 129; 91 pwrseq->reset_nb.priority = 255;
92 register_restart_handler(&pwrseq->reset_nb); 92 register_restart_handler(&pwrseq->reset_nb);
93 93
94 pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops; 94 pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops;