From: =?UTF-8?q?Richard=20R=C3=B6jfors?= Date: Wed, 14 Nov 2018 14:13:53 +0100 Subject: [U-Boot] [PATCH] rockchip: video: mipi: Fix phy frequency setting Message-ID: <20181114131353.29312-1-richard@puffinpack.se> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de 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=C3=B6jfors --- drivers/video/rockchip/rk_mipi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_m= ipi.c index 4fe8f47441..4fc8c1f3b5 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) =20 /* select the suitable value for fsfreqrang reg */ for (i =3D 0; i < ARRAY_SIZE(freq_rang); i++) { - if (ddr_clk / (MHz) >=3D freq_rang[i][0]) + if (ddr_clk / (MHz) <=3D freq_rang[i][0]) break; } if (i =3D=3D ARRAY_SIZE(freq_rang)) { --=20 2.19.1