linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: pwrseq: Use highest priority for eMMC restart handler
@ 2015-10-21 15:15 Javier Martinez Canillas
  2015-10-22  0:36 ` Krzysztof Kozlowski
  2015-10-27 10:10 ` Ulf Hansson
  0 siblings, 2 replies; 19+ messages in thread
From: Javier Martinez Canillas @ 2015-10-21 15:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Markus Reichl, Anand Moon, linux-samsung-soc, Krzysztof Kozlowski,
	Alim Akhtar, Javier Martinez Canillas, Marek Szyprowski,
	linux-mmc, Alexandre Courbot, Ulf Hansson

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>

---
Hello,

This patch was needed since a recent series from Alim [0] added
syscon reboot and poweroff support to Exynos SoCs and removed
the reset handler in the Exynos Power Management Unit (PMU) code.

But the PMU and syscon-reboot restart handler have a different
priority so [0] breaks restart when eMMC is used on these boards.

[0]: http://www.spinics.net/lists/arm-kernel/msg454396.html

So this patch must be merged before [0] to avoid regressions.

Best regards,
Javier

 drivers/mmc/core/pwrseq_emmc.c | 6 +++---
 1 file 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,
 
 	/*
 	 * 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;
-- 
2.4.3


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

end of thread, other threads:[~2015-10-28 11:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-21 15:15 [PATCH] mmc: pwrseq: Use highest priority for eMMC restart handler Javier Martinez Canillas
2015-10-22  0:36 ` Krzysztof Kozlowski
2015-10-22  1:20   ` Javier Martinez Canillas
2015-10-22  1:43     ` Krzysztof Kozlowski
2015-10-22  2:52       ` Javier Martinez Canillas
2015-10-22  4:14         ` Alim Akhtar
2015-10-22 10:07           ` Marek Szyprowski
2015-10-22 11:02             ` Javier Martinez Canillas
2015-10-22  5:03         ` Anand Moon
2015-10-22  8:36           ` Javier Martinez Canillas
2015-10-22  9:42             ` Anand Moon
2015-10-22 15:34       ` Doug Anderson
2015-10-22 15:51         ` Heiko Stübner
2015-10-22 16:07         ` Javier Martinez Canillas
2015-10-22 17:33           ` Doug Anderson
2015-10-22 17:53             ` Javier Martinez Canillas
2015-10-24  4:55         ` Alim Akhtar
2015-10-27 10:10 ` Ulf Hansson
2015-10-28 11:02   ` Javier Martinez Canillas

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).