Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13d22806 authored by Deepak Katragadda's avatar Deepak Katragadda
Browse files

msm: ssr: Send notification during a cold boot failure



Currently, when powering on a subsystem during cold boot fails,
the drivers that have registered for notifications about the
subsystem are not intimated.
Send the 'powerup failure' notification to these drivers to give
them an opportunity to do the necessary cleanup/logging at their
end before the subsystem is shutdown.

Change-Id: I09c10d5ead7dc153ed3ce3caf8f1c3442a66eb96
Signed-off-by: default avatarDeepak Katragadda <dkatraga@codeaurora.org>
parent 08a9c39e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -505,8 +505,11 @@ static int subsys_start(struct subsys_device *subsys)

	init_completion(&subsys->err_ready);
	ret = subsys->desc->powerup(subsys->desc);
	if (ret)
	if (ret) {
		notify_each_subsys_device(&subsys, 1, SUBSYS_POWERUP_FAILURE,
									NULL);
		return ret;
	}
	enable_all_irqs(subsys);

	if (subsys->desc->is_not_loadable) {
@@ -519,6 +522,8 @@ static int subsys_start(struct subsys_device *subsys)
		/* pil-boot succeeded but we need to shutdown
		 * the device because error ready timed out.
		 */
		notify_each_subsys_device(&subsys, 1, SUBSYS_POWERUP_FAILURE,
									NULL);
		subsys->desc->shutdown(subsys->desc, false);
		disable_all_irqs(subsys);
		return ret;