]> git.baikalelectronics.ru Git - kernel.git/commit
clk: ingenic/jz4740: Fix "pll half" divider not read/written properly
authorPaul Cercueil <paul@crapouillou.net>
Mon, 1 Jul 2019 11:36:06 +0000 (13:36 +0200)
committerStephen Boyd <sboyd@kernel.org>
Wed, 7 Aug 2019 21:33:39 +0000 (14:33 -0700)
commitc33964ed9668c55e4315e67c3b6e3b822fe4507c
tree08e313f08412be78fbeb60d7c4fa728b96dc4f09
parent8ae2f793d21f67d4ab95029bb6873efffa36907b
clk: ingenic/jz4740: Fix "pll half" divider not read/written properly

The code was setting the bit 21 of the CPCCR register to use a divider
of 2 for the "pll half" clock, and clearing the bit to use a divider
of 1.

This is the opposite of how this register field works: a cleared bit
means that the /2 divider is used, and a set bit means that the divider
is 1.

Restore the correct behaviour using the newly introduced .div_table
field.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lkml.kernel.org/r/20190701113606.4130-1-paul@crapouillou.net
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/ingenic/jz4740-cgu.c