msm: clock-8xxx: Duplicate gfx2d frequency table for gfx2d1

The gfx2d clocks are getting stuck off randomly when the clock
is turned on. With clocks that are glitch-free dual banked clocks
we use the frequency tables to store information about the mn
enable bits. At compile time, both mn enable bits are set in the
frequency pointer (BIT(8) | BIT(5)). At runtime, the mnd_en_mask
is updated to reflect the current bank that's selected. The
mnd_en_mask is used to turn on the mn counter for the bank that's
being used.

This is all fine except that for gfx2d there are two clocks and
these two clocks share the same frequency table. This means that
gfx2d0 can change its rate and land on bank0 and gfx2d1 can
change its rate and land on bank1. If the two clocks are "out of
phase" and one clock is using bank0 and the other clock is using
bank1 we'll get into a situation where the frequency table will
reflect settings for one clock configured for bank0 and when we
go to enable the clock on bank1 it will program the incorrect
mn enable bit.

When this occurs the clock will have its correct bank chosen but
the mn counter will be off and the counter mode will not be
bypass. This will cause the bank to never turn on and then the
clock will get stuck.

Duplicate the tables so that both gfx2d cores can be used at the
same time and not conflict.

Change-Id: Idb5fc584211e941284b02dc3d964fe2bab2bf377
CRs-Fixed: 333496
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2 files changed