]> git.baikalelectronics.ru Git - arm-tf.git/commit
drivers: stm32mp1 clocks: support shifted clock selector bit masks
authorEtienne Carriere <etienne.carriere@st.com>
Sun, 8 Dec 2019 07:20:40 +0000 (08:20 +0100)
committerEtienne Carriere <etienne.carriere@st.com>
Mon, 11 May 2020 13:01:46 +0000 (15:01 +0200)
commit8ae08dcd19ef5f027163e57d197b7690443927d2
tree1fc2e9422a0cde81d076df4b321a45a2e8746feb
parent8fbcd9e421e2b7854928e92ccf11a0542cf186bb
drivers: stm32mp1 clocks: support shifted clock selector bit masks

The current implementation optimizes memory consumed by gateable
clock table by storing bit mask and bit shift with 1 byte each.
The issue is that register selector bit masks above the 7th LSBit
cannot be stored.

This change uses the shift info to shift the mask before it is used,
allowing clock selector register bit fields to be spread on the 32 bits
of the register as long as the mask fits in 8 contiguous bit at most.

This change is needed to add the RTC clock to the gateable clocks table.

Change-Id: I8a0fbcbf20ea383fb3d712f5064d2d307e44465d
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
drivers/st/clk/stm32mp1_clk.c