OSDN Git Service

bus: ti-sysc: Add support for missing clockdomain handling
authorTony Lindgren <tony@atomide.com>
Mon, 27 May 2019 11:51:53 +0000 (04:51 -0700)
committerTony Lindgren <tony@atomide.com>
Tue, 28 May 2019 12:19:14 +0000 (05:19 -0700)
commit2b2f7def058a5386838ef4dba70a860285f79e66
treeaf41e7f719b73f1f10e73cab852d91fe7caefe2f
parent4ee23cd76c0ce8622976b3da0e2bc89e6d94f6d4
bus: ti-sysc: Add support for missing clockdomain handling

We need to let ti-sysc driver manage clockdomain autoidle for the
duration of of reset, enable and idle. And we need to do it before we
enable the clock and after we disable it. Currently we are still
relying on platform callbacks indirectly managing clockdomain autoidle.
But I noticed that for device tree only probed drivers it now happens
only after we enabling the clocks and before we disable the clocks,
while it should be the other way around. So far I have not noticed
any issues with this though.

Let's add new ti_sysc_clkdm_deny_idle() and ti_sysc_clkdm_allow_idle()
functions for ti-sysc driver to use to manage clockdomains directly via
platform data callbacks. Note that we can implement the clockdomain
functions in pdata-quirks.c as for probing devices without "ti,hwmods"
custom property we don't need to use the other platform data callbacks.

Let's do this in one patch as there's is still an unlikely chance we
may need to apply this as a fix for v5.2 for dropping legacy platform
data for some devices. We also do have the option of adding back the
platform data if needed in case of trouble.

Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/pdata-quirks.c
drivers/bus/ti-sysc.c
include/linux/platform_data/ti-sysc.h