diff options
author | Jon Hunter <jonathanh@nvidia.com> | 2016-06-28 11:38:23 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-06-30 11:48:39 +0200 |
commit | 403db2d21c8f8576d38211e5ec17d149c49e528b (patch) | |
tree | 8ced5602c41e68baf4c82513cdd66f6e75a84798 /drivers/soc | |
parent | 05cfb988a4d08f84abd2f474d8dd771e7528d975 (diff) | |
download | blackbird-op-linux-403db2d21c8f8576d38211e5ec17d149c49e528b.tar.gz blackbird-op-linux-403db2d21c8f8576d38211e5ec17d149c49e528b.zip |
soc/tegra: pmc: Ensure powergate is available when powering on
The function tegra_power_sequence_power_up() is a public function used
to power on a partition. When this function is called, we do not check
to see if the partition being powered up is valid/available. Fix this
by checking to see that the partition is valid/available.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/tegra/pmc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 8a421a0b1ece..52a9e9703668 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -549,6 +549,9 @@ int tegra_powergate_sequence_power_up(unsigned int id, struct clk *clk, struct tegra_powergate pg; int err; + if (!tegra_powergate_is_available(id)) + return -EINVAL; + pg.id = id; pg.clks = &clk; pg.num_clks = 1; |