summaryrefslogtreecommitdiff
path: root/drivers/soc/amlogic
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2017-12-21 22:41:02 +0300
committerKevin Hilman <khilman@baylibre.com>2018-02-13 01:15:46 +0300
commit87f88732d25e6175cb4faa8070658f604660d720 (patch)
tree63fc7bdf422f8e467f114fb38f50763aab8f3710 /drivers/soc/amlogic
parent3a2ad7bd3151cc282f06d18948dfb7a0e1138fb2 (diff)
downloadlinux-87f88732d25e6175cb4faa8070658f604660d720.tar.xz
soc: amlogic: meson-gx-pwrc-vpu: fix error on shutdown when domain is powered off
When operating the system headless headless, the domain is never powered on, leaving the clocks disabled. The shutdown function then tries to disable the already disabled clocks, resulting in errors. Therefore call meson_gx_pwrc_vpu_power_off() only if domain is powered on. This patch fixes the described issue on my system (Odorid-C2). Fixes: 339cd0ea0822 "soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader" Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'drivers/soc/amlogic')
-rw-r--r--drivers/soc/amlogic/meson-gx-pwrc-vpu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
index 3adb2f2ecefd..6289965c42e9 100644
--- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
+++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
@@ -225,7 +225,11 @@ static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev)
static void meson_gx_pwrc_vpu_shutdown(struct platform_device *pdev)
{
- meson_gx_pwrc_vpu_power_off(&vpu_hdmi_pd.genpd);
+ bool powered_off;
+
+ powered_off = meson_gx_pwrc_vpu_get_power(&vpu_hdmi_pd);
+ if (!powered_off)
+ meson_gx_pwrc_vpu_power_off(&vpu_hdmi_pd.genpd);
}
static const struct of_device_id meson_gx_pwrc_vpu_match_table[] = {