soc: amlogic: meson-gx-pwrc-vpu: fix error on shutdown when domain is powered off
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 21 Dec 2017 19:41:02 +0000 (20:41 +0100)
committerKevin Hilman <khilman@baylibre.com>
Mon, 12 Feb 2018 22:15:46 +0000 (14:15 -0800)
commit87f88732d25e6175cb4faa8070658f604660d720
tree63fc7bdf422f8e467f114fb38f50763aab8f3710
parent3a2ad7bd3151cc282f06d18948dfb7a0e1138fb2
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>
drivers/soc/amlogic/meson-gx-pwrc-vpu.c