diff options
author | Richard Röjfors | 2018-11-14 14:13:53 +0100 |
---|---|---|
committer | Philipp Tomsich | 2018-11-30 19:03:16 +0100 |
commit | 4c2808fd06c3f75df302af6a1354f3ec12278980 (patch) | |
tree | 152e78d6366a7d373b43752760922eff8b9c27fa /drivers/video/rockchip | |
parent | d57720a5fc0a7452195cf3dcdb36cca99497d83a (diff) |
rockchip: video: mipi: Fix phy frequency setting
There was an incorrect check when looping and finding the first
fast enough frequency in the freq_rang table. The code did
actually return the first that was either exactly correct or
too slow.
Signed-off-by: Richard Röjfors <richard@puffinpack.se>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'drivers/video/rockchip')
-rw-r--r-- | drivers/video/rockchip/rk_mipi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c index 88bf56ea098..4f1a0f3a5f7 100644 --- a/drivers/video/rockchip/rk_mipi.c +++ b/drivers/video/rockchip/rk_mipi.c @@ -241,7 +241,7 @@ int rk_mipi_phy_enable(struct udevice *dev) /* select the suitable value for fsfreqrang reg */ for (i = 0; i < ARRAY_SIZE(freq_rang); i++) { - if (ddr_clk / (MHz) >= freq_rang[i][0]) + if (ddr_clk / (MHz) <= freq_rang[i][0]) break; } if (i == ARRAY_SIZE(freq_rang)) { |