firmware: tegra: Make BPMP a regular driver
authorThierry Reding <treding@nvidia.com>
Tue, 21 Apr 2020 22:00:53 +0000 (00:00 +0200)
committerThierry Reding <treding@nvidia.com>
Tue, 21 Apr 2020 22:02:10 +0000 (00:02 +0200)
commitd70f5e541ab30bf5ff29b219e9d1980e082ba159
tree8fd0159362d04b045a6a2bc12e52fd4b61974f97
parent8f3d9f354286745c751374f5f1fcafee6b3f3136
firmware: tegra: Make BPMP a regular driver

The Tegra BPMP driver typically ends up deferring probe because it wants
to attach to the SMMU, so there's little sense in registering it at the
core init-level.

One side-effect of this is that the driver will be probed later even if
it doesn't want to attach to an SMMU, which means that consumers will
end up deferring probe, which in turn takes care of ordering the suspend
and resume queue in the correct way. Currently since suspend/resume
order depends on instantiation order, and because BPMP is listed at the
very end of the device tree (after most of its consumers), the suspend
and resume queue is ordered wrongly, which can cause issues for drivers
(like I2C) which suspend after and resume before BPMP. In the case of
I2C this typically leads to the clock failing to enable.

Besides fixing this suspend/resume ordering issue, this also has the
added benefit of allowing the driver to be built as a loadable module,
which can help decrease the size of multiplatform kernel.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/firmware/tegra/bpmp.c