msm: acpuclock-7201: Fix table index for precomputing frequency jump

During acpuclock driver init, we pre compute the next target frequency
row and store its address into up/down indexing array of acpuclock table.
While storing these addresses, we store the data in those array using PLL
number as index of array.

While storing the address, for e.g. if PLL is TCXO it corresponds to array
index -1, then we go ahead and write into location which is beyond the
array address, which is for axi frequency variable; thus it gets corrupted.
Earlier also we had similar corruption of lpj variable, but since we used
to calculate lpj after precomputing so the value was always restored and
this bug was hidden.

To avoid this scenario we can change the enum value for TCXO PLL since
it will not have any impact on driver functionality, however it will
avoid the array index to be equal to -1.

Change-Id: I30a72c55dcce064ed63a9d26ea01a4387280d913
Signed-off-by: Pankaj Kumar <pakuma@codeaurora.org>
1 file changed