OSDN Git Service

soc/tegra: pmc: Initialise power partitions early
authorJon Hunter <jonathanh@nvidia.com>
Thu, 30 Jun 2016 10:56:25 +0000 (11:56 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 30 Jun 2016 11:41:46 +0000 (13:41 +0200)
commite2d17960532d925a202682ce72379c6055068ca4
tree2e0b6b1d93afc4239bc2c1b799f2064317c20823
parentc2710ac9f5a8dab4f9bb080713452fe6286ca83d
soc/tegra: pmc: Initialise power partitions early

If CONFIG_PM_GENERIC_DOMAINS is not enabled, then power partitions
associated with a device will not be enabled automatically by the PM
core when the device is in use. To avoid situations where a device in
a power partition is to be used but the partition is not enabled,
initialise the power partitions for Tegra early in the boot process and
if CONFIG_PM_GENERIC_DOMAINS is not enabled, then power on all
partitions defined in the device-tree blob.

Note that if CONFIG_PM_GENERIC_DOMAINS is not enabled, after the
partitions are turned on, the clocks and resets used as part of the
sequence for turning on the partition are released again as they are no
longer needed by the PMC driver. Another benefit of this is that this
avoids any issues of sharing resets between the PMC driver and other
device drivers that may wish to independently control a particular
reset.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/pmc.c