From: Javier Martinez Canillas Date: Wed, 21 Oct 2015 15:15:40 +0000 (+0200) Subject: mmc: pwrseq: Use highest priority for eMMC restart handler X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c6e58d83615678875bf52747f8841c49291dfcf;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Tested-by: Markus Reichl Tested-by: Anand Moon Reviewed-by: Alim Akhtar Tested-by: Douglas Anderson Signed-off-by: Ulf Hansson --- 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, /* * register reset handler to ensure emmc reset also from - * emergency_reboot(), priority 129 schedules it just before - * system reboot + * emergency_reboot(), priority 255 is the highest priority + * so it will be executed before any system reboot handler. */ pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb; - pwrseq->reset_nb.priority = 129; + pwrseq->reset_nb.priority = 255; register_restart_handler(&pwrseq->reset_nb); pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops;