]> git.baikalelectronics.ru Git - uboot.git/commit
clk: renesas: Fix SDH clock divider decoding on Gen2
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Mon, 18 Mar 2019 04:11:42 +0000 (05:11 +0100)
committerMarek Vasut <marex@denx.de>
Mon, 25 Mar 2019 19:26:53 +0000 (20:26 +0100)
commit3926f504c8eec776db1d832d7297505a86a3f5c3
tree3f329dc38d77ea78716f222e40f7e5d3402736cb
parente6a3f451e06280cc077ebfbf80af2e9411831e1e
clk: renesas: Fix SDH clock divider decoding on Gen2

The gen2_clk_get_sdh_div() function is supposed to look up the
$val value read out of the SDCKCR register in the supplied table
and return the matching divider value. The current implementation
was matching the value from SDCKCR on the divider value in the
table, which is wrong. Fix this and rework the function a bit
to make it more readable.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
drivers/clk/renesas/clk-rcar-gen2.c