2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00
linux-next/drivers/soc/tegra
Jon Hunter 0ecf2d33bb soc/tegra: pmc: Fix testing of powergate state
In tegra_powergate_set() the state of the powergates is read and OR'ed
with the bit for the powergate of interest. This unsigned 32-bit value
is then compared with a boolean value to test if the powergate is
already in the desired state. When turning on a powergate, apart from
the powergate that is represented by bit 0, this test will always
return false and so we may attempt to turn on the powergate when it is
already on.

After OR'ing the bit for the powergate, check if the result is not equal
to zero before comparing with the boolean value. Add a helper function
to return the current state of a powergate and use this in both
tegra_powergate_set() and tegra_powergate_is_powered() where we check
the powergate status.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2016-04-05 15:22:48 +02:00
..
fuse soc/tegra: fuse: Add spare bit offset for Tegra210 2015-07-16 10:38:31 +02:00
common.c soc/tegra: Add Tegra210 support 2015-07-16 09:47:59 +02:00
Kconfig ARM: tegra: select USB_ULPI from EHCI rather than platform 2015-11-24 16:47:26 +01:00
Makefile soc: tegra: Remove redundant $(CONFIG_ARCH_TEGRA) in Makefile 2015-08-13 16:17:40 +02:00
pmc.c soc/tegra: pmc: Fix testing of powergate state 2016-04-05 15:22:48 +02:00