summaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2019-03-21 10:01:10 +0100
committerMyungJoo Ham <myungjoo.ham@samsung.com>2019-04-16 09:29:18 +0900
commitfbb9c3c9a5acfdbcc21114de0ba16c7b488968f6 (patch)
treedc9d2e44ead697f61db8e35b32dca765166fb66f /drivers/devfreq
parentb53b0128052ffd687797d5f4deeb76327e7b5711 (diff)
downloadlinux-fbb9c3c9a5acfdbcc21114de0ba16c7b488968f6.tar.bz2
PM / devfreq: exynos-bus: Suspend all devices on system shutdown
Force all Exynos buses to safe operation points before doing the system reboot operation. There are board on which some aggressive power saving operation points are behind the capabilities of the bootloader to properly reset the hardware and boot the board. This way one can avoid board crash early after reboot. This fixes reboot issue on OdroidU3 board both with eMMC and SD boot. Reported-by: Markus Reichl <m.reichl@fivetechno.de> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/exynos-bus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index c25658b26598..486cc5b422f1 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -514,6 +514,13 @@ err:
return ret;
}
+static void exynos_bus_shutdown(struct platform_device *pdev)
+{
+ struct exynos_bus *bus = dev_get_drvdata(&pdev->dev);
+
+ devfreq_suspend_device(bus->devfreq);
+}
+
#ifdef CONFIG_PM_SLEEP
static int exynos_bus_resume(struct device *dev)
{
@@ -556,6 +563,7 @@ MODULE_DEVICE_TABLE(of, exynos_bus_of_match);
static struct platform_driver exynos_bus_platdrv = {
.probe = exynos_bus_probe,
+ .shutdown = exynos_bus_shutdown,
.driver = {
.name = "exynos-bus",
.pm = &exynos_bus_pm,