rockchip: video: mipi: Fix phy frequency setting
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/video/rockchip/rk_mipi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/rockchip/rk_mipi.c +1 -1
@@ -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)) {
Signature · 1 line
2.19.1
PATCH 1/1 rockchip: video: mipi: Fix phy frequency setting
Quoted 10 lines · Richard Röjfors
There was an incorrect check when looping and finding the first fast enough frequency in the
freq_rangtable. The code did actually return the first that was either exactly correct or too slow.Signed-off-by Richard Röjfors <[email protected]>
Reviewed-by Philipp Tomsich <[email protected]>
Quoted 11 lines
There was an incorrect check when looping and finding the first fast enough frequency in the
freq_rangtable. The code did actually return the first that was either exactly correct or too slow.Signed-off-by Richard Röjfors <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>--- drivers/video/rockchip/rk_mipi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-rockchip, thanks!