clk: renesas: rcar-gen3: Add HS400 quirk for SD clock
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thu, 29 Nov 2018 00:39:49 +0000 (01:39 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 7 Dec 2018 10:45:06 +0000 (11:45 +0100)
commit36c4da4f552a126bb29a95dc5c9608795491e32a
tree68b1032563ac247bd884b8e64cb258d0fbe688a5
parente2f4dd1f5b51b4dab813aa6e4db44e87aa750393
clk: renesas: rcar-gen3: Add HS400 quirk for SD clock

On H3 (ES1.x, ES2.0) and M3-W (ES1.0, ES1.1) the clock setting for HS400
needs a quirk to function properly. The reason for the quirk is that
there are two settings which produces same divider value for the SDn
clock. On the effected boards the one currently selected results in
HS400 not working.

This change uses the same method as the Gen2 CPG driver and simply
ignores the first clock setting as this is the offending one when
selecting the settings. Which of the two possible settings is used have
no effect for SDR104.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/clk/renesas/rcar-gen3-cpg.c