Skip to content

scmi_clock: Fix policy reference counter mismatch

Darryl Green requested to merge github/fork/leandro-arm/master into master

Created by: leandro-arm

The reference count for each clock is stored into an internal array, clock_count[], whose size is "number of available clocks" (not SCMI).

In that table, we are mistakenly using an index that is taken from the agent's number of clocks. That leads to a mismatch of clock reference count in some cases.

Fix this by using the clock index that corresponds to the agent's device index to determine to correct location in clock_count[] table to update the reference count.

At the same time, clean-up some of the variables' name to ease the readability of the various clocks.

Change-Id: I9819891fe2237abb252764dadd4a1d36302bc4bf

Merge request reports